Nested Loop IF resource contains key in Terraform
I would like to iterate over a list of values ONLY if the object contains a specific property. Is that possible?
receiving terraform security group syntax error for two ec2 instance
I am receiving the below error.
Index terrraform resources
In our Terraform infrastructure, we generate resources dynamically: a local script is executed and returns a list: something like that:
Terraform: how to access a resource in module for output?
How to access a resource for output, for exampe ec2 instance: aws_instance.splat_lab.ebs_block_device.*.volume_id
Tried notation module.module-name.path-to-resource
, i.e. module.webserver-cas12.aws_instance.splat_lab.ebs_block_device.*.volume_id
but module.module-name
is empty.
is it possible to write custom terraform functions?
Is it possible to write custom terraform functions?
If yes, how to write them?
Tryied this tutorial but is there no mention of custom terraform functions.
Does Terraform support inheritance for resource attributes?
I have two app
resources with some common attributes as shown below:
How do I conditionally deploy terraform resource based on parameter if resource already has count keyword?
My terraform code is below which deploys certain number of resources based on variable rdsh_count
.
I need this resource to deploy conditionally only if variable deploy
is set to true
, normally I would use count keyword but it’s not going to work here since this resource already have it. How this can be accomplished?
How do I use dynamic condition in depends_on block in terraform?
I have resource enable-hibernation
which is deployed conditionally and another resource delete-dsc-extension
which always needs to run, just in case enable-hibernation
exists, it needs to wait for it before starting. How I can use depends_on
keyword in delete-dsc-extension
resource without erroring in cases where enable-hibernation
was never created?
Iterate through map of lists as value in Terraform resource
I have a map that looks something like this:
Iterate through map of lists as value in Terraform resource
I have a map that looks something like this: