VpcEndpointServiceAllowedPrinciple

Provides a resource to allow a principal to discover a VPC endpoint service.

NOTE on VPC Endpoint Services and VPC Endpoint Service Allowed Principals: This provider provides both a standalone VPC Endpoint Service Allowed Principal resource and a VPC Endpoint Service resource with an allowed_principals attribute. Do not use the same principal ARN in both a VPC Endpoint Service resource and a VPC Endpoint Service Allowed Principal resource. Doing so will cause a conflict and will overwrite the association.

Example Usage

using Pulumi;
using Aws = Pulumi.Aws;

class MyStack : Stack
{
    public MyStack()
    {
        var current = Output.Create(Aws.GetCallerIdentity.InvokeAsync());
        var allowMeToFoo = new Aws.Ec2.VpcEndpointServiceAllowedPrinciple("allowMeToFoo", new Aws.Ec2.VpcEndpointServiceAllowedPrincipleArgs
        {
            VpcEndpointServiceId = aws_vpc_endpoint_service.Foo.Id,
            PrincipalArn = current.Apply(current => current.Arn),
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws"
	"github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		current, err := aws.GetCallerIdentity(ctx, nil, nil)
		if err != nil {
			return err
		}
		_, err = ec2.NewVpcEndpointServiceAllowedPrinciple(ctx, "allowMeToFoo", &ec2.VpcEndpointServiceAllowedPrincipleArgs{
			VpcEndpointServiceId: pulumi.Any(aws_vpc_endpoint_service.Foo.Id),
			PrincipalArn:         pulumi.String(current.Arn),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_aws as aws

current = aws.get_caller_identity()
allow_me_to_foo = aws.ec2.VpcEndpointServiceAllowedPrinciple("allowMeToFoo",
    vpc_endpoint_service_id=aws_vpc_endpoint_service["foo"]["id"],
    principal_arn=current.arn)
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";

const current = aws.getCallerIdentity({});
const allowMeToFoo = new aws.ec2.VpcEndpointServiceAllowedPrinciple("allowMeToFoo", {
    vpcEndpointServiceId: aws_vpc_endpoint_service.foo.id,
    principalArn: current.then(current => current.arn),
});

Create a VpcEndpointServiceAllowedPrinciple Resource

new VpcEndpointServiceAllowedPrinciple(name: string, args: VpcEndpointServiceAllowedPrincipleArgs, opts?: CustomResourceOptions);
@overload
def VpcEndpointServiceAllowedPrinciple(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       principal_arn: Optional[str] = None,
                                       vpc_endpoint_service_id: Optional[str] = None)
@overload
def VpcEndpointServiceAllowedPrinciple(resource_name: str,
                                       args: VpcEndpointServiceAllowedPrincipleArgs,
                                       opts: Optional[ResourceOptions] = None)
func NewVpcEndpointServiceAllowedPrinciple(ctx *Context, name string, args VpcEndpointServiceAllowedPrincipleArgs, opts ...ResourceOption) (*VpcEndpointServiceAllowedPrinciple, error)
public VpcEndpointServiceAllowedPrinciple(string name, VpcEndpointServiceAllowedPrincipleArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args VpcEndpointServiceAllowedPrincipleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args VpcEndpointServiceAllowedPrincipleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args VpcEndpointServiceAllowedPrincipleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args VpcEndpointServiceAllowedPrincipleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

VpcEndpointServiceAllowedPrinciple Resource Properties

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

Inputs

The VpcEndpointServiceAllowedPrinciple resource accepts the following input properties:

PrincipalArn string
The ARN of the principal to allow permissions.
VpcEndpointServiceId string
The ID of the VPC endpoint service to allow permission.
PrincipalArn string
The ARN of the principal to allow permissions.
VpcEndpointServiceId string
The ID of the VPC endpoint service to allow permission.
principalArn string
The ARN of the principal to allow permissions.
vpcEndpointServiceId string
The ID of the VPC endpoint service to allow permission.
principal_arn str
The ARN of the principal to allow permissions.
vpc_endpoint_service_id str
The ID of the VPC endpoint service to allow permission.

Outputs

All input properties are implicitly available as output properties. Additionally, the VpcEndpointServiceAllowedPrinciple 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 VpcEndpointServiceAllowedPrinciple Resource

Get an existing VpcEndpointServiceAllowedPrinciple 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?: VpcEndpointServiceAllowedPrincipleState, opts?: CustomResourceOptions): VpcEndpointServiceAllowedPrinciple
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        principal_arn: Optional[str] = None,
        vpc_endpoint_service_id: Optional[str] = None) -> VpcEndpointServiceAllowedPrinciple
func GetVpcEndpointServiceAllowedPrinciple(ctx *Context, name string, id IDInput, state *VpcEndpointServiceAllowedPrincipleState, opts ...ResourceOption) (*VpcEndpointServiceAllowedPrinciple, error)
public static VpcEndpointServiceAllowedPrinciple Get(string name, Input<string> id, VpcEndpointServiceAllowedPrincipleState? 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:

PrincipalArn string
The ARN of the principal to allow permissions.
VpcEndpointServiceId string
The ID of the VPC endpoint service to allow permission.
PrincipalArn string
The ARN of the principal to allow permissions.
VpcEndpointServiceId string
The ID of the VPC endpoint service to allow permission.
principalArn string
The ARN of the principal to allow permissions.
vpcEndpointServiceId string
The ID of the VPC endpoint service to allow permission.
principal_arn str
The ARN of the principal to allow permissions.
vpc_endpoint_service_id str
The ID of the VPC endpoint service to allow permission.

Package Details

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