Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
294 views
in Technique[技术] by (71.8m points)

Unable to use variable count in terragrunt

First I created a lifecycle policy using terraform uisng this link https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dlm_lifecycle_policy . Later I used terragrunt to create the lifecycle policy but I get error using the variable count.I declared the variable as a number datatype. I get this error while running terragrunt plan-all ''' Error: Invalid variable name

on variables.tf line 36, in variable "count": 36: variable "count"{

The variable name "count" is reserved due to its special meaning inside module blocks. '''

[terragrunt] 2021/01/26 20:51:01 Encountered the following errors: Hit multiple errors: exit status 1

How can I fix this.Thanks in advance

question from:https://stackoverflow.com/questions/65927907/unable-to-use-variable-count-in-terragrunt

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There is not much you can do about it, as error shows terraform has some variable names reserved for internal use,

https://www.terraform.io/docs/language/values/variables.html#declaring-an-input-variable

only thing you can do is to choose another name for your variable.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...