1. Packages
  2. AWS Native
  3. API Docs
  4. ec2
  5. InternetGateway

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

aws-native.ec2.InternetGateway

Explore with Pulumi AI

aws-native logo

AWS Native is in preview. AWS Classic is fully supported.

AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi

    Allocates an internet gateway for use with a VPC. After creating the Internet gateway, you then attach it to a VPC.

    Example Usage

    Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AwsNative = Pulumi.AwsNative;
    
    return await Deployment.RunAsync(() => 
    {
        var myInternetGateway = new AwsNative.Ec2.InternetGateway("myInternetGateway", new()
        {
            Tags = new[]
            {
                new AwsNative.Inputs.TagArgs
                {
                    Key = "stack",
                    Value = "production",
                },
            },
        });
    
    });
    
    package main
    
    import (
    	awsnative "github.com/pulumi/pulumi-aws-native/sdk/go/aws"
    	"github.com/pulumi/pulumi-aws-native/sdk/go/aws/ec2"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ec2.NewInternetGateway(ctx, "myInternetGateway", &ec2.InternetGatewayArgs{
    			Tags: aws.TagArray{
    				&aws.TagArgs{
    					Key:   pulumi.String("stack"),
    					Value: pulumi.String("production"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_aws_native as aws_native
    
    my_internet_gateway = aws_native.ec2.InternetGateway("myInternetGateway", tags=[aws_native.TagArgs(
        key="stack",
        value="production",
    )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws_native from "@pulumi/aws-native";
    
    const myInternetGateway = new aws_native.ec2.InternetGateway("myInternetGateway", {tags: [{
        key: "stack",
        value: "production",
    }]});
    

    Coming soon!

    Create InternetGateway Resource

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

    Constructor syntax

    new InternetGateway(name: string, args?: InternetGatewayArgs, opts?: CustomResourceOptions);
    @overload
    def InternetGateway(resource_name: str,
                        args: Optional[InternetGatewayArgs] = None,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def InternetGateway(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        tags: Optional[Sequence[_root_inputs.TagArgs]] = None)
    func NewInternetGateway(ctx *Context, name string, args *InternetGatewayArgs, opts ...ResourceOption) (*InternetGateway, error)
    public InternetGateway(string name, InternetGatewayArgs? args = null, CustomResourceOptions? opts = null)
    public InternetGateway(String name, InternetGatewayArgs args)
    public InternetGateway(String name, InternetGatewayArgs args, CustomResourceOptions options)
    
    type: aws-native:ec2:InternetGateway
    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 InternetGatewayArgs
    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 InternetGatewayArgs
    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 InternetGatewayArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InternetGatewayArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InternetGatewayArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    Coming soon!
    
    const internetGatewayResource = new aws_native.ec2.InternetGateway("internetGatewayResource", {tags: [{
        key: "string",
        value: "string",
    }]});
    
    Coming soon!
    

    InternetGateway 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 InternetGateway resource accepts the following input properties:

    Tags List<Pulumi.AwsNative.Inputs.Tag>
    Any tags to assign to the internet gateway.
    Tags TagArgs
    Any tags to assign to the internet gateway.
    tags List<Tag>
    Any tags to assign to the internet gateway.
    tags Tag[]
    Any tags to assign to the internet gateway.
    tags Sequence[TagArgs]
    Any tags to assign to the internet gateway.
    tags List<Property Map>
    Any tags to assign to the internet gateway.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    InternetGatewayId string
    Id string
    The provider-assigned unique ID for this managed resource.
    InternetGatewayId string
    id String
    The provider-assigned unique ID for this managed resource.
    internetGatewayId String
    id string
    The provider-assigned unique ID for this managed resource.
    internetGatewayId string
    id str
    The provider-assigned unique ID for this managed resource.
    internet_gateway_id str
    id String
    The provider-assigned unique ID for this managed resource.
    internetGatewayId String

    Supporting Types

    Tag, TagArgs

    Key string
    The key name of the tag
    Value string
    The value of the tag
    Key string
    The key name of the tag
    Value string
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag
    key string
    The key name of the tag
    value string
    The value of the tag
    key str
    The key name of the tag
    value str
    The value of the tag
    key String
    The key name of the tag
    value String
    The value of the tag

    Package Details

    Repository
    AWS Native pulumi/pulumi-aws-native
    License
    Apache-2.0
    aws-native logo

    AWS Native is in preview. AWS Classic is fully supported.

    AWS Native v0.102.0 published on Tuesday, Apr 16, 2024 by Pulumi