Show / Hide Table of Contents

Namespace Pulumi.Aws.Ram

Classes

GetResourceShare

GetResourceShareArgs

GetResourceShareResult

PrincipalAssociation

Provides a Resource Access Manager (RAM) principal association. Depending if RAM Sharing with AWS Organizations is enabled, the RAM behavior with different principal types changes.

When RAM Sharing with AWS Organizations is enabled:

  • For AWS Account ID, Organization, and Organizational Unit principals within the same AWS Organization, no resource share invitation is sent and resources become available automatically after creating the association.
  • For AWS Account ID principals outside the AWS Organization, a resource share invitation is sent and must be accepted before resources become available. See the aws.ram.ResourceShareAccepter resource to accept these invitations.

When RAM Sharing with AWS Organizations is not enabled:

  • Organization and Organizational Unit principals cannot be used.
  • For AWS Account ID principals, a resource share invitation is sent and must be accepted before resources become available. See the aws.ram.ResourceShareAccepter resource to accept these invitations.

Example Usage

AWS Account ID

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var exampleResourceShare = new Aws.Ram.ResourceShare("exampleResourceShare", new Aws.Ram.ResourceShareArgs
    {
        AllowExternalPrincipals = true,
    });
    var examplePrincipalAssociation = new Aws.Ram.PrincipalAssociation("examplePrincipalAssociation", new Aws.Ram.PrincipalAssociationArgs
    {
        Principal = "111111111111",
        ResourceShareArn = exampleResourceShare.Arn,
    });
}

}

AWS Organization

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.Ram.PrincipalAssociation("example", new Aws.Ram.PrincipalAssociationArgs
    {
        Principal = aws_organizations_organization.Example.Arn,
        ResourceShareArn = aws_ram_resource_share.Example.Arn,
    });
}

}

PrincipalAssociationArgs

PrincipalAssociationState

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,
    });
}

}

ResourceAssociationArgs

ResourceAssociationState

ResourceShare

Manages a Resource Access Manager (RAM) Resource Share. To associate principals with the share, see the aws.ram.PrincipalAssociation resource. To associate resources with the share, see the aws.ram.ResourceAssociation resource.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var example = new Aws.Ram.ResourceShare("example", new Aws.Ram.ResourceShareArgs
    {
        AllowExternalPrincipals = true,
        Tags = 
        {
            { "Environment", "Production" },
        },
    });
}

}

ResourceShareAccepter

Manage accepting a Resource Access Manager (RAM) Resource Share invitation. From a receiver AWS account, accept an invitation to share resources that were shared by a sender AWS account. To create a resource share in the sender, see the aws.ram.ResourceShare resource.

Note: If both AWS accounts are in the same Organization and RAM Sharing with AWS Organizations is enabled, this resource is not necessary as RAM Resource Share invitations are not used.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
public MyStack()
{
    var alternate = new Aws.Provider("alternate", new Aws.ProviderArgs
    {
        Profile = "profile1",
    });
    var senderShare = new Aws.Ram.ResourceShare("senderShare", new Aws.Ram.ResourceShareArgs
    {
        AllowExternalPrincipals = true,
        Tags = 
        {
            { "Name", "tf-test-resource-share" },
        },
    });
    var receiver = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
    var senderInvite = new Aws.Ram.PrincipalAssociation("senderInvite", new Aws.Ram.PrincipalAssociationArgs
    {
        Principal = receiver.Apply(receiver => receiver.AccountId),
        ResourceShareArn = senderShare.Arn,
    });
    var receiverAccept = new Aws.Ram.ResourceShareAccepter("receiverAccept", new Aws.Ram.ResourceShareAccepterArgs
    {
        ShareArn = senderInvite.ResourceShareArn,
    });
}

}

ResourceShareAccepterArgs

ResourceShareAccepterState

ResourceShareArgs

ResourceShareState

Back to top Copyright 2016-2020, Pulumi Corporation.