Create a nested (2 level) map in Terraform output
I have a Terraform module that create EC2 instances “for me” grouped by “cluster” with the following output (here in a cluster_module_output
local for easy debug/testing):
Looking for recommendations to structure projects in a directory
I am responsible for setting/creating infra for the company and I am trying to introduce IaC approaches at the company. I am looking for ways and recommendations on how should I structure the terraform repository.
terraform assertion raises only warning
I am using terraform check block to check whether the environment provided by user matches the selected workspace. When I do apply or plan, I do see that assertion check has failed (for mismatched values) but it doesn’t throw an error. Is there a way to raise an error when the assertion check fails. My idea is to halt plan or apply operation if the provided environment doesn’t match the selected workspace before proceeding to apply/check for other resources.
Terraform – Optional map(objects)
I want to use the optional parameter to pass optional parameters: