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.74k stars 9.1k forks source link

resource/aws_iam_policy_attachment import #11400

Open voldemortensen opened 4 years ago

voldemortensen commented 4 years ago

Community Note

Description

Currently aws_iam_policy_attachment resources don't support import. This request is for the ability to import policy attachments.

New or Affected Resource(s)

Potential Terraform Configuration

Standard configuration for aws_iam_policy_attachment

nimrodkor commented 4 years ago

Just ran into this as well - could be very useful!

bstoutenburgh commented 1 year ago

This might be outdated, I had imported several aws_iam_policy_attachment resources today. It looks like it just needs to be documented but the id is role/policy_arn so commands are like terraform import aws_iam_role_policy_attachment.rds_enhanced_monitoring rds-monitoring-role/arn:aws:iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole.

ocharles commented 4 months ago

@bstoutenburgh You're importing aws_iam_role_policy_attachment - this issue is about aws_iam_policy_attachment.