Skip to content
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

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

Open
haruka-sz opened this issue Sep 18, 2024 · 4 comments
Labels
bug Addresses a defect in current functionality. service/chatbot Issues and PRs that pertain to the chatbot service.

Comments

@haruka-sz
Copy link

haruka-sz commented Sep 18, 2024

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

@haruka-sz haruka-sz added the bug Addresses a defect in current functionality. label Sep 18, 2024
Copy link

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • 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.

@github-actions github-actions bot added service/chatbot Issues and PRs that pertain to the chatbot service. needs-triage Waiting for first response or review from a maintainer. labels Sep 18, 2024
@justinretzolk justinretzolk removed the needs-triage Waiting for first response or review from a maintainer. label Oct 31, 2024
@taraspos
Copy link

taraspos commented Dec 5, 2024

I've got similar error, but related to the order of SNS topics:

│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.website_docs_chatbot.aws_chatbot_slack_channel_configuration.amplify_chatbot,
│ provider "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an
│ unexpected new value: .sns_topic_arns[0]: was
│ cty.StringVal("arn:aws:sns:us-west-2:<REDACTED>:website-docs-chatbot20241205115428553200000004"),
│ but now
│ cty.StringVal("arn:aws:sns:us-east-1:<REDACTED>:website-docs-chatbot20241205115429499700000004").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.
╵
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ module.website_docs_chatbot.aws_chatbot_slack_channel_configuration.amplify_chatbot,
│ provider "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an
│ unexpected new value: .sns_topic_arns[1]: was
│ cty.StringVal("arn:aws:sns:us-east-1:<REDACTED>:website-docs-chatbot20241205115429499700000004"),
│ but now
│ cty.StringVal("arn:aws:sns:us-west-2:<REDACTED>:website-docs-chatbot20241205115428553200000004").
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

@alex-shafer-1002
Copy link

Confirmed the bug is still present for the SNS listing case in v5.68.0

@justisGipson
Copy link

using v5.84.0 bug is still present

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Addresses a defect in current functionality. service/chatbot Issues and PRs that pertain to the chatbot service.
Projects
None yet
Development

No branches or pull requests

5 participants