<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jul 11, 2014 at 4:44 AM, Tudor Rogoz <span dir="ltr"><<a href="mailto:rogoz@adobe.com" target="_blank">rogoz@adobe.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word;color:rgb(0,0,0);font-size:14px;font-family:Calibri,sans-serif">
<div>Hi all,</div>
<div><br>
</div>
<div>Is it possible to access the juju environment properties directly from the hooks?</div>
<div>More precisely, I want to have access to the AWS credentials (defined in the environments.yaml file) directly from the hooks, is this possible? I can workaround the situation, by defining specific config properties and duplicate the information there
and this way I can get the data by calling ‘config-get’ function.But I’m just thinking if maybe it would be a cleaner way to achieve this.Ideas?</div>
<div><br></div></div></blockquote><div><br></div><div>Juju doesn't allow for extraction of provider credentials from the state server as a security measure. Its typically much better to define these as charm config properties, because you can use a separate iam account that's permission scoped to the usage you want rather than proliferating a more privileged account. Even better is using iam roles (<a href="http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html">http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html</a>) with manual provisioning and workload placement (deploy --to) against the ec2 provider and avoiding the credential management entirely.<br>
</div><div><br></div><div>cheers,</div><div><br></div><div>Kapil</div><div> </div></div><br></div></div>