InternetGatewayArgs

data class InternetGatewayArgs(val tags: Output<Map<String, String>>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<InternetGatewayArgs>

Provides a resource to create a VPC Internet Gateway.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.InternetGateway;
import com.pulumi.aws.ec2.InternetGatewayArgs;
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 gw = new InternetGateway("gw", InternetGatewayArgs.builder()
.vpcId(aws_vpc.main().id())
.tags(Map.of("Name", "main"))
.build());
}
}

Import

Internet Gateways can be imported using the id, e.g.,

$ pulumi import aws:ec2/internetGateway:InternetGateway gw igw-c0a643a9

Constructors

Link copied to clipboard
constructor(tags: Output<Map<String, String>>? = null, vpcId: Output<String>? = null)

Properties

Link copied to clipboard
val tags: Output<Map<String, String>>? = null

A map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val vpcId: Output<String>? = null

The VPC ID to create in. See the aws.ec2.InternetGatewayAttachment resource for an alternate way to attach an Internet Gateway to a VPC.

Functions

Link copied to clipboard
open override fun toJava(): InternetGatewayArgs