AWS Native is in preview. AWS Classic is fully supported.
aws-native.ec2.InternetGateway
Explore with Pulumi AI
AWS Native is in preview. AWS Classic is fully supported.
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.
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:
- List<Pulumi.
Aws Native. Inputs. Tag> - Any tags to assign to the internet gateway.
- Tag
Args - Any tags to assign to the internet gateway.
- List<Tag>
- Any tags to assign to the internet gateway.
- Tag[]
- Any tags to assign to the internet gateway.
- Sequence[Tag
Args] - Any tags to assign to the internet gateway.
- 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.
- Internet
Gateway stringId - The ID of the internet gateway.
- Id string
- The provider-assigned unique ID for this managed resource.
- Internet
Gateway stringId - The ID of the internet gateway.
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Gateway StringId - The ID of the internet gateway.
- id string
- The provider-assigned unique ID for this managed resource.
- internet
Gateway stringId - The ID of the internet gateway.
- id str
- The provider-assigned unique ID for this managed resource.
- internet_
gateway_ strid - The ID of the internet gateway.
- id String
- The provider-assigned unique ID for this managed resource.
- internet
Gateway StringId - The ID of the internet gateway.
Supporting Types
Tag, TagArgs
Package Details
- Repository
- AWS Native pulumi/pulumi-aws-native
- License
- Apache-2.0
AWS Native is in preview. AWS Classic is fully supported.