First, create an .tfvars file that supplies a valid slack_team_idslack_channel_id and sets suffix = "test"
Run terraform apply and confirm that the resources are successfully provisioned
Next, modify the .tfvars file and set suffix = "dev" (or whatever you prefer other than "test")
Run terraform apply again. Terraform will run successfully, but will spit out a warning (see Debug Output). Afterwards, the resource name will remain the same despite the value of suffix changing.
Debug Output
Error: Provider produced inconsistent result after apply
│
│ When applying changes to
│ module.common.aws_chatbot_slack_channel_configuration.my_slack_channel,
│ provider "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an
│ unexpected new value: .configuration_name: was
│ cty.StringVal("my-slack-channel-dev"), but now
│ cty.StringVal("my-slack-channel-de0415607ecdd122").
│
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.
Volunteering to Work on This Issue
If you are interested in working on this issue, please leave a comment.
If this would be your first contribution, please review the contribution guide.
Terraform Core Version
1.6.1
AWS Provider Version
~> 5.0
Affected Resource(s)
aws_chatbot_slack_channel_configuration
Expected Behavior
If the
name
parameter changes, then either the resource should be updated with that new name or else the resource should be destroyed and recreated.Actual Behavior
The resource name is left unmodified
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
First, create an
.tfvars
file that supplies a validslack_team_id
slack_channel_id
and setssuffix = "test"
Run
terraform apply
and confirm that the resources are successfully provisionedNext, modify the
.tfvars
file and setsuffix = "dev"
(or whatever you prefer other than "test")Run
terraform apply
again. Terraform will run successfully, but will spit out a warning (see Debug Output). Afterwards, the resource name will remain the same despite the value ofsuffix
changing.Debug Output
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None