I don't know if this is the place to ask but I'm running out of ideas. I'm sorry to bother you. I just wanted to know how can I set the URL for a healthcheck in Beanstalk from terraform. I've been through the terraform doc and the AWS doc and after some time it's still not working
HaZrD
you can do local-exec or remote-exec, which might work?
ainestal
I was using "setting" for all the properties of the beanstalk so I wanted to do something like:
setting { namespace = "aws:elasticbeanstalk:application" name = "Application Healthcheck URL" value = "/admin/healthcheck" }
but local-exec as a last resort is ok
I think it has to be possible to configure the healthcheck url as a property of the beanstalk stack... it is quite important
@HaZrD interesting, thx. In this case is not exactly the same, this is in case you define the ELB yourself but in Beanstalk it is defined for you
HaZrD
understood :)
BlackMaria_netsp has quit
BlackMaria joined the channel
nathanleclaire joined the channel
Tokynet_zzz is now known as Tokynet
yruss972 joined the channel
muh-die-kuh joined the channel
rinskip has quit
Tokynet
when trying to create a policy, it asks for the arn of the resource its for (an s3 bucket in this case), how can i create the policy AND the bucket in terraform on the same tf file?
HaZrD
Tokynet i personally shell out (local-exec) to create my template and then apply it straight afterwards, when i need to find values first and use those values to apply to a new section of the same .tf
azerus_ joined the channel
hadr has quit
hadr joined the channel
Tokynet
HaZrD: hmm ok
t0m
HaZrD: I'm remote (preston-ish) but there's an office in London (and we're hiring ;)
Headed down for a couple of days in the office in 1/2hrs time. (I do 2 or 3 days a month in London)
guess i could just create the IAM stuff on a diff tf file as a dependency to the creation of the bucket...
vegardx
Also, shouldn't lookup return an empty string if it doesn't find anything? Not a single space.
HaZrD
t0m can i pm?
t0m
HaZrD: sure :)
poofmooter joined the channel
poofmooter
Hi, I had some questions on Remote State resource and the best way to use it. In my example, I'm configuring a pretty generic AWS VPC w/ 4 subnets (across the 4 AZs). I'd like to persist the state of that VPC and then reference it in later modules (like giving an app an EFS setup w/ 4 mount targets in each AZ).
I was using modules to organize my code and created the VPC as a module with the subnet ids as outputs, the "apply" updated state. But when I reference that remote state from the EFS module I wrote it can't find the outputs.
t0m
poofmooter: you need to make the module outputs be outputs at the top level to get them in remote state
poofmooter
ok makes sense, so what is the best organization strategy for multiple components that might reference each other (I'm coming from ansible where I'm used to having a main playbook)
its a little weird that I can read remote state using a resource, but writing remote state appears to be a global thing from my terminal session
is it more the norm to create a config file for each component in my network and use a script or something to run them all? saving the results of each into a different remote state store?
vegardx
It's very helpful when you want to split things up in managable pieces. I don't want to be able to accidentally write to a state that the current code base is not supposed to touch.
ranger81 joined the channel
t0m
It's normal to have your basic stuff like VPC state laid down and pulled in as remote state into other places.
And then it's fairly normal to have stuff split by functional area above that
But it depends :)
poofmooter
how do you control writing that state in an automated way? have a script call remote config each time you want to save to a different place?
t0m
You'd just push it to the same place?
vegardx
You don't want to write to a state that the current code base is not managing.
yruss972 joined the channel
iamchrisf has quit
ainestal: Actually it is documneted, but it's not very well documented. And good luck finding the values in the AWS documentation, then you have to dig deeeeeeep.
iamchrisf joined the channel
ranger81 has quit
Okay, no the problem I had earlier makes a lot more sense, terraform isn't expanding any variables in the name field on aws_route53_record. The fuck!
bosszaru joined the channel
poofmooter
I guess I was viewing the remote state as a global store across my entire environment, but it sounds like you should isolate states to functional areas?
yruss972 joined the channel
HaZrD
poofmooter i split my states into resourcegroups, which is pretty much the same as what you just suggested
means i have "finer" control over state
poofmooter
are there any plans to have the remote state configuration for writing be a resource option?
seems a bit error-prone to have to configure the remote state outside of the config I'm trying to run
ranger81 joined the channel
yruss972 joined the channel
adriam has quit
vegardx
If you want a statefile out of sync, writing from it remotely sure is a good way to achieve that.
hadr has quit
poofmooter
but isn't that what happens when you run apply w/ remote config?
maybe I misunderstood what I was seeing, but it looked like it was automatically writing the state when I ran apply
hadr joined the channel
hadr has quit
ainestal has quit
wizard113 has quit
ceposta joined the channel
ainestal joined the channel
colinbits joined the channel
ranger81 joined the channel
Triryn
Anyone know a good way to add two additional EIP to each instance in count of 5?
Spanktar joined the channel
kyhavlov_ joined the channel
gawbul joined the channel
ainestal has quit
kyhavlov has quit
Tokynet has quit
Tokynet joined the channel
gawbul
Hi, just wondering if any is working on, or knows of anyone working on an AWS Config provider?
Hi everyone! I'm having some oddness with template_file and wondering if its me or possibly a bug candidate.
wizard113 joined the channel
I have a template I create with template_file and it has a handful of vars. On every plan it, it always wants to recreate the template (even though nothing has changed on it). The plan output says: vars.#: "10" => "<computed>" (forces new resource)
This is causing me issues as it trickles down to my aws_asg and launch configs which then want to recreate as well.
gawbul joined the channel
gawbul has quit
brokenth_ joined the channel
impi joined the channel
ajw0100 joined the channel
brokenthumbs has quit
vegardx
poofmooter: Ah, there might be some confusion here. You can have remote state (to S3, Atlas or foo), but you can also READ a remote state. Say you have one repo with all the VPC and subnet stuff, you can reference that state file to get things like subnet IDs back, which you might need in another repo that deploys some instances on top of that VPC.