Internet Gateway Args
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());
}
}
Content copied to clipboard
Import
Internet Gateways can be imported using the id
, e.g.,
$ pulumi import aws:ec2/internetGateway:InternetGateway gw igw-c0a643a9
Content copied to clipboard