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

Error: Provider produced inconsistent result after apply AWS_IAM_ROLE_ATTACHMENT_TASK #18457

Closed
McCo0L opened this issue Mar 29, 2021 · 3 comments · Fixed by #18435
Closed

Error: Provider produced inconsistent result after apply AWS_IAM_ROLE_ATTACHMENT_TASK #18457

McCo0L opened this issue Mar 29, 2021 · 3 comments · Fixed by #18435
Assignees
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service.
Milestone

Comments

@McCo0L
Copy link

McCo0L commented Mar 29, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • 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
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform CLI and Terraform AWS Provider Version

Terraform v0.14.7

  • provider registry.terraform.io/hashicorp/aws v3.33.0

Affected Resource(s)

  • aws_iam_role_policy_attachment

  • aws_XXXXX

Terraform Configuration Files

resource "aws_iam_role" "ecs_task_execution_role" {
  name = "executionRole"

  assume_role_policy = <<EOF
{
 "Version": "2012-10-17",
 "Statement": [
   {
     "Action": "sts:AssumeRole",
     "Principal": {
       "Service": "ecs-tasks.amazonaws.com"
     },
     "Effect": "Allow",
     "Sid": ""
   }
 ]
}
EOF
}

resource "aws_iam_role_policy_attachment" "task_cw" {
  role       = aws_iam_role.ecs_task_execution_role.name
  policy_arn = "arn:aws:iam::aws:policy/CloudwatchFullAccess"
}

Expected Behavior

Succesfully attach the policy to the role

Actual Behavior

Error: Provider produced inconsistent result after apply

When applying changes to module.ecs.aws_iam_role_policy_attachment.task_cw,
provider "registry.terraform.io/hashicorp/aws" produced an unexpected new
value: Root resource was present, but now absent.

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

Steps to Reproduce

  1. terraform apply
  • #0000
@ghost ghost added the service/iam Issues and PRs that pertain to the iam service. label Mar 29, 2021
@github-actions github-actions bot added needs-triage Waiting for first response or review from a maintainer. bug Addresses a defect in current functionality. labels Mar 29, 2021
@bflad bflad removed the needs-triage Waiting for first response or review from a maintainer. label Mar 29, 2021
@bflad
Copy link
Contributor

bflad commented Mar 29, 2021

Hi @McCo0L 👋 Thank you for reporting this and sorry you ran into trouble there. We plan on fixing this issue with the resource shortly (e.g. #18435).

@ghost
Copy link

ghost commented Apr 1, 2021

This has been released in version 3.35.0 of the Terraform AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template for triage. Thanks!

@ghost
Copy link

ghost commented May 2, 2021

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators May 2, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/iam Issues and PRs that pertain to the iam service.
Projects
None yet
2 participants