Quantcast
Channel: Terraform - HashiCorp Discuss
Viewing all articles
Browse latest Browse all 11376

Conditional Execution of Module using Count

$
0
0

We are getting very strange issue while using count in conjunction with Module. Below code doesn’t instantiate the module even if both the variable values are matching, we tried to assign static value i.e. count = 1, but in that case as well we don’t see the module getting instantiated. Please suggest what could be the possible fix.

Option 1:

module “mymodule” {
source = “./module/sample”
count = var.xyz == var.abc ? 1 : 0
}

Option 2:

module “mymodule” {
source = “./module/sample”
count = 1
}

Both of the above options doesn’t work for me for modules

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 11376

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>