-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elastic Beanstalk Environment Tag "Name" should not be editable #3963
Comments
There's also a second (arguably more disturbing) aspect to this bug: if your tag contains the string "Name" at all, it appears in a plan but it is then filtered out. If the environment already exists, apply fails as described above. However, if it's a fresh environment, the tag is just silently not created at all. |
I am seeing Case #2 with our projects. This appears to have started with version 1.11. Specifying 1.10 allows me to apply changes without the failure. |
Yes even i am seeing this issue with version 1.11 , giving the same Name tag is also failing with the same error... |
You can just remove the name tag from your terraform script, since AWS will auto generate/manage the name tag |
I have similar issue where I do not have Tag 'Name' in my code. |
I've been running into a similar issue as @line0, our tag contains the String |
Here is how I strip out items from lists @Chukobyte For example: If you have a Tag Map for Elastic Beanstalk and it includes Name as one of the keys. ## bs_label is from using the labeling module from cloud posse that handles tagging and resource naming.
module "bs_label" {
source = "git::https://github.com/cloudposse/terraform-null-label.git?ref=tags/0.11.1"
attributes = ["${distinct(compact(concat(var.attributes, list("beanstalk", var.application_name))))}"]
context = "${module.label.context}"
enabled = "${var.enabled}"
}
## Beanstalk Applications can't have a Name tag in their tags list.
locals {
keys = "${keys(module.bs_label.tags)}"
name_index = "${index(local.keys, "Name")}"
keys_before = "${slice(local.keys, 0, local.name_index)}"
keys_after = "${slice(local.keys, local.name_index + 1, length(local.keys))}"
values = "${values(module.bs_label.tags)}"
values_before = "${slice(local.values, 0, local.name_index)}"
values_after = "${slice(local.values, local.name_index + 1, length(local.values))}"
tags = "${zipmap(concat(local.keys_before, local.keys_after), concat(local.values_before, local.values_after))}"
} |
I ran into a similar issue as @line0 and @Chukobyte: I have a tag For now, I'm removing |
this is how we remove the (could be updated to rename the tag instead of removing if needed) |
Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you! |
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. |
This issue was originally opened by @DemonR as hashicorp/terraform#17712. It was migrated here as a result of the provider split. The original body of the issue is below.
According to Elastic Beanstalk documentation, "Name" is one of the default tags and can't be edited. However if the "Name" tag is set in the terraform script, it will still try to apply the change.
Terraform Version
Terraform Configuration Files
Scenarios:
1. if "Name" tag is present, and there isn't any other change to the Elastic Beanstalk
Expected Behavior
"Name" tag is not applied, or report an error
Actual Behavior
Elastic Beanstalk:
Terraform:
2. if "Name" tag is present, and there is other change to the Elastic Beanstalk environment
(in this case changing health monitoring from basic to enhanced)
Expected Behavior
"Name" tag is not applied, or report an error
Actual Behavior
Elastic Beanstalk throws the same error as before:
But terraform reports the tag is updated:
tags.Name: "" => "New Tag Name"
Steps to Reproduce
terraform init
terraform apply
The text was updated successfully, but these errors were encountered: