ram

package
v2.13.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetResourceShareFilter

type GetResourceShareFilter struct {
	// The name of the tag key to filter on.
	Name string `pulumi:"name"`
	// The value of the tag key.
	Values []string `pulumi:"values"`
}

type GetResourceShareFilterArgs

type GetResourceShareFilterArgs struct {
	// The name of the tag key to filter on.
	Name pulumi.StringInput `pulumi:"name"`
	// The value of the tag key.
	Values pulumi.StringArrayInput `pulumi:"values"`
}

func (GetResourceShareFilterArgs) ElementType

func (GetResourceShareFilterArgs) ElementType() reflect.Type

func (GetResourceShareFilterArgs) ToGetResourceShareFilterOutput

func (i GetResourceShareFilterArgs) ToGetResourceShareFilterOutput() GetResourceShareFilterOutput

func (GetResourceShareFilterArgs) ToGetResourceShareFilterOutputWithContext

func (i GetResourceShareFilterArgs) ToGetResourceShareFilterOutputWithContext(ctx context.Context) GetResourceShareFilterOutput

type GetResourceShareFilterArray

type GetResourceShareFilterArray []GetResourceShareFilterInput

func (GetResourceShareFilterArray) ElementType

func (GetResourceShareFilterArray) ToGetResourceShareFilterArrayOutput

func (i GetResourceShareFilterArray) ToGetResourceShareFilterArrayOutput() GetResourceShareFilterArrayOutput

func (GetResourceShareFilterArray) ToGetResourceShareFilterArrayOutputWithContext

func (i GetResourceShareFilterArray) ToGetResourceShareFilterArrayOutputWithContext(ctx context.Context) GetResourceShareFilterArrayOutput

type GetResourceShareFilterArrayInput

type GetResourceShareFilterArrayInput interface {
	pulumi.Input

	ToGetResourceShareFilterArrayOutput() GetResourceShareFilterArrayOutput
	ToGetResourceShareFilterArrayOutputWithContext(context.Context) GetResourceShareFilterArrayOutput
}

GetResourceShareFilterArrayInput is an input type that accepts GetResourceShareFilterArray and GetResourceShareFilterArrayOutput values. You can construct a concrete instance of `GetResourceShareFilterArrayInput` via:

GetResourceShareFilterArray{ GetResourceShareFilterArgs{...} }

type GetResourceShareFilterArrayOutput

type GetResourceShareFilterArrayOutput struct{ *pulumi.OutputState }

func (GetResourceShareFilterArrayOutput) ElementType

func (GetResourceShareFilterArrayOutput) Index

func (GetResourceShareFilterArrayOutput) ToGetResourceShareFilterArrayOutput

func (o GetResourceShareFilterArrayOutput) ToGetResourceShareFilterArrayOutput() GetResourceShareFilterArrayOutput

func (GetResourceShareFilterArrayOutput) ToGetResourceShareFilterArrayOutputWithContext

func (o GetResourceShareFilterArrayOutput) ToGetResourceShareFilterArrayOutputWithContext(ctx context.Context) GetResourceShareFilterArrayOutput

type GetResourceShareFilterInput

type GetResourceShareFilterInput interface {
	pulumi.Input

	ToGetResourceShareFilterOutput() GetResourceShareFilterOutput
	ToGetResourceShareFilterOutputWithContext(context.Context) GetResourceShareFilterOutput
}

GetResourceShareFilterInput is an input type that accepts GetResourceShareFilterArgs and GetResourceShareFilterOutput values. You can construct a concrete instance of `GetResourceShareFilterInput` via:

GetResourceShareFilterArgs{...}

type GetResourceShareFilterOutput

type GetResourceShareFilterOutput struct{ *pulumi.OutputState }

func (GetResourceShareFilterOutput) ElementType

func (GetResourceShareFilterOutput) Name

The name of the tag key to filter on.

func (GetResourceShareFilterOutput) ToGetResourceShareFilterOutput

func (o GetResourceShareFilterOutput) ToGetResourceShareFilterOutput() GetResourceShareFilterOutput

func (GetResourceShareFilterOutput) ToGetResourceShareFilterOutputWithContext

func (o GetResourceShareFilterOutput) ToGetResourceShareFilterOutputWithContext(ctx context.Context) GetResourceShareFilterOutput

func (GetResourceShareFilterOutput) Values

The value of the tag key.

type LookupResourceShareArgs

type LookupResourceShareArgs struct {
	// A filter used to scope the list e.g. by tags. See [related docs] (https://docs.aws.amazon.com/ram/latest/APIReference/API_TagFilter.html).
	Filters []GetResourceShareFilter `pulumi:"filters"`
	// The name of the tag key to filter on.
	Name string `pulumi:"name"`
	// The owner of the resource share. Valid values are SELF or OTHER-ACCOUNTS
	ResourceOwner string `pulumi:"resourceOwner"`
	// The Tags attached to the RAM share
	Tags map[string]string `pulumi:"tags"`
}

