InternetGatewayAttachment

class InternetGatewayAttachment : KotlinCustomResource

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

Properties

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The ID of the internet gateway.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val vpcId: Output<String>

The ID of the VPC.