ResourceAssociation

Manages a Resource Access Manager (RAM) Resource Association.

NOTE: Certain AWS resources (e.g. EC2 Subnets) can only be shared in an AWS account that is a member of an AWS Organizations organization with organization-wide Resource Access Manager functionality enabled. See the Resource Access Manager User Guide and AWS service specific documentation for additional information.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var example = new Aws.Ram.ResourceAssociation("example", new Aws.Ram.ResourceAssociationArgs
        {
            ResourceArn = aws_subnet.Example.Arn,
            ResourceShareArn = aws_ram_resource_share.Example.Arn,
        });
    }

}
package main

import (
    "github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ram"
    "github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)

func main() {
    pulumi.Run(func(ctx *pulumi.Context) error {
        _, err := ram.NewResourceAssociation(ctx, "example", &ram.ResourceAssociationArgs{
            ResourceArn:      pulumi.String(aws_subnet.Example.Arn),
            ResourceShareArn: pulumi.String(aws_ram_resource_share.Example.Arn),
        })
        if err != nil {
            return err
        }
        return nil
    })
}
import pulumi
import pulumi_aws as aws

example = aws.ram.ResourceAssociation("example",
    resource_arn=aws_subnet["example"]["arn"],
    resource_share_arn=aws_ram_resource_share["example"]["arn"])
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const example = new aws.ram.ResourceAssociation("example", {
    resourceArn: aws_subnet_example.arn,
    resourceShareArn: aws_ram_resource_share_example.arn,
});

Create a ResourceAssociation Resource

def ResourceAssociation(resource_name, opts=None, resource_arn=None, resource_share_arn=None, __props__=None);
name string
The unique name of the resource.
args ResourceAssociationArgs
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 ResourceAssociationArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ResourceAssociationArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ResourceAssociation Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ResourceAssociation resource accepts the following input properties:

ResourceArn string

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

ResourceShareArn string

Amazon Resource Name (ARN) of the RAM Resource Share.

ResourceArn string

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

ResourceShareArn string

Amazon Resource Name (ARN) of the RAM Resource Share.

resourceArn string

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

resourceShareArn string

Amazon Resource Name (ARN) of the RAM Resource Share.

resource_arn str

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

resource_share_arn str

Amazon Resource Name (ARN) of the RAM Resource Share.

Outputs

All input properties are implicitly available as output properties. Additionally, the ResourceAssociation resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.

Look up an Existing ResourceAssociation Resource

Get an existing ResourceAssociation resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, resource_arn=None, resource_share_arn=None, __props__=None);
func GetResourceAssociation(ctx *Context, name string, id IDInput, state *ResourceAssociationState, opts ...ResourceOption) (*ResourceAssociation, error)
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:

ResourceArn string

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

ResourceShareArn string

Amazon Resource Name (ARN) of the RAM Resource Share.

ResourceArn string

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

ResourceShareArn string

Amazon Resource Name (ARN) of the RAM Resource Share.

resourceArn string

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

resourceShareArn string

Amazon Resource Name (ARN) of the RAM Resource Share.

resource_arn str

Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.

resource_share_arn str

Amazon Resource Name (ARN) of the RAM Resource Share.

Package Details

Repository
https://github.com/pulumi/pulumi-aws
License
Apache-2.0
Notes
This Pulumi package is based on the aws Terraform Provider.