InternetGatewayAttachmentArgs

data class InternetGatewayAttachmentArgs(val internetGatewayId: Output<String>? = null, val vpcId: Output<String>? = null) : ConvertibleToJava<InternetGatewayAttachmentArgs>

Provides a resource to create a VPC Internet Gateway Attachment.

Example Usage

package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.ec2.Vpc;
import com.pulumi.aws.ec2.VpcArgs;
import com.pulumi.aws.ec2.InternetGateway;
import com.pulumi.aws.ec2.InternetGatewayAttachment;
import com.pulumi.aws.ec2.InternetGatewayAttachmentArgs;
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 exampleVpc = new Vpc("exampleVpc", VpcArgs.builder()
.cidrBlock("10.1.0.0/16")
.build());
var exampleInternetGateway = new InternetGateway("exampleInternetGateway");
var exampleInternetGatewayAttachment = new InternetGatewayAttachment("exampleInternetGatewayAttachment", InternetGatewayAttachmentArgs.builder()
.internetGatewayId(exampleInternetGateway.id())
.vpcId(exampleVpc.id())
.build());
}
}

Import

Internet Gateway Attachments can be imported using the id, e.g.

$ pulumi import aws:ec2/internetGatewayAttachment:InternetGatewayAttachment example igw-c0a643a9:vpc-123456

Constructors

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

Properties

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

The ID of the internet gateway.

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

The ID of the VPC.

Functions

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