A collection of arguments for invoking getResourceShare.

type LookupResourceShareResult

type LookupResourceShareResult struct {
	// The Amazon Resource Name (ARN) of the resource share.
	Arn     string                   `pulumi:"arn"`
	Filters []GetResourceShareFilter `pulumi:"filters"`
	// The provider-assigned unique ID for this managed resource.
	Id   string `pulumi:"id"`
	Name string `pulumi:"name"`
	// The ID of the AWS account that owns the resource share.
	OwningAccountId string `pulumi:"owningAccountId"`
	ResourceOwner   string `pulumi:"resourceOwner"`
	// The Status of the RAM share.
	Status string `pulumi:"status"`
	// The Tags attached to the RAM share
	Tags map[string]string `pulumi:"tags"`
}

A collection of values returned by getResourceShare.

func LookupResourceShare

func LookupResourceShare(ctx *pulumi.Context, args *LookupResourceShareArgs, opts ...pulumi.InvokeOption) (*LookupResourceShareResult, error)

`ram.ResourceShare` Retrieve information about a RAM Resource Share.

## Example Usage

```go 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.LookupResourceShare(ctx, &ram.LookupResourceShareArgs{
			Name:          "example",
			ResourceOwner: "SELF",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Search by filters

```go 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.LookupResourceShare(ctx, &ram.LookupResourceShareArgs{
			Filters: []ram.GetResourceShareFilter{
				ram.GetResourceShareFilter{
					Name: "NameOfTag",
					Values: []string{
						"exampleNameTagValue",
					},
				},
			},
			Name:          "MyResourceName",
			ResourceOwner: "SELF",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type PrincipalAssociation

type PrincipalAssociation struct {
	pulumi.CustomResourceState

	// The principal to associate with the resource share. Possible values are an AWS account ID, an AWS Organizations Organization ARN, or an AWS Organizations Organization Unit ARN.
	Principal pulumi.StringOutput `pulumi:"principal"`
	// The Amazon Resource Name (ARN) of the resource share.
	ResourceShareArn pulumi.StringOutput `pulumi:"resourceShareArn"`
}

Provides a Resource Access Manager (RAM) principal association. Depending if [RAM Sharing with AWS Organizations is enabled](https://docs.aws.amazon.com/ram/latest/userguide/getting-started-sharing.html#getting-started-sharing-orgs), 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 `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 `ram.ResourceShareAccepter` resource to accept these invitations.

## Example Usage ### AWS Account ID

```go 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 {
		exampleResourceShare, err := ram.NewResourceShare(ctx, "exampleResourceShare", &ram.ResourceShareArgs{
			AllowExternalPrincipals: pulumi.Bool(true),
		})
		if err != nil {
			return err
		}
		_, err = ram.NewPrincipalAssociation(ctx, "examplePrincipalAssociation", &ram.PrincipalAssociationArgs{
			Principal:        pulumi.String("111111111111"),
			ResourceShareArn: exampleResourceShare.Arn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### AWS Organization

```go 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.NewPrincipalAssociation(ctx, "example", &ram.PrincipalAssociationArgs{
			Principal:        pulumi.String(aws_organizations_organization.Example.Arn),
			ResourceShareArn: pulumi.String(aws_ram_resource_share.Example.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetPrincipalAssociation

func GetPrincipalAssociation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *PrincipalAssociationState, opts ...pulumi.ResourceOption) (*PrincipalAssociation, error)

GetPrincipalAssociation gets an existing PrincipalAssociation resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewPrincipalAssociation

func NewPrincipalAssociation(ctx *pulumi.Context,
	name string, args *PrincipalAssociationArgs, opts ...pulumi.ResourceOption) (*PrincipalAssociation, error)

NewPrincipalAssociation registers a new resource with the given unique name, arguments, and options.

type PrincipalAssociationArgs

type PrincipalAssociationArgs struct {
	// The principal to associate with the resource share. Possible values are an AWS account ID, an AWS Organizations Organization ARN, or an AWS Organizations Organization Unit ARN.
	Principal pulumi.StringInput
	// The Amazon Resource Name (ARN) of the resource share.
	ResourceShareArn pulumi.StringInput
}

The set of arguments for constructing a PrincipalAssociation resource.

func (PrincipalAssociationArgs) ElementType

func (PrincipalAssociationArgs) ElementType() reflect.Type

type PrincipalAssociationState

type PrincipalAssociationState struct {
	// The principal to associate with the resource share. Possible values are an AWS account ID, an AWS Organizations Organization ARN, or an AWS Organizations Organization Unit ARN.
	Principal pulumi.StringPtrInput
	// The Amazon Resource Name (ARN) of the resource share.
	ResourceShareArn pulumi.StringPtrInput
}

func (PrincipalAssociationState) ElementType

func (PrincipalAssociationState) ElementType() reflect.Type

type ResourceAssociation

type ResourceAssociation struct {
	pulumi.CustomResourceState

	// Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
	ResourceArn pulumi.StringOutput `pulumi:"resourceArn"`
	// Amazon Resource Name (ARN) of the RAM Resource Share.
	ResourceShareArn pulumi.StringOutput `pulumi:"resourceShareArn"`
}

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](https://docs.aws.amazon.com/ram/latest/userguide/what-is.html) and AWS service specific documentation for additional information.

## Example Usage

```go 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
	})
}

```

func GetResourceAssociation

func GetResourceAssociation(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ResourceAssociationState, opts ...pulumi.ResourceOption) (*ResourceAssociation, error)

GetResourceAssociation gets an existing ResourceAssociation resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewResourceAssociation

func NewResourceAssociation(ctx *pulumi.Context,
	name string, args *ResourceAssociationArgs, opts ...pulumi.ResourceOption) (*ResourceAssociation, error)

NewResourceAssociation registers a new resource with the given unique name, arguments, and options.

type ResourceAssociationArgs

type ResourceAssociationArgs struct {
	// Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
	ResourceArn pulumi.StringInput
	// Amazon Resource Name (ARN) of the RAM Resource Share.
	ResourceShareArn pulumi.StringInput
}

The set of arguments for constructing a ResourceAssociation resource.

func (ResourceAssociationArgs) ElementType

func (ResourceAssociationArgs) ElementType() reflect.Type

type ResourceAssociationState

type ResourceAssociationState struct {
	// Amazon Resource Name (ARN) of the resource to associate with the RAM Resource Share.
	ResourceArn pulumi.StringPtrInput
	// Amazon Resource Name (ARN) of the RAM Resource Share.
	ResourceShareArn pulumi.StringPtrInput
}

func (ResourceAssociationState) ElementType

func (ResourceAssociationState) ElementType() reflect.Type

type ResourceShare

type ResourceShare struct {
	pulumi.CustomResourceState

	// Indicates whether principals outside your organization can be associated with a resource share.
	AllowExternalPrincipals pulumi.BoolPtrOutput `pulumi:"allowExternalPrincipals"`
	// The Amazon Resource Name (ARN) of the resource share.
	Arn pulumi.StringOutput `pulumi:"arn"`
	// The name of the resource share.
	Name pulumi.StringOutput `pulumi:"name"`
	// A map of tags to assign to the resource share.
	Tags pulumi.StringMapOutput `pulumi:"tags"`
}

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

## Example Usage

```go 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.NewResourceShare(ctx, "example", &ram.ResourceShareArgs{
			AllowExternalPrincipals: pulumi.Bool(true),
			Tags: pulumi.StringMap{
				"Environment": pulumi.String("Production"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetResourceShare

func GetResourceShare(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ResourceShareState, opts ...pulumi.ResourceOption) (*ResourceShare, error)

GetResourceShare gets an existing ResourceShare resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewResourceShare

func NewResourceShare(ctx *pulumi.Context,
	name string, args *ResourceShareArgs, opts ...pulumi.ResourceOption) (*ResourceShare, error)

NewResourceShare registers a new resource with the given unique name, arguments, and options.

type ResourceShareAccepter

type ResourceShareAccepter struct {
	pulumi.CustomResourceState

	// The ARN of the resource share invitation.
	InvitationArn pulumi.StringOutput `pulumi:"invitationArn"`
	// The account ID of the receiver account which accepts the invitation.
	ReceiverAccountId pulumi.StringOutput `pulumi:"receiverAccountId"`
	// A list of the resource ARNs shared via the resource share.
	Resources pulumi.StringArrayOutput `pulumi:"resources"`
	// The account ID of the sender account which submits the invitation.
	SenderAccountId pulumi.StringOutput `pulumi:"senderAccountId"`
	// The ARN of the resource share.
	ShareArn pulumi.StringOutput `pulumi:"shareArn"`
	// The ID of the resource share as displayed in the console.
	ShareId pulumi.StringOutput `pulumi:"shareId"`
	// The name of the resource share.
	ShareName pulumi.StringOutput `pulumi:"shareName"`
	// The status of the resource share (ACTIVE, PENDING, FAILED, DELETING, DELETED).
	Status pulumi.StringOutput `pulumi:"status"`
}

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 `ram.ResourceShare` resource.

> **Note:** If both AWS accounts are in the same Organization and [RAM Sharing with AWS Organizations is enabled](https://docs.aws.amazon.com/ram/latest/userguide/getting-started-sharing.html#getting-started-sharing-orgs), this resource is not necessary as RAM Resource Share invitations are not used.

## Example Usage

This configuration provides an example of using multiple AWS providers to configure two different AWS accounts. In the _sender_ account, the configuration creates a `ram.ResourceShare` and uses a data source in the _receiver_ account to create a `ram.PrincipalAssociation` resource with the _receiver's_ account ID. In the _receiver_ account, the configuration accepts the invitation to share resources with the `ram.ResourceShareAccepter`.

```go package main

import (

"github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/providers"
"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 := providers.Newaws(ctx, "alternate", &providers.awsArgs{
			Profile: pulumi.String("profile1"),
		})
		if err != nil {
			return err
		}
		senderShare, err := ram.NewResourceShare(ctx, "senderShare", &ram.ResourceShareArgs{
			AllowExternalPrincipals: pulumi.Bool(true),
			Tags: pulumi.StringMap{
				"Name": pulumi.String("tf-test-resource-share"),
			},
		}, pulumi.Provider("aws.alternate"))
		if err != nil {
			return err
		}
		receiver, err := aws.GetCallerIdentity(ctx, nil, nil)
		if err != nil {
			return err
		}
		senderInvite, err := ram.NewPrincipalAssociation(ctx, "senderInvite", &ram.PrincipalAssociationArgs{
			Principal:        pulumi.String(receiver.AccountId),
			ResourceShareArn: senderShare.Arn,
		}, pulumi.Provider("aws.alternate"))
		if err != nil {
			return err
		}
		_, err = ram.NewResourceShareAccepter(ctx, "receiverAccept", &ram.ResourceShareAccepterArgs{
			ShareArn: senderInvite.ResourceShareArn,
		})
		if err != nil {
			return err
		}
		return nil
	})
}

```

func GetResourceShareAccepter

func GetResourceShareAccepter(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *ResourceShareAccepterState, opts ...pulumi.ResourceOption) (*ResourceShareAccepter, error)

GetResourceShareAccepter gets an existing ResourceShareAccepter resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewResourceShareAccepter

func NewResourceShareAccepter(ctx *pulumi.Context,
	name string, args *ResourceShareAccepterArgs, opts ...pulumi.ResourceOption) (*ResourceShareAccepter, error)

NewResourceShareAccepter registers a new resource with the given unique name, arguments, and options.

type ResourceShareAccepterArgs

type ResourceShareAccepterArgs struct {
	// The ARN of the resource share.
	ShareArn pulumi.StringInput
}

The set of arguments for constructing a ResourceShareAccepter resource.

func (ResourceShareAccepterArgs) ElementType

func (ResourceShareAccepterArgs) ElementType() reflect.Type

type ResourceShareAccepterState

type ResourceShareAccepterState struct {
	// The ARN of the resource share invitation.
	InvitationArn pulumi.StringPtrInput
	// The account ID of the receiver account which accepts the invitation.
	ReceiverAccountId pulumi.StringPtrInput
	// A list of the resource ARNs shared via the resource share.
	Resources pulumi.StringArrayInput
	// The account ID of the sender account which submits the invitation.
	SenderAccountId pulumi.StringPtrInput
	// The ARN of the resource share.
	ShareArn pulumi.StringPtrInput
	// The ID of the resource share as displayed in the console.
	ShareId pulumi.StringPtrInput
	// The name of the resource share.
	ShareName pulumi.StringPtrInput
	// The status of the resource share (ACTIVE, PENDING, FAILED, DELETING, DELETED).
	Status pulumi.StringPtrInput
}

func (ResourceShareAccepterState) ElementType

func (ResourceShareAccepterState) ElementType() reflect.Type

type ResourceShareArgs

type ResourceShareArgs struct {
	// Indicates whether principals outside your organization can be associated with a resource share.
	AllowExternalPrincipals pulumi.BoolPtrInput
	// The name of the resource share.
	Name pulumi.StringPtrInput
	// A map of tags to assign to the resource share.
	Tags pulumi.StringMapInput
}

The set of arguments for constructing a ResourceShare resource.

func (ResourceShareArgs) ElementType

func (ResourceShareArgs) ElementType() reflect.Type

type ResourceShareState

type ResourceShareState struct {
	// Indicates whether principals outside your organization can be associated with a resource share.
	AllowExternalPrincipals pulumi.BoolPtrInput
	// The Amazon Resource Name (ARN) of the resource share.
	Arn pulumi.StringPtrInput
	// The name of the resource share.
	Name pulumi.StringPtrInput
	// A map of tags to assign to the resource share.
	Tags pulumi.StringMapInput
}

func (ResourceShareState) ElementType

func (ResourceShareState) ElementType() reflect.Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL