RoleAssociation
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
aws.rds.Instanceresourcemonitoring_role_arnargument instead.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var example = new Aws.Rds.RoleAssociation("example", new Aws.Rds.RoleAssociationArgs
{
DbInstanceIdentifier = aws_db_instance.Example.Id,
FeatureName = "S3_INTEGRATION",
RoleArn = aws_iam_role.Example.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rds.NewRoleAssociation(ctx, "example", &rds.RoleAssociationArgs{
DbInstanceIdentifier: pulumi.String(aws_db_instance.Example.Id),
FeatureName: pulumi.String("S3_INTEGRATION"),
RoleArn: pulumi.String(aws_iam_role.Example.Id),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
example = aws.rds.RoleAssociation("example",
db_instance_identifier=aws_db_instance["example"]["id"],
feature_name="S3_INTEGRATION",
role_arn=aws_iam_role["example"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rds.RoleAssociation("example", {
dbInstanceIdentifier: aws_db_instance_example.id,
featureName: "S3_INTEGRATION",
roleArn: aws_iam_role_example.id,
});Create a RoleAssociation Resource
new RoleAssociation(name: string, args: RoleAssociationArgs, opts?: CustomResourceOptions);def RoleAssociation(resource_name, opts=None, db_instance_identifier=None, feature_name=None, role_arn=None, __props__=None);func NewRoleAssociation(ctx *Context, name string, args RoleAssociationArgs, opts ...ResourceOption) (*RoleAssociation, error)public RoleAssociation(string name, RoleAssociationArgs args, CustomResourceOptions? opts = null)- name string
- The unique name of the resource.
- args RoleAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- opts ResourceOptions
- A bag of options that control this resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args RoleAssociationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleAssociationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
RoleAssociation Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RoleAssociation resource accepts the following input properties:
- Db
Instance stringIdentifier DB Instance Identifier to associate with the IAM Role.
- Feature
Name string 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- Role
Arn string Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
- Db
Instance stringIdentifier DB Instance Identifier to associate with the IAM Role.
- Feature
Name string 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- Role
Arn string Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
- db
Instance stringIdentifier DB Instance Identifier to associate with the IAM Role.
- feature
Name string 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- role
Arn string Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
- db_
instance_ stridentifier DB Instance Identifier to associate with the IAM Role.
- feature_
name str 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- role_
arn str Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleAssociation resource produces the following output properties:
Look up an Existing RoleAssociation Resource
Get an existing RoleAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: RoleAssociationState, opts?: CustomResourceOptions): RoleAssociationstatic get(resource_name, id, opts=None, db_instance_identifier=None, feature_name=None, role_arn=None, __props__=None);func GetRoleAssociation(ctx *Context, name string, id IDInput, state *RoleAssociationState, opts ...ResourceOption) (*RoleAssociation, error)public static RoleAssociation Get(string name, Input<string> id, RoleAssociationState? state, CustomResourceOptions? opts = null)- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
The following state arguments are supported:
- Db
Instance stringIdentifier DB Instance Identifier to associate with the IAM Role.
- Feature
Name string 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- Role
Arn string Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
- Db
Instance stringIdentifier DB Instance Identifier to associate with the IAM Role.
- Feature
Name string 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- Role
Arn string Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
- db
Instance stringIdentifier DB Instance Identifier to associate with the IAM Role.
- feature
Name string 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- role
Arn string Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
- db_
instance_ stridentifier DB Instance Identifier to associate with the IAM Role.
- feature_
name str 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
SupportedFeatureNameslist returned by AWS CLI rds describe-db-engine-versions.- role_
arn str Amazon Resource Name (ARN) of the IAM Role to associate with the DB Instance.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.