Resource: awsDbInstanceRoleAssociation
Manages an RDS DB Instance association with an IAM Role. Example use cases:
- Amazon RDS Oracle integration with Amazon S3
- Importing Amazon S3 Data into an RDS PostgreSQL DB Instance
-> To manage the RDS DB Instance IAM Role for Enhanced Monitoring, see the awsDbInstance
resource monitoringRoleArn
argument instead.
Example Usage
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as aws from "./.gen/providers/aws";
new aws.dbInstanceRoleAssociation.DbInstanceRoleAssociation(this, "example", {
dbInstanceIdentifier: "${aws_db_instance.example.id}",
featureName: "S3_INTEGRATION",
roleArn: "${aws_iam_role.example.arn}",
});
Argument Reference
The following arguments are supported:
dbInstanceIdentifier
- (Required) DB Instance Identifier to associate with the IAM Role.featureName
- (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 thesupportedFeatureNames
list returned by AWS CLI rds describe-db-engine-versions.roleArn
- (Required) Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
Attributes Reference
In addition to all arguments above, the following attributes are exported:
id
- DB Instance Identifier and IAM Role ARN separated by a comma (,
)
Import
awsDbInstanceRoleAssociation
can be imported using the DB Instance Identifier and IAM Role ARN separated by a comma (,
), e.g.,