hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.83k stars 9.17k forks source link

[Bug]: Inconsistent result after apply for aws_chatbot_slack_channel_configuration resource #39370

Open haruka-sz opened 1 month ago

haruka-sz commented 1 month ago

Terraform Core Version

1.9.5

AWS Provider Version

5.67.0

Affected Resource(s)

aws_chatbot_slack_channel_configuration

Expected Behavior

The resource should have applied with the same configuration_name value as specified in the configuration file.

Actual Behavior

After applying the changes, Terraform produced an error due to an inconsistency between the expected configuration_name and the one applied. Specifically, the name changed from example-develop-ci-cd to example-development-ci-cd, causing an inconsistency error.

Relevant Error/Panic Output Snippet

Error: Provider produced inconsistent result after apply

When applying changes to aws_chatbot_slack_channel_configuration.example_develop_ci_cd,
provider "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new
value: .configuration_name: was cty.StringVal("example-develop-ci-cd"), but now
cty.StringVal("example-development-ci-cd").

This is a bug in the provider, which should be reported in the provider's own issue
tracker.

Terraform Configuration Files

resource "aws_chatbot_slack_channel_configuration" "example_develop_ci_cd" {
  configuration_name = "example-develop-ci-cd"
  slack_channel_id   = local.slack_channel_id
  slack_team_id      = local.slack_workspace_id

  sns_topic_arns = [local.sns_topic_arn]
  iam_role_arn   = local.chatbot_iam_role
  guardrail_policy_arns = [
    "arn:aws:iam::aws:policy/ReadOnlyAccess"
  ]
  user_authorization_required = false
}

Steps to Reproduce

  1. Define an aws_chatbot_slack_channel_configuration resource with the configuration_name set to "mediverse-development-ci-cd".
  2. Run terraform apply to create the resource.
  3. Modify the configuration_name to "mediverse-develop-ci-cd" in the configuration.
  4. Run terraform apply again.
  5. Observe the error indicating an inconsistency in configuration_name, where it unexpectedly reverts to "mediverse-development-ci-cd".

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue