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
new ResourceAssociation(name: string, args: ResourceAssociationArgs, opts?: CustomResourceOptions);def ResourceAssociation(resource_name, opts=None, resource_arn=None, resource_share_arn=None, __props__=None);func NewResourceAssociation(ctx *Context, name string, args ResourceAssociationArgs, opts ...ResourceOption) (*ResourceAssociation, error)public ResourceAssociation(string name, ResourceAssociationArgs args, CustomResourceOptions? opts = null)- 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:
- Resource
Arn string Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
- string
Amazon Resource Name (ARN) of the RAM Resource Share.
- Resource
Arn string Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
- string
Amazon Resource Name (ARN) of the RAM Resource Share.
- resource
Arn string Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
- 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.
- 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:
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.
public static get(name: string, id: Input<ID>, state?: ResourceAssociationState, opts?: CustomResourceOptions): ResourceAssociationstatic 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)public static ResourceAssociation Get(string name, Input<string> id, ResourceAssociationState? 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:
- Resource
Arn string Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
- string
Amazon Resource Name (ARN) of the RAM Resource Share.
- Resource
Arn string Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
- string
Amazon Resource Name (ARN) of the RAM Resource Share.
- resource
Arn string Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
- 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.
- 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
awsTerraform Provider.