Error: Attribute redefined - The argument "tags" was already set
cmrust opened this issue · 5 comments
cmrust commented
I'm receiving the following error on module version 1.6.1:
Error: Attribute redefined
on .terraform/modules/kubernetes/scholzj-terraform-aws-kubernetes-6fb01f4/main.tf line 371, in resource "aws_autoscaling_group" "nodes":
371: tags = [{
The argument "tags" was already set at
.terraform/modules/kubernetes/scholzj-terraform-aws-kubernetes-6fb01f4/main.tf:365,3-7.
Each argument may be set only once.
Error: Attribute redefined
on .terraform/modules/kubernetes/scholzj-terraform-aws-kubernetes-6fb01f4/main.tf line 377, in resource "aws_autoscaling_group" "nodes":
377: tags = ["${var.tags2}"]
The argument "tags" was already set at
.terraform/modules/kubernetes/scholzj-terraform-aws-kubernetes-6fb01f4/main.tf:365,3-7.
Each argument may be set only once.
It seems the tags attribute shouldn't be redeclared over and over here:
terraform-aws-kubernetes/main.tf
Lines 356 to 382 in 7e4342c
scholzj commented
This seems to work fine for me with Terraform 0.11.11. What version of Terraform are you using?
cmrust commented
Hey @scholzj. Yep, looks like this error is specific to 0.12.0, which was just released. Rolled back to 0.11.14 and it's working fine again. To clarify above, this error was generated during a terraform init
.
scholzj commented
Hmm, I will have a look if there is some workaround.
scholzj commented
FYI: I'm thinking about moving to Terraform 0.12.0 from Kubernetes 1.15. So that should be the timeframe I will look at this.