github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/vpc.go (about) 1 // Code generated by the Pulumi Terraform Bridge (tfgen) Tool DO NOT EDIT. 2 // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** 3 4 package ec2 5 6 import ( 7 "context" 8 "reflect" 9 10 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 11 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 12 ) 13 14 // Provides a VPC resource. 15 // 16 // ## Example Usage 17 // 18 // Basic usage: 19 // 20 // <!--Start PulumiCodeChooser --> 21 // ```go 22 // package main 23 // 24 // import ( 25 // 26 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 27 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 28 // 29 // ) 30 // 31 // func main() { 32 // pulumi.Run(func(ctx *pulumi.Context) error { 33 // _, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ 34 // CidrBlock: pulumi.String("10.0.0.0/16"), 35 // }) 36 // if err != nil { 37 // return err 38 // } 39 // return nil 40 // }) 41 // } 42 // 43 // ``` 44 // <!--End PulumiCodeChooser --> 45 // 46 // Basic usage with tags: 47 // 48 // <!--Start PulumiCodeChooser --> 49 // ```go 50 // package main 51 // 52 // import ( 53 // 54 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 55 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 56 // 57 // ) 58 // 59 // func main() { 60 // pulumi.Run(func(ctx *pulumi.Context) error { 61 // _, err := ec2.NewVpc(ctx, "main", &ec2.VpcArgs{ 62 // CidrBlock: pulumi.String("10.0.0.0/16"), 63 // InstanceTenancy: pulumi.String("default"), 64 // Tags: pulumi.StringMap{ 65 // "Name": pulumi.String("main"), 66 // }, 67 // }) 68 // if err != nil { 69 // return err 70 // } 71 // return nil 72 // }) 73 // } 74 // 75 // ``` 76 // <!--End PulumiCodeChooser --> 77 // 78 // VPC with CIDR from AWS IPAM: 79 // 80 // <!--Start PulumiCodeChooser --> 81 // ```go 82 // package main 83 // 84 // import ( 85 // 86 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws" 87 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 88 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 89 // 90 // ) 91 // 92 // func main() { 93 // pulumi.Run(func(ctx *pulumi.Context) error { 94 // current, err := aws.GetRegion(ctx, nil, nil) 95 // if err != nil { 96 // return err 97 // } 98 // test, err := ec2.NewVpcIpam(ctx, "test", &ec2.VpcIpamArgs{ 99 // OperatingRegions: ec2.VpcIpamOperatingRegionArray{ 100 // &ec2.VpcIpamOperatingRegionArgs{ 101 // RegionName: pulumi.String(current.Name), 102 // }, 103 // }, 104 // }) 105 // if err != nil { 106 // return err 107 // } 108 // testVpcIpamPool, err := ec2.NewVpcIpamPool(ctx, "test", &ec2.VpcIpamPoolArgs{ 109 // AddressFamily: pulumi.String("ipv4"), 110 // IpamScopeId: test.PrivateDefaultScopeId, 111 // Locale: pulumi.String(current.Name), 112 // }) 113 // if err != nil { 114 // return err 115 // } 116 // testVpcIpamPoolCidr, err := ec2.NewVpcIpamPoolCidr(ctx, "test", &ec2.VpcIpamPoolCidrArgs{ 117 // IpamPoolId: testVpcIpamPool.ID(), 118 // Cidr: pulumi.String("172.20.0.0/16"), 119 // }) 120 // if err != nil { 121 // return err 122 // } 123 // _, err = ec2.NewVpc(ctx, "test", &ec2.VpcArgs{ 124 // Ipv4IpamPoolId: testVpcIpamPool.ID(), 125 // Ipv4NetmaskLength: pulumi.Int(28), 126 // }, pulumi.DependsOn([]pulumi.Resource{ 127 // testVpcIpamPoolCidr, 128 // })) 129 // if err != nil { 130 // return err 131 // } 132 // return nil 133 // }) 134 // } 135 // 136 // ``` 137 // <!--End PulumiCodeChooser --> 138 // 139 // ## Import 140 // 141 // Using `pulumi import`, import VPCs using the VPC `id`. For example: 142 // 143 // ```sh 144 // $ pulumi import aws:ec2/vpc:Vpc test_vpc vpc-a01106c2 145 // ``` 146 type Vpc struct { 147 pulumi.CustomResourceState 148 149 // Amazon Resource Name (ARN) of VPC 150 Arn pulumi.StringOutput `pulumi:"arn"` 151 // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId` 152 AssignGeneratedIpv6CidrBlock pulumi.BoolPtrOutput `pulumi:"assignGeneratedIpv6CidrBlock"` 153 // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4NetmaskLength`. 154 CidrBlock pulumi.StringOutput `pulumi:"cidrBlock"` 155 // The ID of the network ACL created by default on VPC creation 156 DefaultNetworkAclId pulumi.StringOutput `pulumi:"defaultNetworkAclId"` 157 // The ID of the route table created by default on VPC creation 158 DefaultRouteTableId pulumi.StringOutput `pulumi:"defaultRouteTableId"` 159 // The ID of the security group created by default on VPC creation 160 DefaultSecurityGroupId pulumi.StringOutput `pulumi:"defaultSecurityGroupId"` 161 // DHCP options id of the desired VPC. 162 DhcpOptionsId pulumi.StringOutput `pulumi:"dhcpOptionsId"` 163 // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 164 EnableDnsHostnames pulumi.BoolOutput `pulumi:"enableDnsHostnames"` 165 // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. 166 EnableDnsSupport pulumi.BoolPtrOutput `pulumi:"enableDnsSupport"` 167 // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. 168 EnableNetworkAddressUsageMetrics pulumi.BoolOutput `pulumi:"enableNetworkAddressUsageMetrics"` 169 // A tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. 170 InstanceTenancy pulumi.StringPtrOutput `pulumi:"instanceTenancy"` 171 // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. 172 Ipv4IpamPoolId pulumi.StringPtrOutput `pulumi:"ipv4IpamPoolId"` 173 // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`. 174 Ipv4NetmaskLength pulumi.IntPtrOutput `pulumi:"ipv4NetmaskLength"` 175 // The association ID for the IPv6 CIDR block. 176 Ipv6AssociationId pulumi.StringOutput `pulumi:"ipv6AssociationId"` 177 // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`. 178 Ipv6CidrBlock pulumi.StringOutput `pulumi:"ipv6CidrBlock"` 179 // By default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. 180 Ipv6CidrBlockNetworkBorderGroup pulumi.StringOutput `pulumi:"ipv6CidrBlockNetworkBorderGroup"` 181 // IPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`. 182 Ipv6IpamPoolId pulumi.StringPtrOutput `pulumi:"ipv6IpamPoolId"` 183 // Netmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values: `56`. 184 Ipv6NetmaskLength pulumi.IntPtrOutput `pulumi:"ipv6NetmaskLength"` 185 // The ID of the main route table associated with 186 // this VPC. Note that you can change a VPC's main route table by using an 187 // `ec2.MainRouteTableAssociation`. 188 MainRouteTableId pulumi.StringOutput `pulumi:"mainRouteTableId"` 189 // The ID of the AWS account that owns the VPC. 190 OwnerId pulumi.StringOutput `pulumi:"ownerId"` 191 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 192 Tags pulumi.StringMapOutput `pulumi:"tags"` 193 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 194 // 195 // Deprecated: Please use `tags` instead. 196 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 197 } 198 199 // NewVpc registers a new resource with the given unique name, arguments, and options. 200 func NewVpc(ctx *pulumi.Context, 201 name string, args *VpcArgs, opts ...pulumi.ResourceOption) (*Vpc, error) { 202 if args == nil { 203 args = &VpcArgs{} 204 } 205 206 opts = internal.PkgResourceDefaultOpts(opts) 207 var resource Vpc 208 err := ctx.RegisterResource("aws:ec2/vpc:Vpc", name, args, &resource, opts...) 209 if err != nil { 210 return nil, err 211 } 212 return &resource, nil 213 } 214 215 // GetVpc gets an existing Vpc resource's state with the given name, ID, and optional 216 // state properties that are used to uniquely qualify the lookup (nil if not required). 217 func GetVpc(ctx *pulumi.Context, 218 name string, id pulumi.IDInput, state *VpcState, opts ...pulumi.ResourceOption) (*Vpc, error) { 219 var resource Vpc 220 err := ctx.ReadResource("aws:ec2/vpc:Vpc", name, id, state, &resource, opts...) 221 if err != nil { 222 return nil, err 223 } 224 return &resource, nil 225 } 226 227 // Input properties used for looking up and filtering Vpc resources. 228 type vpcState struct { 229 // Amazon Resource Name (ARN) of VPC 230 Arn *string `pulumi:"arn"` 231 // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId` 232 AssignGeneratedIpv6CidrBlock *bool `pulumi:"assignGeneratedIpv6CidrBlock"` 233 // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4NetmaskLength`. 234 CidrBlock *string `pulumi:"cidrBlock"` 235 // The ID of the network ACL created by default on VPC creation 236 DefaultNetworkAclId *string `pulumi:"defaultNetworkAclId"` 237 // The ID of the route table created by default on VPC creation 238 DefaultRouteTableId *string `pulumi:"defaultRouteTableId"` 239 // The ID of the security group created by default on VPC creation 240 DefaultSecurityGroupId *string `pulumi:"defaultSecurityGroupId"` 241 // DHCP options id of the desired VPC. 242 DhcpOptionsId *string `pulumi:"dhcpOptionsId"` 243 // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 244 EnableDnsHostnames *bool `pulumi:"enableDnsHostnames"` 245 // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. 246 EnableDnsSupport *bool `pulumi:"enableDnsSupport"` 247 // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. 248 EnableNetworkAddressUsageMetrics *bool `pulumi:"enableNetworkAddressUsageMetrics"` 249 // A tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. 250 InstanceTenancy *string `pulumi:"instanceTenancy"` 251 // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. 252 Ipv4IpamPoolId *string `pulumi:"ipv4IpamPoolId"` 253 // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`. 254 Ipv4NetmaskLength *int `pulumi:"ipv4NetmaskLength"` 255 // The association ID for the IPv6 CIDR block. 256 Ipv6AssociationId *string `pulumi:"ipv6AssociationId"` 257 // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`. 258 Ipv6CidrBlock *string `pulumi:"ipv6CidrBlock"` 259 // By default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. 260 Ipv6CidrBlockNetworkBorderGroup *string `pulumi:"ipv6CidrBlockNetworkBorderGroup"` 261 // IPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`. 262 Ipv6IpamPoolId *string `pulumi:"ipv6IpamPoolId"` 263 // Netmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values: `56`. 264 Ipv6NetmaskLength *int `pulumi:"ipv6NetmaskLength"` 265 // The ID of the main route table associated with 266 // this VPC. Note that you can change a VPC's main route table by using an 267 // `ec2.MainRouteTableAssociation`. 268 MainRouteTableId *string `pulumi:"mainRouteTableId"` 269 // The ID of the AWS account that owns the VPC. 270 OwnerId *string `pulumi:"ownerId"` 271 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 272 Tags map[string]string `pulumi:"tags"` 273 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 274 // 275 // Deprecated: Please use `tags` instead. 276 TagsAll map[string]string `pulumi:"tagsAll"` 277 } 278 279 type VpcState struct { 280 // Amazon Resource Name (ARN) of VPC 281 Arn pulumi.StringPtrInput 282 // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId` 283 AssignGeneratedIpv6CidrBlock pulumi.BoolPtrInput 284 // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4NetmaskLength`. 285 CidrBlock pulumi.StringPtrInput 286 // The ID of the network ACL created by default on VPC creation 287 DefaultNetworkAclId pulumi.StringPtrInput 288 // The ID of the route table created by default on VPC creation 289 DefaultRouteTableId pulumi.StringPtrInput 290 // The ID of the security group created by default on VPC creation 291 DefaultSecurityGroupId pulumi.StringPtrInput 292 // DHCP options id of the desired VPC. 293 DhcpOptionsId pulumi.StringPtrInput 294 // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 295 EnableDnsHostnames pulumi.BoolPtrInput 296 // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. 297 EnableDnsSupport pulumi.BoolPtrInput 298 // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. 299 EnableNetworkAddressUsageMetrics pulumi.BoolPtrInput 300 // A tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. 301 InstanceTenancy pulumi.StringPtrInput 302 // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. 303 Ipv4IpamPoolId pulumi.StringPtrInput 304 // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`. 305 Ipv4NetmaskLength pulumi.IntPtrInput 306 // The association ID for the IPv6 CIDR block. 307 Ipv6AssociationId pulumi.StringPtrInput 308 // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`. 309 Ipv6CidrBlock pulumi.StringPtrInput 310 // By default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. 311 Ipv6CidrBlockNetworkBorderGroup pulumi.StringPtrInput 312 // IPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`. 313 Ipv6IpamPoolId pulumi.StringPtrInput 314 // Netmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values: `56`. 315 Ipv6NetmaskLength pulumi.IntPtrInput 316 // The ID of the main route table associated with 317 // this VPC. Note that you can change a VPC's main route table by using an 318 // `ec2.MainRouteTableAssociation`. 319 MainRouteTableId pulumi.StringPtrInput 320 // The ID of the AWS account that owns the VPC. 321 OwnerId pulumi.StringPtrInput 322 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 323 Tags pulumi.StringMapInput 324 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 325 // 326 // Deprecated: Please use `tags` instead. 327 TagsAll pulumi.StringMapInput 328 } 329 330 func (VpcState) ElementType() reflect.Type { 331 return reflect.TypeOf((*vpcState)(nil)).Elem() 332 } 333 334 type vpcArgs struct { 335 // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId` 336 AssignGeneratedIpv6CidrBlock *bool `pulumi:"assignGeneratedIpv6CidrBlock"` 337 // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4NetmaskLength`. 338 CidrBlock *string `pulumi:"cidrBlock"` 339 // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 340 EnableDnsHostnames *bool `pulumi:"enableDnsHostnames"` 341 // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. 342 EnableDnsSupport *bool `pulumi:"enableDnsSupport"` 343 // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. 344 EnableNetworkAddressUsageMetrics *bool `pulumi:"enableNetworkAddressUsageMetrics"` 345 // A tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. 346 InstanceTenancy *string `pulumi:"instanceTenancy"` 347 // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. 348 Ipv4IpamPoolId *string `pulumi:"ipv4IpamPoolId"` 349 // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`. 350 Ipv4NetmaskLength *int `pulumi:"ipv4NetmaskLength"` 351 // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`. 352 Ipv6CidrBlock *string `pulumi:"ipv6CidrBlock"` 353 // By default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. 354 Ipv6CidrBlockNetworkBorderGroup *string `pulumi:"ipv6CidrBlockNetworkBorderGroup"` 355 // IPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`. 356 Ipv6IpamPoolId *string `pulumi:"ipv6IpamPoolId"` 357 // Netmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values: `56`. 358 Ipv6NetmaskLength *int `pulumi:"ipv6NetmaskLength"` 359 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 360 Tags map[string]string `pulumi:"tags"` 361 } 362 363 // The set of arguments for constructing a Vpc resource. 364 type VpcArgs struct { 365 // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId` 366 AssignGeneratedIpv6CidrBlock pulumi.BoolPtrInput 367 // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4NetmaskLength`. 368 CidrBlock pulumi.StringPtrInput 369 // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 370 EnableDnsHostnames pulumi.BoolPtrInput 371 // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. 372 EnableDnsSupport pulumi.BoolPtrInput 373 // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. 374 EnableNetworkAddressUsageMetrics pulumi.BoolPtrInput 375 // A tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. 376 InstanceTenancy pulumi.StringPtrInput 377 // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. 378 Ipv4IpamPoolId pulumi.StringPtrInput 379 // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`. 380 Ipv4NetmaskLength pulumi.IntPtrInput 381 // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`. 382 Ipv6CidrBlock pulumi.StringPtrInput 383 // By default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. 384 Ipv6CidrBlockNetworkBorderGroup pulumi.StringPtrInput 385 // IPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`. 386 Ipv6IpamPoolId pulumi.StringPtrInput 387 // Netmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values: `56`. 388 Ipv6NetmaskLength pulumi.IntPtrInput 389 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 390 Tags pulumi.StringMapInput 391 } 392 393 func (VpcArgs) ElementType() reflect.Type { 394 return reflect.TypeOf((*vpcArgs)(nil)).Elem() 395 } 396 397 type VpcInput interface { 398 pulumi.Input 399 400 ToVpcOutput() VpcOutput 401 ToVpcOutputWithContext(ctx context.Context) VpcOutput 402 } 403 404 func (*Vpc) ElementType() reflect.Type { 405 return reflect.TypeOf((**Vpc)(nil)).Elem() 406 } 407 408 func (i *Vpc) ToVpcOutput() VpcOutput { 409 return i.ToVpcOutputWithContext(context.Background()) 410 } 411 412 func (i *Vpc) ToVpcOutputWithContext(ctx context.Context) VpcOutput { 413 return pulumi.ToOutputWithContext(ctx, i).(VpcOutput) 414 } 415 416 // VpcArrayInput is an input type that accepts VpcArray and VpcArrayOutput values. 417 // You can construct a concrete instance of `VpcArrayInput` via: 418 // 419 // VpcArray{ VpcArgs{...} } 420 type VpcArrayInput interface { 421 pulumi.Input 422 423 ToVpcArrayOutput() VpcArrayOutput 424 ToVpcArrayOutputWithContext(context.Context) VpcArrayOutput 425 } 426 427 type VpcArray []VpcInput 428 429 func (VpcArray) ElementType() reflect.Type { 430 return reflect.TypeOf((*[]*Vpc)(nil)).Elem() 431 } 432 433 func (i VpcArray) ToVpcArrayOutput() VpcArrayOutput { 434 return i.ToVpcArrayOutputWithContext(context.Background()) 435 } 436 437 func (i VpcArray) ToVpcArrayOutputWithContext(ctx context.Context) VpcArrayOutput { 438 return pulumi.ToOutputWithContext(ctx, i).(VpcArrayOutput) 439 } 440 441 // VpcMapInput is an input type that accepts VpcMap and VpcMapOutput values. 442 // You can construct a concrete instance of `VpcMapInput` via: 443 // 444 // VpcMap{ "key": VpcArgs{...} } 445 type VpcMapInput interface { 446 pulumi.Input 447 448 ToVpcMapOutput() VpcMapOutput 449 ToVpcMapOutputWithContext(context.Context) VpcMapOutput 450 } 451 452 type VpcMap map[string]VpcInput 453 454 func (VpcMap) ElementType() reflect.Type { 455 return reflect.TypeOf((*map[string]*Vpc)(nil)).Elem() 456 } 457 458 func (i VpcMap) ToVpcMapOutput() VpcMapOutput { 459 return i.ToVpcMapOutputWithContext(context.Background()) 460 } 461 462 func (i VpcMap) ToVpcMapOutputWithContext(ctx context.Context) VpcMapOutput { 463 return pulumi.ToOutputWithContext(ctx, i).(VpcMapOutput) 464 } 465 466 type VpcOutput struct{ *pulumi.OutputState } 467 468 func (VpcOutput) ElementType() reflect.Type { 469 return reflect.TypeOf((**Vpc)(nil)).Elem() 470 } 471 472 func (o VpcOutput) ToVpcOutput() VpcOutput { 473 return o 474 } 475 476 func (o VpcOutput) ToVpcOutputWithContext(ctx context.Context) VpcOutput { 477 return o 478 } 479 480 // Amazon Resource Name (ARN) of VPC 481 func (o VpcOutput) Arn() pulumi.StringOutput { 482 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 483 } 484 485 // Requests an Amazon-provided IPv6 CIDR block with a /56 prefix length for the VPC. You cannot specify the range of IP addresses, or the size of the CIDR block. Default is `false`. Conflicts with `ipv6IpamPoolId` 486 func (o VpcOutput) AssignGeneratedIpv6CidrBlock() pulumi.BoolPtrOutput { 487 return o.ApplyT(func(v *Vpc) pulumi.BoolPtrOutput { return v.AssignGeneratedIpv6CidrBlock }).(pulumi.BoolPtrOutput) 488 } 489 490 // The IPv4 CIDR block for the VPC. CIDR can be explicitly set or it can be derived from IPAM using `ipv4NetmaskLength`. 491 func (o VpcOutput) CidrBlock() pulumi.StringOutput { 492 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.CidrBlock }).(pulumi.StringOutput) 493 } 494 495 // The ID of the network ACL created by default on VPC creation 496 func (o VpcOutput) DefaultNetworkAclId() pulumi.StringOutput { 497 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.DefaultNetworkAclId }).(pulumi.StringOutput) 498 } 499 500 // The ID of the route table created by default on VPC creation 501 func (o VpcOutput) DefaultRouteTableId() pulumi.StringOutput { 502 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.DefaultRouteTableId }).(pulumi.StringOutput) 503 } 504 505 // The ID of the security group created by default on VPC creation 506 func (o VpcOutput) DefaultSecurityGroupId() pulumi.StringOutput { 507 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.DefaultSecurityGroupId }).(pulumi.StringOutput) 508 } 509 510 // DHCP options id of the desired VPC. 511 func (o VpcOutput) DhcpOptionsId() pulumi.StringOutput { 512 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.DhcpOptionsId }).(pulumi.StringOutput) 513 } 514 515 // A boolean flag to enable/disable DNS hostnames in the VPC. Defaults false. 516 func (o VpcOutput) EnableDnsHostnames() pulumi.BoolOutput { 517 return o.ApplyT(func(v *Vpc) pulumi.BoolOutput { return v.EnableDnsHostnames }).(pulumi.BoolOutput) 518 } 519 520 // A boolean flag to enable/disable DNS support in the VPC. Defaults to true. 521 func (o VpcOutput) EnableDnsSupport() pulumi.BoolPtrOutput { 522 return o.ApplyT(func(v *Vpc) pulumi.BoolPtrOutput { return v.EnableDnsSupport }).(pulumi.BoolPtrOutput) 523 } 524 525 // Indicates whether Network Address Usage metrics are enabled for your VPC. Defaults to false. 526 func (o VpcOutput) EnableNetworkAddressUsageMetrics() pulumi.BoolOutput { 527 return o.ApplyT(func(v *Vpc) pulumi.BoolOutput { return v.EnableNetworkAddressUsageMetrics }).(pulumi.BoolOutput) 528 } 529 530 // A tenancy option for instances launched into the VPC. Default is `default`, which ensures that EC2 instances launched in this VPC use the EC2 instance tenancy attribute specified when the EC2 instance is launched. The only other option is `dedicated`, which ensures that EC2 instances launched in this VPC are run on dedicated tenancy instances regardless of the tenancy attribute specified at launch. This has a dedicated per region fee of $2 per hour, plus an hourly per instance usage fee. 531 func (o VpcOutput) InstanceTenancy() pulumi.StringPtrOutput { 532 return o.ApplyT(func(v *Vpc) pulumi.StringPtrOutput { return v.InstanceTenancy }).(pulumi.StringPtrOutput) 533 } 534 535 // The ID of an IPv4 IPAM pool you want to use for allocating this VPC's CIDR. IPAM is a VPC feature that you can use to automate your IP address management workflows including assigning, tracking, troubleshooting, and auditing IP addresses across AWS Regions and accounts. Using IPAM you can monitor IP address usage throughout your AWS Organization. 536 func (o VpcOutput) Ipv4IpamPoolId() pulumi.StringPtrOutput { 537 return o.ApplyT(func(v *Vpc) pulumi.StringPtrOutput { return v.Ipv4IpamPoolId }).(pulumi.StringPtrOutput) 538 } 539 540 // The netmask length of the IPv4 CIDR you want to allocate to this VPC. Requires specifying a `ipv4IpamPoolId`. 541 func (o VpcOutput) Ipv4NetmaskLength() pulumi.IntPtrOutput { 542 return o.ApplyT(func(v *Vpc) pulumi.IntPtrOutput { return v.Ipv4NetmaskLength }).(pulumi.IntPtrOutput) 543 } 544 545 // The association ID for the IPv6 CIDR block. 546 func (o VpcOutput) Ipv6AssociationId() pulumi.StringOutput { 547 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.Ipv6AssociationId }).(pulumi.StringOutput) 548 } 549 550 // IPv6 CIDR block to request from an IPAM Pool. Can be set explicitly or derived from IPAM using `ipv6NetmaskLength`. 551 func (o VpcOutput) Ipv6CidrBlock() pulumi.StringOutput { 552 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.Ipv6CidrBlock }).(pulumi.StringOutput) 553 } 554 555 // By default when an IPv6 CIDR is assigned to a VPC a default ipv6CidrBlockNetworkBorderGroup will be set to the region of the VPC. This can be changed to restrict advertisement of public addresses to specific Network Border Groups such as LocalZones. 556 func (o VpcOutput) Ipv6CidrBlockNetworkBorderGroup() pulumi.StringOutput { 557 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.Ipv6CidrBlockNetworkBorderGroup }).(pulumi.StringOutput) 558 } 559 560 // IPAM Pool ID for a IPv6 pool. Conflicts with `assignGeneratedIpv6CidrBlock`. 561 func (o VpcOutput) Ipv6IpamPoolId() pulumi.StringPtrOutput { 562 return o.ApplyT(func(v *Vpc) pulumi.StringPtrOutput { return v.Ipv6IpamPoolId }).(pulumi.StringPtrOutput) 563 } 564 565 // Netmask length to request from IPAM Pool. Conflicts with `ipv6CidrBlock`. This can be omitted if IPAM pool as a `allocationDefaultNetmaskLength` set. Valid values: `56`. 566 func (o VpcOutput) Ipv6NetmaskLength() pulumi.IntPtrOutput { 567 return o.ApplyT(func(v *Vpc) pulumi.IntPtrOutput { return v.Ipv6NetmaskLength }).(pulumi.IntPtrOutput) 568 } 569 570 // The ID of the main route table associated with 571 // this VPC. Note that you can change a VPC's main route table by using an 572 // `ec2.MainRouteTableAssociation`. 573 func (o VpcOutput) MainRouteTableId() pulumi.StringOutput { 574 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.MainRouteTableId }).(pulumi.StringOutput) 575 } 576 577 // The ID of the AWS account that owns the VPC. 578 func (o VpcOutput) OwnerId() pulumi.StringOutput { 579 return o.ApplyT(func(v *Vpc) pulumi.StringOutput { return v.OwnerId }).(pulumi.StringOutput) 580 } 581 582 // A map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 583 func (o VpcOutput) Tags() pulumi.StringMapOutput { 584 return o.ApplyT(func(v *Vpc) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 585 } 586 587 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 588 // 589 // Deprecated: Please use `tags` instead. 590 func (o VpcOutput) TagsAll() pulumi.StringMapOutput { 591 return o.ApplyT(func(v *Vpc) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 592 } 593 594 type VpcArrayOutput struct{ *pulumi.OutputState } 595 596 func (VpcArrayOutput) ElementType() reflect.Type { 597 return reflect.TypeOf((*[]*Vpc)(nil)).Elem() 598 } 599 600 func (o VpcArrayOutput) ToVpcArrayOutput() VpcArrayOutput { 601 return o 602 } 603 604 func (o VpcArrayOutput) ToVpcArrayOutputWithContext(ctx context.Context) VpcArrayOutput { 605 return o 606 } 607 608 func (o VpcArrayOutput) Index(i pulumi.IntInput) VpcOutput { 609 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Vpc { 610 return vs[0].([]*Vpc)[vs[1].(int)] 611 }).(VpcOutput) 612 } 613 614 type VpcMapOutput struct{ *pulumi.OutputState } 615 616 func (VpcMapOutput) ElementType() reflect.Type { 617 return reflect.TypeOf((*map[string]*Vpc)(nil)).Elem() 618 } 619 620 func (o VpcMapOutput) ToVpcMapOutput() VpcMapOutput { 621 return o 622 } 623 624 func (o VpcMapOutput) ToVpcMapOutputWithContext(ctx context.Context) VpcMapOutput { 625 return o 626 } 627 628 func (o VpcMapOutput) MapIndex(k pulumi.StringInput) VpcOutput { 629 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Vpc { 630 return vs[0].(map[string]*Vpc)[vs[1].(string)] 631 }).(VpcOutput) 632 } 633 634 func init() { 635 pulumi.RegisterInputType(reflect.TypeOf((*VpcInput)(nil)).Elem(), &Vpc{}) 636 pulumi.RegisterInputType(reflect.TypeOf((*VpcArrayInput)(nil)).Elem(), VpcArray{}) 637 pulumi.RegisterInputType(reflect.TypeOf((*VpcMapInput)(nil)).Elem(), VpcMap{}) 638 pulumi.RegisterOutputType(VpcOutput{}) 639 pulumi.RegisterOutputType(VpcArrayOutput{}) 640 pulumi.RegisterOutputType(VpcMapOutput{}) 641 }