Try AWS Native preview for resources not in the classic version.
aws.ec2.VpcEndpointServiceAllowedPrinciple
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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
Basic usage:
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const current = aws.getCallerIdentity({});
const allowMeToFoo = new aws.ec2.VpcEndpointServiceAllowedPrinciple("allow_me_to_foo", {
vpcEndpointServiceId: foo.id,
principalArn: current.then(current => current.arn),
});
import pulumi
import pulumi_aws as aws
current = aws.get_caller_identity()
allow_me_to_foo = aws.ec2.VpcEndpointServiceAllowedPrinciple("allow_me_to_foo",
vpc_endpoint_service_id=foo["id"],
principal_arn=current.arn)
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws"
"github.com/pulumi/pulumi-aws/sdk/v6/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, "allow_me_to_foo", &ec2.VpcEndpointServiceAllowedPrincipleArgs{
VpcEndpointServiceId: pulumi.Any(foo.Id),
PrincipalArn: pulumi.String(current.Arn),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var current = Aws.GetCallerIdentity.Invoke();
var allowMeToFoo = new Aws.Ec2.VpcEndpointServiceAllowedPrinciple("allow_me_to_foo", new()
{
VpcEndpointServiceId = foo.Id,
PrincipalArn = current.Apply(getCallerIdentityResult => getCallerIdentityResult.Arn),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.AwsFunctions;
import com.pulumi.aws.inputs.GetCallerIdentityArgs;
import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrinciple;
import com.pulumi.aws.ec2.VpcEndpointServiceAllowedPrincipleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var current = AwsFunctions.getCallerIdentity();
var allowMeToFoo = new VpcEndpointServiceAllowedPrinciple("allowMeToFoo", VpcEndpointServiceAllowedPrincipleArgs.builder()
.vpcEndpointServiceId(foo.id())
.principalArn(current.applyValue(getCallerIdentityResult -> getCallerIdentityResult.arn()))
.build());
}
}
resources:
allowMeToFoo:
type: aws:ec2:VpcEndpointServiceAllowedPrinciple
name: allow_me_to_foo
properties:
vpcEndpointServiceId: ${foo.id}
principalArn: ${current.arn}
variables:
current:
fn::invoke:
Function: aws:getCallerIdentity
Arguments: {}
Create VpcEndpointServiceAllowedPrinciple Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VpcEndpointServiceAllowedPrinciple(name: string, args: VpcEndpointServiceAllowedPrincipleArgs, opts?: CustomResourceOptions);
@overload
def VpcEndpointServiceAllowedPrinciple(resource_name: str,
args: VpcEndpointServiceAllowedPrincipleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def VpcEndpointServiceAllowedPrinciple(resource_name: str,
opts: Optional[ResourceOptions] = None,
principal_arn: Optional[str] = None,
vpc_endpoint_service_id: Optional[str] = None)
func NewVpcEndpointServiceAllowedPrinciple(ctx *Context, name string, args VpcEndpointServiceAllowedPrincipleArgs, opts ...ResourceOption) (*VpcEndpointServiceAllowedPrinciple, error)
public VpcEndpointServiceAllowedPrinciple(string name, VpcEndpointServiceAllowedPrincipleArgs args, CustomResourceOptions? opts = null)
public VpcEndpointServiceAllowedPrinciple(String name, VpcEndpointServiceAllowedPrincipleArgs args)
public VpcEndpointServiceAllowedPrinciple(String name, VpcEndpointServiceAllowedPrincipleArgs args, CustomResourceOptions options)
type: aws:ec2:VpcEndpointServiceAllowedPrinciple
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- 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.
- name String
- The unique name of the resource.
- args VpcEndpointServiceAllowedPrincipleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var vpcEndpointServiceAllowedPrincipleResource = new Aws.Ec2.VpcEndpointServiceAllowedPrinciple("vpcEndpointServiceAllowedPrincipleResource", new()
{
PrincipalArn = "string",
VpcEndpointServiceId = "string",
});
example, err := ec2.NewVpcEndpointServiceAllowedPrinciple(ctx, "vpcEndpointServiceAllowedPrincipleResource", &ec2.VpcEndpointServiceAllowedPrincipleArgs{
PrincipalArn: pulumi.String("string"),
VpcEndpointServiceId: pulumi.String("string"),
})
var vpcEndpointServiceAllowedPrincipleResource = new VpcEndpointServiceAllowedPrinciple("vpcEndpointServiceAllowedPrincipleResource", VpcEndpointServiceAllowedPrincipleArgs.builder()
.principalArn("string")
.vpcEndpointServiceId("string")
.build());
vpc_endpoint_service_allowed_principle_resource = aws.ec2.VpcEndpointServiceAllowedPrinciple("vpcEndpointServiceAllowedPrincipleResource",
principal_arn="string",
vpc_endpoint_service_id="string")
const vpcEndpointServiceAllowedPrincipleResource = new aws.ec2.VpcEndpointServiceAllowedPrinciple("vpcEndpointServiceAllowedPrincipleResource", {
principalArn: "string",
vpcEndpointServiceId: "string",
});
type: aws:ec2:VpcEndpointServiceAllowedPrinciple
properties:
principalArn: string
vpcEndpointServiceId: string
VpcEndpointServiceAllowedPrinciple Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts 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 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.
- 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.
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 string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up 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)
public static VpcEndpointServiceAllowedPrinciple get(String name, Output<String> id, VpcEndpointServiceAllowedPrincipleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- 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.
- 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.
- 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 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.
- 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.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.