1. Packages
  2. AWS
  3. API Docs
  4. apprunner
  5. VpcConnector
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

aws.apprunner.VpcConnector

Explore with Pulumi AI

aws logo
AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi

    Manages an App Runner VPC Connector.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const connector = new aws.apprunner.VpcConnector("connector", {
        vpcConnectorName: "name",
        subnets: [
            "subnet1",
            "subnet2",
        ],
        securityGroups: [
            "sg1",
            "sg2",
        ],
    });
    
    import pulumi
    import pulumi_aws as aws
    
    connector = aws.apprunner.VpcConnector("connector",
        vpc_connector_name="name",
        subnets=[
            "subnet1",
            "subnet2",
        ],
        security_groups=[
            "sg1",
            "sg2",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/apprunner"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := apprunner.NewVpcConnector(ctx, "connector", &apprunner.VpcConnectorArgs{
    			VpcConnectorName: pulumi.String("name"),
    			Subnets: pulumi.StringArray{
    				pulumi.String("subnet1"),
    				pulumi.String("subnet2"),
    			},
    			SecurityGroups: pulumi.StringArray{
    				pulumi.String("sg1"),
    				pulumi.String("sg2"),
    			},
    		})
    		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 connector = new Aws.AppRunner.VpcConnector("connector", new()
        {
            VpcConnectorName = "name",
            Subnets = new[]
            {
                "subnet1",
                "subnet2",
            },
            SecurityGroups = new[]
            {
                "sg1",
                "sg2",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.apprunner.VpcConnector;
    import com.pulumi.aws.apprunner.VpcConnectorArgs;
    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) {
            var connector = new VpcConnector("connector", VpcConnectorArgs.builder()
                .vpcConnectorName("name")
                .subnets(            
                    "subnet1",
                    "subnet2")
                .securityGroups(            
                    "sg1",
                    "sg2")
                .build());
    
        }
    }
    
    resources:
      connector:
        type: aws:apprunner:VpcConnector
        properties:
          vpcConnectorName: name
          subnets:
            - subnet1
            - subnet2
          securityGroups:
            - sg1
            - sg2
    

    Create VpcConnector Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new VpcConnector(name: string, args: VpcConnectorArgs, opts?: CustomResourceOptions);
    @overload
    def VpcConnector(resource_name: str,
                     args: VpcConnectorArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def VpcConnector(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     security_groups: Optional[Sequence[str]] = None,
                     subnets: Optional[Sequence[str]] = None,
                     vpc_connector_name: Optional[str] = None,
                     tags: Optional[Mapping[str, str]] = None)
    func NewVpcConnector(ctx *Context, name string, args VpcConnectorArgs, opts ...ResourceOption) (*VpcConnector, error)
    public VpcConnector(string name, VpcConnectorArgs args, CustomResourceOptions? opts = null)
    public VpcConnector(String name, VpcConnectorArgs args)
    public VpcConnector(String name, VpcConnectorArgs args, CustomResourceOptions options)
    
    type: aws:apprunner:VpcConnector
    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 VpcConnectorArgs
    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 VpcConnectorArgs
    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 VpcConnectorArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VpcConnectorArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VpcConnectorArgs
    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 vpcConnectorResource = new Aws.AppRunner.VpcConnector("vpcConnectorResource", new()
    {
        SecurityGroups = new[]
        {
            "string",
        },
        Subnets = new[]
        {
            "string",
        },
        VpcConnectorName = "string",
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := apprunner.NewVpcConnector(ctx, "vpcConnectorResource", &apprunner.VpcConnectorArgs{
    	SecurityGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Subnets: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	VpcConnectorName: pulumi.String("string"),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    })
    
    var vpcConnectorResource = new VpcConnector("vpcConnectorResource", VpcConnectorArgs.builder()
        .securityGroups("string")
        .subnets("string")
        .vpcConnectorName("string")
        .tags(Map.of("string", "string"))
        .build());
    
    vpc_connector_resource = aws.apprunner.VpcConnector("vpcConnectorResource",
        security_groups=["string"],
        subnets=["string"],
        vpc_connector_name="string",
        tags={
            "string": "string",
        })
    
    const vpcConnectorResource = new aws.apprunner.VpcConnector("vpcConnectorResource", {
        securityGroups: ["string"],
        subnets: ["string"],
        vpcConnectorName: "string",
        tags: {
            string: "string",
        },
    });
    
    type: aws:apprunner:VpcConnector
    properties:
        securityGroups:
            - string
        subnets:
            - string
        tags:
            string: string
        vpcConnectorName: string
    

    VpcConnector Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The VpcConnector resource accepts the following input properties:

    SecurityGroups List<string>
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    Subnets List<string>
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    VpcConnectorName string
    Name for the VPC connector.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    SecurityGroups []string
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    Subnets []string
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    VpcConnectorName string
    Name for the VPC connector.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    securityGroups List<String>
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    subnets List<String>
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    vpcConnectorName String
    Name for the VPC connector.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    securityGroups string[]
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    subnets string[]
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    vpcConnectorName string
    Name for the VPC connector.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    security_groups Sequence[str]
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    subnets Sequence[str]
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    vpc_connector_name str
    Name for the VPC connector.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    securityGroups List<String>
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    subnets List<String>
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    vpcConnectorName String
    Name for the VPC connector.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the VpcConnector resource produces the following output properties:

    Arn string
    ARN of VPC connector.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcConnectorRevision int
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    Arn string
    ARN of VPC connector.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcConnectorRevision int
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn String
    ARN of VPC connector.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcConnectorRevision Integer
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn string
    ARN of VPC connector.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcConnectorRevision number
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn str
    ARN of VPC connector.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpc_connector_revision int
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn String
    ARN of VPC connector.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcConnectorRevision Number
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.

    Look up Existing VpcConnector Resource

    Get an existing VpcConnector 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?: VpcConnectorState, opts?: CustomResourceOptions): VpcConnector
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            arn: Optional[str] = None,
            security_groups: Optional[Sequence[str]] = None,
            status: Optional[str] = None,
            subnets: Optional[Sequence[str]] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            vpc_connector_name: Optional[str] = None,
            vpc_connector_revision: Optional[int] = None) -> VpcConnector
    func GetVpcConnector(ctx *Context, name string, id IDInput, state *VpcConnectorState, opts ...ResourceOption) (*VpcConnector, error)
    public static VpcConnector Get(string name, Input<string> id, VpcConnectorState? state, CustomResourceOptions? opts = null)
    public static VpcConnector get(String name, Output<String> id, VpcConnectorState 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.
    The following state arguments are supported:
    Arn string
    ARN of VPC connector.
    SecurityGroups List<string>
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    Status string
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    Subnets List<string>
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    Tags Dictionary<string, string>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll Dictionary<string, string>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcConnectorName string
    Name for the VPC connector.
    VpcConnectorRevision int
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    Arn string
    ARN of VPC connector.
    SecurityGroups []string
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    Status string
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    Subnets []string
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    Tags map[string]string
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    TagsAll map[string]string
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    VpcConnectorName string
    Name for the VPC connector.
    VpcConnectorRevision int
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn String
    ARN of VPC connector.
    securityGroups List<String>
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    status String
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    subnets List<String>
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    tags Map<String,String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String,String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcConnectorName String
    Name for the VPC connector.
    vpcConnectorRevision Integer
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn string
    ARN of VPC connector.
    securityGroups string[]
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    status string
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    subnets string[]
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    tags {[key: string]: string}
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll {[key: string]: string}
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcConnectorName string
    Name for the VPC connector.
    vpcConnectorRevision number
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn str
    ARN of VPC connector.
    security_groups Sequence[str]
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    status str
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    subnets Sequence[str]
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    tags Mapping[str, str]
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tags_all Mapping[str, str]
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpc_connector_name str
    Name for the VPC connector.
    vpc_connector_revision int
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.
    arn String
    ARN of VPC connector.
    securityGroups List<String>
    List of IDs of security groups that App Runner should use for access to AWS resources under the specified subnets. If not specified, App Runner uses the default security group of the Amazon VPC. The default security group allows all outbound traffic.
    status String
    Current state of the VPC connector. If the status of a connector revision is INACTIVE, it was deleted and can't be used. Inactive connector revisions are permanently removed some time after they are deleted.
    subnets List<String>
    List of IDs of subnets that App Runner should use when it associates your service with a custom Amazon VPC. Specify IDs of subnets of a single Amazon VPC. App Runner determines the Amazon VPC from the subnets you specify.
    tags Map<String>
    Key-value map of resource tags. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.
    tagsAll Map<String>
    Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

    Deprecated: Please use tags instead.

    vpcConnectorName String
    Name for the VPC connector.
    vpcConnectorRevision Number
    The revision of VPC connector. It's unique among all the active connectors ("Status": "ACTIVE") that share the same Name.

    Import

    Using pulumi import, import App Runner vpc connector using the arn. For example:

    $ pulumi import aws:apprunner/vpcConnector:VpcConnector example arn:aws:apprunner:us-east-1:1234567890:vpcconnector/example/1/0a03292a89764e5882c41d8f991c82fe
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.60.0 published on Tuesday, Nov 19, 2024 by Pulumi