Relative Content

Tag Archive for terraform

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.

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?