Resource: aws_db_instance_role_association

Manages an RDS DB Instance association with an IAM Role. Example use cases:

Example Usage

resource "aws_db_instance_role_association" "example" {
  db_instance_identifier = aws_db_instance.example.identifier
  feature_name           = "S3_INTEGRATION"
  role_arn               = aws_iam_role.example.arn
}

Argument Reference

This resource supports the following arguments:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Import

In Terraform v1.5.0 and later, use an import block to import aws_db_instance_role_association using the DB Instance Identifier and IAM Role ARN separated by a comma (,). For example:

import {
  to = aws_db_instance_role_association.example
  id = "my-db-instance,arn:aws:iam::123456789012:role/my-role"
}

Using terraform import, import aws_db_instance_role_association using the DB Instance Identifier and IAM Role ARN separated by a comma (,). For example:

% terraform import aws_db_instance_role_association.example my-db-instance,arn:aws:iam::123456789012:role/my-role