#terraform-tool

/

      • Joel
        stephent, I think even with ENV vars it requires a blank vars file :\
      • but I don't use env vars at all
      • phinze
        stephent: hmm yeah that looks like it should work
      • plucas joined the channel
      • stephent
        I’ve just checked my version of terraform which is 0.4.2 - odd. Perhaps that’s it. Will install 0.5.1
      • kmorgan
        Hey all, I'm trying out terraform 0.5.3's new aws_volume_attachment feature. If I have something like this: http://hastebin.com/urawowaxin.json. Then the instance gets a default ebs on /dev/xvda volume when it starts, and vol-1-attach fails. Is there any way around getting that default volume?
      • jeremypruitt____ has quit
      • cppforlife_ has quit
      • _jac joined the channel
      • phinze
        kmorgan: because aws_volume_attachment happens after instance launch, i think you can't avoid the volumes that come with the instance - you have to use ebs_block_device and friends
      • stephent: 0.5.3 but +1 :)
      • stephent
        ah… yes - brew cask was out of date
      • ctiwald
        sounds good phinze; thanks for the help; if I or a team member of mine has time to start that PR we'll submit a quick proposal for you guys to sign off on it
      • phinze
        great! thanks ctiwald
      • kmorgan
        phinze: can I use ebs_block_device, or do I need root_block_device? The reason I want to use aws_volume_attachement is because the ebs volumes stick around after instance termination, and can be migrated to other instances. I don't think I get that with ebs_block_device or root_block_device. Does that make sense?
      • phinze
        kmorgan: ah wasn't sure if you were trying to replace the root device - yeah gotchya.
      • so i think the best you can do is https://terraform.io/docs/providers/aws/r/insta...
      • ^ use root_block_device and set delete_on_termination to false
      • you won't have a direct reference to the volumes from tf
      • but they won't be nuked
      • kmorgan
        Is the volume id persisted anywhere that I can query?
      • phinze
        within terraform? i don't believe so at the moment... you'd have to drop down to something like awcli
      • davedash has quit
      • stephent
        so yes, my version of terraform was the issue - D’oh! thanks for your input any way guys
      • Trynity has quit
      • kmorgan
        phinze: That's too bad :( thanks for the help.
      • phinze
        kmorgan: np - feel free to file an issue describing your use case and any ideas you have about how TF could support it
      • eiwe has quit
      • PhilK has quit
      • armon has quit
      • fatih has quit
      • rickdennis has quit
      • a_ro has quit
      • jeremypruitt____ joined the channel
      • Joel
        phinze, did you see my template workaround? :P
      • I should have called it "dirty_template.tpl"
      • cppforlife_ joined the channel
      • neerfri has quit
      • iamchrisf has quit
      • AlexanderEkdahl has quit
      • jeremy_carroll joined the channel
      • davedash joined the channel
      • Trynity joined the channel
      • eiwe joined the channel
      • PhilK joined the channel
      • plucas has quit
      • fatih joined the channel
      • plucas joined the channel
      • skyraider has quit
      • nathanleclaire has quit
      • buckaroo
        if I use terraform apply -target=foo.bar, but foo.bar doesn't match any defined resources, should one expect it to apply all changes or no changes?
      • phinze
        buckaroo: i'd expect it to apply no changes, but `terraform plan -target=foo.bar` will tell you for sure what will happen
      • _jac has quit
      • stephent has quit
      • buckaroo
        ah, `terraform -target=foo.bar plan` is not the same, and does not work as expected.
      • what consumed the -target= flag in that case?
      • phinze
        buckaroo: ah yes - we've filed that upstream at mitchellh/cli and it's been recently fix, should return a sane error msg in next version
      • *fixed
      • buckaroo
        supercool thanks
      • Luke joined the channel
      • ajw0100 joined the channel
      • jmreicha_ has quit
      • andrewwatson joined the channel
      • Luke has quit
      • michael_mbp joined the channel