$ terraform version
Terraform v0.12.4
I should be able to use the fixed tag ignoring functionality introduced by #21788 and this comment https://github.com/hashicorp/terraform/issues/21444#issuecomment-504026691
resource "aws_vpc" "ct" {
cidr_block = "${var.vpc_cidr_ipv4}"
assign_generated_ipv6_cidr_block = "true"
instance_tenancy = "default"
enable_dns_support = true
enable_dns_hostnames = true
tags {
Name = "${var.infra_name}_${replace(var.region,"-","")}"
TERRAFORM = "true"
INFRA_NAME = "${var.infra_name}"
"kubernetes.io" = "unset"
}
lifecycle {
create_before_destroy = true
ignore_changes = [
tags["kubernetes.io"]
]
}
}
On modules/vpc/vpc.tf line 12: Argument names must not be quoted.
Changing the resource to the following snippet where I unquote the kubernetes.io argument throws a different error.
resource "aws_vpc" "ct" {
cidr_block = "${var.vpc_cidr_ipv4}"
assign_generated_ipv6_cidr_block = "true"
instance_tenancy = "default"
enable_dns_support = true
enable_dns_hostnames = true
tags {
Name = "${var.infra_name}_${replace(var.region,"-","")}"
TERRAFORM = "true"
INFRA_NAME = "${var.infra_name}"
kubernetes.io = "unset"
}
lifecycle {
create_before_destroy = true
ignore_changes = [
tags["kubernetes.io"]
]
}
}
Error: Argument or block definition required
On modules/vpc/vpc.tf line 12: An argument or block definition is required
here. To set an argument, use the equals sign "=" to introduce the argument
value.
I'm not sure how to proceed here.
Please list the full steps required to reproduce the issue, for example:
terraform initterraform planIf I remove "kubernetes.io" = "unset"/kubernetes.io = "unset" from the tags block, then terraform progresses.
Disregard, this was an issue during my upgrade from 0.11.14 to 0.12.4 where the tags { block should have been tags = {
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
Disregard, this was an issue during my upgrade from
0.11.14to0.12.4where thetags {block should have beentags = {