Terraform-provider-aws: Add import functionality to iam_group_policy_attachment and iam_user_policy_attachment

Created on 27 Nov 2018  ·  5Comments  ·  Source: hashicorp/terraform-provider-aws

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 "me too" comments, 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

Description

It would be useful if resources aws_iam_group_policy_attachment and aws_iam_user_policy_attachment had imports implemented, similar to what aws_iam_role_policy_attachment currently has. A similar parsing mechanic could be used and I would imagine the logic is about the same. Having this implemented would help facilitate bringing Terraform into live environments where these attachment styles are preferred.

New or Affected Resource(s)

  • aws_iam_group_policy_attachment
  • aws_iam_user_policy_attachment

Potential Terraform Configuration

resource "aws_iam_group_policy_attachment" "test-attach" {
  group      = "${aws_iam_group.group.name}"
  policy_arn = "${aws_iam_policy.policy.arn}"
}

References

enhancement serviciam

Most helpful comment

Support for importing aws_iam_group_policy_attachment and aws_iam_user_policy_attachment resources has been merged and will release with version 1.51.0 of the AWS provider, likely middle of this week. 👍

All 5 comments

That looks great! That looks like it touches aws_iam_user_policy_attachment, it also possible to address aws_iam_group_policy_attachment? I believe it should be nearly the same change. I can also take a shot at it, but I don't believe I have the environment set up to test to make sure the change works and the tests pass.

Thank you!

Support for importing aws_iam_group_policy_attachment and aws_iam_user_policy_attachment resources has been merged and will release with version 1.51.0 of the AWS provider, likely middle of this week. 👍

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

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!

Was this page helpful?
0 / 5 - 0 ratings