- From: Mark Harrison <
>
- To:
- Subject: [chef] Re: Re: Re: Re: Re: Using config/credential profiles with chef-provisioning-aws
- Date: Fri, 30 Jan 2015 13:42:34 -0500
Interesting. You're right about it being just profilename in the
credentials file vs config (today I learned...), and as far as I can
see in the code
(
https://github.com/chef/chef-provisioning-aws/blob/master/lib/chef/provisioning/aws_driver/credentials.rb#L37)
it does treat them correctly.
I think the behavior you're seeing about it picking the first set of
credentials if there is no default is caused by this:
https://github.com/chef/chef-provisioning-aws/blob/master/lib/chef/provisioning/aws_driver/credentials.rb#L22
but that's still implying that it isn't picking up your profilename.
Hopefully someone smarter than me can work out why that's happening.
On Fri, Jan 30, 2015 at 12:41 PM, Christine Draper
<
>
wrote:
>
Hi,
>
>
There are no stupid questions. I am a relative AWS API and chef-provisioning
>
newbie, and quite willing to believe its my configuration problem!.
>
>
I have [profile profilename] in .config, but I am using .credentials for the
>
keys where I understand the format is just [profilename] (the aws commands
>
dont work if I use [profile profilename] in .credentials). I have verified
>
that I can create a vpc using --profile with aws ec2 create_vpc (and it
>
fails when I don't use --profile, as the default credentials don't have
>
authority).
>
>
I've also tried moving the credentials into .config, but that doesn't help.
>
>
The most alarming behaviour is if I have no default in credentials, and put
>
the authorized users credentials first, that's what it uses.
>
>
Regards,
>
Christine
>
>
>
>
On Fri, Jan 30, 2015 at 9:59 AM, Mark Harrison
>
<
>
>
wrote:
>
>
>
> Possibly stupid question: do the profiles other than the default one
>
> start with 'profile' (e.g. '[profile test1]') in the credentials file
>
> (the AWS credentials file is weird in that the default profile is just
>
> [default], but others are [profile profilename])? Also, do your
>
> alternate profiles with with the aws command line tools and the
>
> --profile option or other non-chef-provisioning tools?
>
>
>
> On Thu, Jan 29, 2015 at 10:21 PM, Christine Draper
>
> <
>
>
> wrote:
>
> > It seems that there may be a bug in the profile support. Whatever
>
> > profile
>
> > name I put in to the driver, it appears to be running with the
>
> > credentials
>
> > of the first profile in the file.
>
> >
>
> > On Thu, Jan 29, 2015 at 4:42 PM, Christine Draper
>
> > <
>
>
> > wrote:
>
> >>
>
> >> Hmm.. I must be doing something stupid somewhere. Doesnt work for me
>
> >> with
>
> >> the env variable either.
>
> >>
>
> >> I've tried with both the 0.1.3 version that's in ChefDK 0.3.6, and with
>
> >> 0.2.1 (because I needed subnets).
>
> >>
>
> >> On Thu, Jan 29, 2015 at 4:20 PM, Tyler Ball
>
> >> <
>
>
> >> wrote:
>
> >>>
>
> >>> I am using environmental variables and when I specify
>
> >>> CHEF_DRIVER=aws:test1 it uses my profile - does that work for you? If
>
> >>> so,
>
> >>> I'm guessing it is a bug with `with_driver`.
>
> >>>
>
> >>> What version of chef-provisioning-aws are you using? The ChefDK?
>
> >>>
>
> >>> -T
>
> >>>
>
> >>>
>
> >>> > On Jan 29, 2015, at 1:39 PM, Christine Draper
>
> >>> > <
>
>
> >>> > wrote:
>
> >>> >
>
> >>> > Hi,
>
> >>> >
>
> >>> > Is there a way to tell chef-provisioning-aws driver to use a profile
>
> >>> > rather than the default from config/credentials files? I tried
>
> >>> >
>
> >>> > with_driver aws:test1
>
> >>> >
>
> >>> > where test1 is my profile, but that didn't work.
>
> >>> >
>
> >>> > Regards,
>
> >>> > Christine
>
> >>>
>
> >>
>
> >
>
>
[chef] Re: Using config/credential profiles with chef-provisioning-aws, Scott Ford, 01/29/2015
Archive powered by MHonArc 2.6.16.