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_principalsattribute. 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
{
PrincipalArn = current.Apply(current => current.Arn),
VpcEndpointServiceId = aws_vpc_endpoint_service.Foo.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/ec2"
"github.com/pulumi/pulumi/sdk/v2/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{
PrincipalArn: pulumi.String(current.Arn),
VpcEndpointServiceId: pulumi.String(aws_vpc_endpoint_service.Foo.Id),
})
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",
principal_arn=current.arn,
vpc_endpoint_service_id=aws_vpc_endpoint_service["foo"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = pulumi.output(aws.getCallerIdentity({ async: true }));
const allowMeToFoo = new aws.ec2.VpcEndpointServiceAllowedPrinciple("allow_me_to_foo", {
principalArn: current.arn,
vpcEndpointServiceId: aws_vpc_endpoint_service_foo.id,
});Create a VpcEndpointServiceAllowedPrinciple Resource
new VpcEndpointServiceAllowedPrinciple(name: string, args: VpcEndpointServiceAllowedPrincipleArgs, opts?: CustomResourceOptions);def VpcEndpointServiceAllowedPrinciple(resource_name, opts=None, principal_arn=None, vpc_endpoint_service_id=None, __props__=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.
- 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 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:
- Principal
Arn string The ARN of the principal to allow permissions.
- Vpc
Endpoint stringService Id The ID of the VPC endpoint service to allow permission.
- Principal
Arn string The ARN of the principal to allow permissions.
- Vpc
Endpoint stringService Id The ID of the VPC endpoint service to allow permission.
- principal
Arn string The ARN of the principal to allow permissions.
- vpc
Endpoint stringService Id The ID of the VPC endpoint service to allow permission.
- principal_
arn str The ARN of the principal to allow permissions.
- vpc_
endpoint_ strservice_ id 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:
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): VpcEndpointServiceAllowedPrinciplestatic get(resource_name, id, opts=None, principal_arn=None, vpc_endpoint_service_id=None, __props__=None);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:
- Principal
Arn string The ARN of the principal to allow permissions.
- Vpc
Endpoint stringService Id The ID of the VPC endpoint service to allow permission.
- Principal
Arn string The ARN of the principal to allow permissions.
- Vpc
Endpoint stringService Id The ID of the VPC endpoint service to allow permission.
- principal
Arn string The ARN of the principal to allow permissions.
- vpc
Endpoint stringService Id The ID of the VPC endpoint service to allow permission.
- principal_
arn str The ARN of the principal to allow permissions.
- vpc_
endpoint_ strservice_ id 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
awsTerraform Provider.