Manages a RDS DB Cluster association with an IAM Role. Example use cases:
resource "aws_rds_cluster_role_association" "example" {
db_cluster_identifier = aws_rds_cluster.example.id
feature_name = "S3_INTEGRATION"
role_arn = aws_iam_role.example.arn
}
This resource supports the following arguments:
db_cluster_identifier
- (Required) DB Cluster Identifier to associate with the IAM Role.feature_name
- (Required) Name of the feature for association. This can be found in the AWS documentation relevant to the integration or a full list is available in the SupportedFeatureNames
list returned by AWS CLI rds describe-db-engine-versions.role_arn
- (Required) Amazon Resource Name (ARN) of the IAM Role to associate with the DB Cluster.This resource exports the following attributes in addition to the arguments above:
id
- DB Cluster Identifier and IAM Role ARN separated by a comma (,
)create
- (Default 10m
)delete
- (Default 10m
)In Terraform v1.5.0 and later, use an import
block to import aws_rds_cluster_role_association
using the DB Cluster Identifier and IAM Role ARN separated by a comma (,
). For example:
import {
to = aws_rds_cluster_role_association.example
id = "my-db-cluster,arn:aws:iam::123456789012:role/my-role"
}
Using terraform import
, import aws_rds_cluster_role_association
using the DB Cluster Identifier and IAM Role ARN separated by a comma (,
). For example:
% terraform import aws_rds_cluster_role_association.example my-db-cluster,arn:aws:iam::123456789012:role/my-role