Class InternetGatewayArgs


  • public final class InternetGatewayArgs
    extends com.pulumi.resources.ResourceArgs
    • Method Detail

      • tags

        public java.util.Optional<com.pulumi.core.Output<java.util.Map<java.lang.String,​java.lang.String>>> tags()
        Returns:
        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. > **Note:** It's recommended to denote that the AWS Instance or Elastic IP depends on the Internet Gateway. For example: <!--Start PulumiCodeChooser -->
         
         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 com.pulumi.aws.ec2.Instance;
         import com.pulumi.aws.ec2.InstanceArgs;
         import com.pulumi.resources.CustomResourceOptions;
         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(main.id())
                     .build());
         
                 var foo = new Instance("foo", InstanceArgs.Empty, CustomResourceOptions.builder()
                     .dependsOn(gw)
                     .build());
         
             }
         }
         
         
        <!--End PulumiCodeChooser -->
      • vpcId

        public java.util.Optional<com.pulumi.core.Output<java.lang.String>> vpcId()
        Returns:
        The VPC ID to create in. See the aws.ec2.InternetGatewayAttachment resource for an alternate way to attach an Internet Gateway to a VPC.