github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/ec2/vpcIpam.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 "errors" 11 "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/internal" 12 "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 13 ) 14 15 // Provides an IPAM resource. 16 // 17 // ## Example Usage 18 // 19 // Basic usage: 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws" 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 29 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 30 // 31 // ) 32 // 33 // func main() { 34 // pulumi.Run(func(ctx *pulumi.Context) error { 35 // current, err := aws.GetRegion(ctx, nil, nil) 36 // if err != nil { 37 // return err 38 // } 39 // _, err = ec2.NewVpcIpam(ctx, "main", &ec2.VpcIpamArgs{ 40 // Description: pulumi.String("My IPAM"), 41 // OperatingRegions: ec2.VpcIpamOperatingRegionArray{ 42 // &ec2.VpcIpamOperatingRegionArgs{ 43 // RegionName: pulumi.String(current.Name), 44 // }, 45 // }, 46 // Tags: pulumi.StringMap{ 47 // "Test": pulumi.String("Main"), 48 // }, 49 // }) 50 // if err != nil { 51 // return err 52 // } 53 // return nil 54 // }) 55 // } 56 // 57 // ``` 58 // <!--End PulumiCodeChooser --> 59 // 60 // Shared with multiple operating_regions: 61 // 62 // ## Import 63 // 64 // Using `pulumi import`, import IPAMs using the IPAM `id`. For example: 65 // 66 // ```sh 67 // $ pulumi import aws:ec2/vpcIpam:VpcIpam example ipam-0178368ad2146a492 68 // ``` 69 type VpcIpam struct { 70 pulumi.CustomResourceState 71 72 // Amazon Resource Name (ARN) of IPAM 73 Arn pulumi.StringOutput `pulumi:"arn"` 74 // Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. 75 Cascade pulumi.BoolPtrOutput `pulumi:"cascade"` 76 // The IPAM's default resource discovery association ID. 77 DefaultResourceDiscoveryAssociationId pulumi.StringOutput `pulumi:"defaultResourceDiscoveryAssociationId"` 78 // The IPAM's default resource discovery ID. 79 DefaultResourceDiscoveryId pulumi.StringOutput `pulumi:"defaultResourceDiscoveryId"` 80 // A description for the IPAM. 81 Description pulumi.StringPtrOutput `pulumi:"description"` 82 // Determines which locales can be chosen when you create pools. Locale is the Region where you want to make an IPAM pool available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region. You specify a region using the regionName parameter. You **must** set your provider block region as an operating_region. 83 OperatingRegions VpcIpamOperatingRegionArrayOutput `pulumi:"operatingRegions"` 84 // The ID of the IPAM's private scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private IP space. The public scope is intended for all internet-routable IP space. 85 PrivateDefaultScopeId pulumi.StringOutput `pulumi:"privateDefaultScopeId"` 86 // The ID of the IPAM's public scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private 87 // IP space. The public scope is intended for all internet-routable IP space. 88 PublicDefaultScopeId pulumi.StringOutput `pulumi:"publicDefaultScopeId"` 89 // The number of scopes in the IPAM. 90 ScopeCount pulumi.IntOutput `pulumi:"scopeCount"` 91 // 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. 92 Tags pulumi.StringMapOutput `pulumi:"tags"` 93 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 94 // 95 // Deprecated: Please use `tags` instead. 96 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 97 // specifies the IPAM tier. Valid options include `free` and `advanced`. Default is `advanced`. 98 Tier pulumi.StringPtrOutput `pulumi:"tier"` 99 } 100 101 // NewVpcIpam registers a new resource with the given unique name, arguments, and options. 102 func NewVpcIpam(ctx *pulumi.Context, 103 name string, args *VpcIpamArgs, opts ...pulumi.ResourceOption) (*VpcIpam, error) { 104 if args == nil { 105 return nil, errors.New("missing one or more required arguments") 106 } 107 108 if args.OperatingRegions == nil { 109 return nil, errors.New("invalid value for required argument 'OperatingRegions'") 110 } 111 opts = internal.PkgResourceDefaultOpts(opts) 112 var resource VpcIpam 113 err := ctx.RegisterResource("aws:ec2/vpcIpam:VpcIpam", name, args, &resource, opts...) 114 if err != nil { 115 return nil, err 116 } 117 return &resource, nil 118 } 119 120 // GetVpcIpam gets an existing VpcIpam resource's state with the given name, ID, and optional 121 // state properties that are used to uniquely qualify the lookup (nil if not required). 122 func GetVpcIpam(ctx *pulumi.Context, 123 name string, id pulumi.IDInput, state *VpcIpamState, opts ...pulumi.ResourceOption) (*VpcIpam, error) { 124 var resource VpcIpam 125 err := ctx.ReadResource("aws:ec2/vpcIpam:VpcIpam", name, id, state, &resource, opts...) 126 if err != nil { 127 return nil, err 128 } 129 return &resource, nil 130 } 131 132 // Input properties used for looking up and filtering VpcIpam resources. 133 type vpcIpamState struct { 134 // Amazon Resource Name (ARN) of IPAM 135 Arn *string `pulumi:"arn"` 136 // Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. 137 Cascade *bool `pulumi:"cascade"` 138 // The IPAM's default resource discovery association ID. 139 DefaultResourceDiscoveryAssociationId *string `pulumi:"defaultResourceDiscoveryAssociationId"` 140 // The IPAM's default resource discovery ID. 141 DefaultResourceDiscoveryId *string `pulumi:"defaultResourceDiscoveryId"` 142 // A description for the IPAM. 143 Description *string `pulumi:"description"` 144 // Determines which locales can be chosen when you create pools. Locale is the Region where you want to make an IPAM pool available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region. You specify a region using the regionName parameter. You **must** set your provider block region as an operating_region. 145 OperatingRegions []VpcIpamOperatingRegion `pulumi:"operatingRegions"` 146 // The ID of the IPAM's private scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private IP space. The public scope is intended for all internet-routable IP space. 147 PrivateDefaultScopeId *string `pulumi:"privateDefaultScopeId"` 148 // The ID of the IPAM's public scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private 149 // IP space. The public scope is intended for all internet-routable IP space. 150 PublicDefaultScopeId *string `pulumi:"publicDefaultScopeId"` 151 // The number of scopes in the IPAM. 152 ScopeCount *int `pulumi:"scopeCount"` 153 // 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. 154 Tags map[string]string `pulumi:"tags"` 155 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 156 // 157 // Deprecated: Please use `tags` instead. 158 TagsAll map[string]string `pulumi:"tagsAll"` 159 // specifies the IPAM tier. Valid options include `free` and `advanced`. Default is `advanced`. 160 Tier *string `pulumi:"tier"` 161 } 162 163 type VpcIpamState struct { 164 // Amazon Resource Name (ARN) of IPAM 165 Arn pulumi.StringPtrInput 166 // Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. 167 Cascade pulumi.BoolPtrInput 168 // The IPAM's default resource discovery association ID. 169 DefaultResourceDiscoveryAssociationId pulumi.StringPtrInput 170 // The IPAM's default resource discovery ID. 171 DefaultResourceDiscoveryId pulumi.StringPtrInput 172 // A description for the IPAM. 173 Description pulumi.StringPtrInput 174 // Determines which locales can be chosen when you create pools. Locale is the Region where you want to make an IPAM pool available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region. You specify a region using the regionName parameter. You **must** set your provider block region as an operating_region. 175 OperatingRegions VpcIpamOperatingRegionArrayInput 176 // The ID of the IPAM's private scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private IP space. The public scope is intended for all internet-routable IP space. 177 PrivateDefaultScopeId pulumi.StringPtrInput 178 // The ID of the IPAM's public scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private 179 // IP space. The public scope is intended for all internet-routable IP space. 180 PublicDefaultScopeId pulumi.StringPtrInput 181 // The number of scopes in the IPAM. 182 ScopeCount pulumi.IntPtrInput 183 // 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. 184 Tags pulumi.StringMapInput 185 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 186 // 187 // Deprecated: Please use `tags` instead. 188 TagsAll pulumi.StringMapInput 189 // specifies the IPAM tier. Valid options include `free` and `advanced`. Default is `advanced`. 190 Tier pulumi.StringPtrInput 191 } 192 193 func (VpcIpamState) ElementType() reflect.Type { 194 return reflect.TypeOf((*vpcIpamState)(nil)).Elem() 195 } 196 197 type vpcIpamArgs struct { 198 // Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. 199 Cascade *bool `pulumi:"cascade"` 200 // A description for the IPAM. 201 Description *string `pulumi:"description"` 202 // Determines which locales can be chosen when you create pools. Locale is the Region where you want to make an IPAM pool available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region. You specify a region using the regionName parameter. You **must** set your provider block region as an operating_region. 203 OperatingRegions []VpcIpamOperatingRegion `pulumi:"operatingRegions"` 204 // 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. 205 Tags map[string]string `pulumi:"tags"` 206 // specifies the IPAM tier. Valid options include `free` and `advanced`. Default is `advanced`. 207 Tier *string `pulumi:"tier"` 208 } 209 210 // The set of arguments for constructing a VpcIpam resource. 211 type VpcIpamArgs struct { 212 // Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. 213 Cascade pulumi.BoolPtrInput 214 // A description for the IPAM. 215 Description pulumi.StringPtrInput 216 // Determines which locales can be chosen when you create pools. Locale is the Region where you want to make an IPAM pool available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region. You specify a region using the regionName parameter. You **must** set your provider block region as an operating_region. 217 OperatingRegions VpcIpamOperatingRegionArrayInput 218 // 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. 219 Tags pulumi.StringMapInput 220 // specifies the IPAM tier. Valid options include `free` and `advanced`. Default is `advanced`. 221 Tier pulumi.StringPtrInput 222 } 223 224 func (VpcIpamArgs) ElementType() reflect.Type { 225 return reflect.TypeOf((*vpcIpamArgs)(nil)).Elem() 226 } 227 228 type VpcIpamInput interface { 229 pulumi.Input 230 231 ToVpcIpamOutput() VpcIpamOutput 232 ToVpcIpamOutputWithContext(ctx context.Context) VpcIpamOutput 233 } 234 235 func (*VpcIpam) ElementType() reflect.Type { 236 return reflect.TypeOf((**VpcIpam)(nil)).Elem() 237 } 238 239 func (i *VpcIpam) ToVpcIpamOutput() VpcIpamOutput { 240 return i.ToVpcIpamOutputWithContext(context.Background()) 241 } 242 243 func (i *VpcIpam) ToVpcIpamOutputWithContext(ctx context.Context) VpcIpamOutput { 244 return pulumi.ToOutputWithContext(ctx, i).(VpcIpamOutput) 245 } 246 247 // VpcIpamArrayInput is an input type that accepts VpcIpamArray and VpcIpamArrayOutput values. 248 // You can construct a concrete instance of `VpcIpamArrayInput` via: 249 // 250 // VpcIpamArray{ VpcIpamArgs{...} } 251 type VpcIpamArrayInput interface { 252 pulumi.Input 253 254 ToVpcIpamArrayOutput() VpcIpamArrayOutput 255 ToVpcIpamArrayOutputWithContext(context.Context) VpcIpamArrayOutput 256 } 257 258 type VpcIpamArray []VpcIpamInput 259 260 func (VpcIpamArray) ElementType() reflect.Type { 261 return reflect.TypeOf((*[]*VpcIpam)(nil)).Elem() 262 } 263 264 func (i VpcIpamArray) ToVpcIpamArrayOutput() VpcIpamArrayOutput { 265 return i.ToVpcIpamArrayOutputWithContext(context.Background()) 266 } 267 268 func (i VpcIpamArray) ToVpcIpamArrayOutputWithContext(ctx context.Context) VpcIpamArrayOutput { 269 return pulumi.ToOutputWithContext(ctx, i).(VpcIpamArrayOutput) 270 } 271 272 // VpcIpamMapInput is an input type that accepts VpcIpamMap and VpcIpamMapOutput values. 273 // You can construct a concrete instance of `VpcIpamMapInput` via: 274 // 275 // VpcIpamMap{ "key": VpcIpamArgs{...} } 276 type VpcIpamMapInput interface { 277 pulumi.Input 278 279 ToVpcIpamMapOutput() VpcIpamMapOutput 280 ToVpcIpamMapOutputWithContext(context.Context) VpcIpamMapOutput 281 } 282 283 type VpcIpamMap map[string]VpcIpamInput 284 285 func (VpcIpamMap) ElementType() reflect.Type { 286 return reflect.TypeOf((*map[string]*VpcIpam)(nil)).Elem() 287 } 288 289 func (i VpcIpamMap) ToVpcIpamMapOutput() VpcIpamMapOutput { 290 return i.ToVpcIpamMapOutputWithContext(context.Background()) 291 } 292 293 func (i VpcIpamMap) ToVpcIpamMapOutputWithContext(ctx context.Context) VpcIpamMapOutput { 294 return pulumi.ToOutputWithContext(ctx, i).(VpcIpamMapOutput) 295 } 296 297 type VpcIpamOutput struct{ *pulumi.OutputState } 298 299 func (VpcIpamOutput) ElementType() reflect.Type { 300 return reflect.TypeOf((**VpcIpam)(nil)).Elem() 301 } 302 303 func (o VpcIpamOutput) ToVpcIpamOutput() VpcIpamOutput { 304 return o 305 } 306 307 func (o VpcIpamOutput) ToVpcIpamOutputWithContext(ctx context.Context) VpcIpamOutput { 308 return o 309 } 310 311 // Amazon Resource Name (ARN) of IPAM 312 func (o VpcIpamOutput) Arn() pulumi.StringOutput { 313 return o.ApplyT(func(v *VpcIpam) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 314 } 315 316 // Enables you to quickly delete an IPAM, private scopes, pools in private scopes, and any allocations in the pools in private scopes. 317 func (o VpcIpamOutput) Cascade() pulumi.BoolPtrOutput { 318 return o.ApplyT(func(v *VpcIpam) pulumi.BoolPtrOutput { return v.Cascade }).(pulumi.BoolPtrOutput) 319 } 320 321 // The IPAM's default resource discovery association ID. 322 func (o VpcIpamOutput) DefaultResourceDiscoveryAssociationId() pulumi.StringOutput { 323 return o.ApplyT(func(v *VpcIpam) pulumi.StringOutput { return v.DefaultResourceDiscoveryAssociationId }).(pulumi.StringOutput) 324 } 325 326 // The IPAM's default resource discovery ID. 327 func (o VpcIpamOutput) DefaultResourceDiscoveryId() pulumi.StringOutput { 328 return o.ApplyT(func(v *VpcIpam) pulumi.StringOutput { return v.DefaultResourceDiscoveryId }).(pulumi.StringOutput) 329 } 330 331 // A description for the IPAM. 332 func (o VpcIpamOutput) Description() pulumi.StringPtrOutput { 333 return o.ApplyT(func(v *VpcIpam) pulumi.StringPtrOutput { return v.Description }).(pulumi.StringPtrOutput) 334 } 335 336 // Determines which locales can be chosen when you create pools. Locale is the Region where you want to make an IPAM pool available for allocations. You can only create pools with locales that match the operating Regions of the IPAM. You can only create VPCs from a pool whose locale matches the VPC's Region. You specify a region using the regionName parameter. You **must** set your provider block region as an operating_region. 337 func (o VpcIpamOutput) OperatingRegions() VpcIpamOperatingRegionArrayOutput { 338 return o.ApplyT(func(v *VpcIpam) VpcIpamOperatingRegionArrayOutput { return v.OperatingRegions }).(VpcIpamOperatingRegionArrayOutput) 339 } 340 341 // The ID of the IPAM's private scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private IP space. The public scope is intended for all internet-routable IP space. 342 func (o VpcIpamOutput) PrivateDefaultScopeId() pulumi.StringOutput { 343 return o.ApplyT(func(v *VpcIpam) pulumi.StringOutput { return v.PrivateDefaultScopeId }).(pulumi.StringOutput) 344 } 345 346 // The ID of the IPAM's public scope. A scope is a top-level container in IPAM. Each scope represents an IP-independent network. Scopes enable you to represent networks where you have overlapping IP space. When you create an IPAM, IPAM automatically creates two scopes: public and private. The private scope is intended for private 347 // IP space. The public scope is intended for all internet-routable IP space. 348 func (o VpcIpamOutput) PublicDefaultScopeId() pulumi.StringOutput { 349 return o.ApplyT(func(v *VpcIpam) pulumi.StringOutput { return v.PublicDefaultScopeId }).(pulumi.StringOutput) 350 } 351 352 // The number of scopes in the IPAM. 353 func (o VpcIpamOutput) ScopeCount() pulumi.IntOutput { 354 return o.ApplyT(func(v *VpcIpam) pulumi.IntOutput { return v.ScopeCount }).(pulumi.IntOutput) 355 } 356 357 // 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. 358 func (o VpcIpamOutput) Tags() pulumi.StringMapOutput { 359 return o.ApplyT(func(v *VpcIpam) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 360 } 361 362 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 363 // 364 // Deprecated: Please use `tags` instead. 365 func (o VpcIpamOutput) TagsAll() pulumi.StringMapOutput { 366 return o.ApplyT(func(v *VpcIpam) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 367 } 368 369 // specifies the IPAM tier. Valid options include `free` and `advanced`. Default is `advanced`. 370 func (o VpcIpamOutput) Tier() pulumi.StringPtrOutput { 371 return o.ApplyT(func(v *VpcIpam) pulumi.StringPtrOutput { return v.Tier }).(pulumi.StringPtrOutput) 372 } 373 374 type VpcIpamArrayOutput struct{ *pulumi.OutputState } 375 376 func (VpcIpamArrayOutput) ElementType() reflect.Type { 377 return reflect.TypeOf((*[]*VpcIpam)(nil)).Elem() 378 } 379 380 func (o VpcIpamArrayOutput) ToVpcIpamArrayOutput() VpcIpamArrayOutput { 381 return o 382 } 383 384 func (o VpcIpamArrayOutput) ToVpcIpamArrayOutputWithContext(ctx context.Context) VpcIpamArrayOutput { 385 return o 386 } 387 388 func (o VpcIpamArrayOutput) Index(i pulumi.IntInput) VpcIpamOutput { 389 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *VpcIpam { 390 return vs[0].([]*VpcIpam)[vs[1].(int)] 391 }).(VpcIpamOutput) 392 } 393 394 type VpcIpamMapOutput struct{ *pulumi.OutputState } 395 396 func (VpcIpamMapOutput) ElementType() reflect.Type { 397 return reflect.TypeOf((*map[string]*VpcIpam)(nil)).Elem() 398 } 399 400 func (o VpcIpamMapOutput) ToVpcIpamMapOutput() VpcIpamMapOutput { 401 return o 402 } 403 404 func (o VpcIpamMapOutput) ToVpcIpamMapOutputWithContext(ctx context.Context) VpcIpamMapOutput { 405 return o 406 } 407 408 func (o VpcIpamMapOutput) MapIndex(k pulumi.StringInput) VpcIpamOutput { 409 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *VpcIpam { 410 return vs[0].(map[string]*VpcIpam)[vs[1].(string)] 411 }).(VpcIpamOutput) 412 } 413 414 func init() { 415 pulumi.RegisterInputType(reflect.TypeOf((*VpcIpamInput)(nil)).Elem(), &VpcIpam{}) 416 pulumi.RegisterInputType(reflect.TypeOf((*VpcIpamArrayInput)(nil)).Elem(), VpcIpamArray{}) 417 pulumi.RegisterInputType(reflect.TypeOf((*VpcIpamMapInput)(nil)).Elem(), VpcIpamMap{}) 418 pulumi.RegisterOutputType(VpcIpamOutput{}) 419 pulumi.RegisterOutputType(VpcIpamArrayOutput{}) 420 pulumi.RegisterOutputType(VpcIpamMapOutput{}) 421 }