github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/autoscaling/group.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 autoscaling 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 Auto Scaling Group resource. 16 // 17 // > **Note:** You must specify either `launchConfiguration`, `launchTemplate`, or `mixedInstancesPolicy`. 18 // 19 // > **NOTE on Auto Scaling Groups, Attachments and Traffic Source Attachments:** Pulumi provides standalone Attachment (for attaching Classic Load Balancers and Application Load Balancer, Gateway Load Balancer, or Network Load Balancer target groups) and Traffic Source Attachment (for attaching Load Balancers and VPC Lattice target groups) resources and an Auto Scaling Group resource with `loadBalancers`, `targetGroupArns` and `trafficSource` attributes. Do not use the same traffic source in more than one of these resources. Doing so will cause a conflict of attachments. A `lifecycle` configuration block can be used to suppress differences if necessary. 20 // 21 // ## Example Usage 22 // 23 // <!--Start PulumiCodeChooser --> 24 // ```go 25 // package main 26 // 27 // import ( 28 // 29 // "encoding/json" 30 // 31 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 32 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 33 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 34 // 35 // ) 36 // 37 // func main() { 38 // pulumi.Run(func(ctx *pulumi.Context) error { 39 // test, err := ec2.NewPlacementGroup(ctx, "test", &ec2.PlacementGroupArgs{ 40 // Name: pulumi.String("test"), 41 // Strategy: pulumi.String(ec2.PlacementStrategyCluster), 42 // }) 43 // if err != nil { 44 // return err 45 // } 46 // tmpJSON0, err := json.Marshal(map[string]interface{}{ 47 // "foo": "bar", 48 // }) 49 // if err != nil { 50 // return err 51 // } 52 // json0 := string(tmpJSON0) 53 // _, err = autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{ 54 // Name: pulumi.String("foobar3-test"), 55 // MaxSize: pulumi.Int(5), 56 // MinSize: pulumi.Int(2), 57 // HealthCheckGracePeriod: pulumi.Int(300), 58 // HealthCheckType: pulumi.String("ELB"), 59 // DesiredCapacity: pulumi.Int(4), 60 // ForceDelete: pulumi.Bool(true), 61 // PlacementGroup: test.ID(), 62 // LaunchConfiguration: pulumi.Any(foobar.Name), 63 // VpcZoneIdentifiers: pulumi.StringArray{ 64 // example1.Id, 65 // example2.Id, 66 // }, 67 // InstanceMaintenancePolicy: &autoscaling.GroupInstanceMaintenancePolicyArgs{ 68 // MinHealthyPercentage: pulumi.Int(90), 69 // MaxHealthyPercentage: pulumi.Int(120), 70 // }, 71 // InitialLifecycleHooks: autoscaling.GroupInitialLifecycleHookArray{ 72 // &autoscaling.GroupInitialLifecycleHookArgs{ 73 // Name: pulumi.String("foobar"), 74 // DefaultResult: pulumi.String("CONTINUE"), 75 // HeartbeatTimeout: pulumi.Int(2000), 76 // LifecycleTransition: pulumi.String("autoscaling:EC2_INSTANCE_LAUNCHING"), 77 // NotificationMetadata: pulumi.String(json0), 78 // NotificationTargetArn: pulumi.String("arn:aws:sqs:us-east-1:444455556666:queue1*"), 79 // RoleArn: pulumi.String("arn:aws:iam::123456789012:role/S3Access"), 80 // }, 81 // }, 82 // Tags: autoscaling.GroupTagArray{ 83 // &autoscaling.GroupTagArgs{ 84 // Key: pulumi.String("foo"), 85 // Value: pulumi.String("bar"), 86 // PropagateAtLaunch: pulumi.Bool(true), 87 // }, 88 // &autoscaling.GroupTagArgs{ 89 // Key: pulumi.String("lorem"), 90 // Value: pulumi.String("ipsum"), 91 // PropagateAtLaunch: pulumi.Bool(false), 92 // }, 93 // }, 94 // }) 95 // if err != nil { 96 // return err 97 // } 98 // return nil 99 // }) 100 // } 101 // 102 // ``` 103 // <!--End PulumiCodeChooser --> 104 // 105 // ### With Latest Version Of Launch Template 106 // 107 // <!--Start PulumiCodeChooser --> 108 // ```go 109 // package main 110 // 111 // import ( 112 // 113 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 114 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 115 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 116 // 117 // ) 118 // 119 // func main() { 120 // pulumi.Run(func(ctx *pulumi.Context) error { 121 // foobar, err := ec2.NewLaunchTemplate(ctx, "foobar", &ec2.LaunchTemplateArgs{ 122 // NamePrefix: pulumi.String("foobar"), 123 // ImageId: pulumi.String("ami-1a2b3c"), 124 // InstanceType: pulumi.String("t2.micro"), 125 // }) 126 // if err != nil { 127 // return err 128 // } 129 // _, err = autoscaling.NewGroup(ctx, "bar", &autoscaling.GroupArgs{ 130 // AvailabilityZones: pulumi.StringArray{ 131 // pulumi.String("us-east-1a"), 132 // }, 133 // DesiredCapacity: pulumi.Int(1), 134 // MaxSize: pulumi.Int(1), 135 // MinSize: pulumi.Int(1), 136 // LaunchTemplate: &autoscaling.GroupLaunchTemplateArgs{ 137 // Id: foobar.ID(), 138 // Version: pulumi.String("$Latest"), 139 // }, 140 // }) 141 // if err != nil { 142 // return err 143 // } 144 // return nil 145 // }) 146 // } 147 // 148 // ``` 149 // <!--End PulumiCodeChooser --> 150 // 151 // ### Mixed Instances Policy 152 // 153 // <!--Start PulumiCodeChooser --> 154 // ```go 155 // package main 156 // 157 // import ( 158 // 159 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 160 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 161 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 162 // 163 // ) 164 // 165 // func main() { 166 // pulumi.Run(func(ctx *pulumi.Context) error { 167 // example, err := ec2.NewLaunchTemplate(ctx, "example", &ec2.LaunchTemplateArgs{ 168 // NamePrefix: pulumi.String("example"), 169 // ImageId: pulumi.Any(exampleAwsAmi.Id), 170 // InstanceType: pulumi.String("c5.large"), 171 // }) 172 // if err != nil { 173 // return err 174 // } 175 // _, err = autoscaling.NewGroup(ctx, "example", &autoscaling.GroupArgs{ 176 // AvailabilityZones: pulumi.StringArray{ 177 // pulumi.String("us-east-1a"), 178 // }, 179 // DesiredCapacity: pulumi.Int(1), 180 // MaxSize: pulumi.Int(1), 181 // MinSize: pulumi.Int(1), 182 // MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{ 183 // LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{ 184 // LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{ 185 // LaunchTemplateId: example.ID(), 186 // }, 187 // Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{ 188 // &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{ 189 // InstanceType: pulumi.String("c4.large"), 190 // WeightedCapacity: pulumi.String("3"), 191 // }, 192 // &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{ 193 // InstanceType: pulumi.String("c3.large"), 194 // WeightedCapacity: pulumi.String("2"), 195 // }, 196 // }, 197 // }, 198 // }, 199 // }) 200 // if err != nil { 201 // return err 202 // } 203 // return nil 204 // }) 205 // } 206 // 207 // ``` 208 // <!--End PulumiCodeChooser --> 209 // 210 // ### Mixed Instances Policy with Spot Instances and Capacity Rebalance 211 // 212 // <!--Start PulumiCodeChooser --> 213 // ```go 214 // package main 215 // 216 // import ( 217 // 218 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 219 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 220 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 221 // 222 // ) 223 // 224 // func main() { 225 // pulumi.Run(func(ctx *pulumi.Context) error { 226 // example, err := ec2.NewLaunchTemplate(ctx, "example", &ec2.LaunchTemplateArgs{ 227 // NamePrefix: pulumi.String("example"), 228 // ImageId: pulumi.Any(exampleAwsAmi.Id), 229 // InstanceType: pulumi.String("c5.large"), 230 // }) 231 // if err != nil { 232 // return err 233 // } 234 // _, err = autoscaling.NewGroup(ctx, "example", &autoscaling.GroupArgs{ 235 // CapacityRebalance: pulumi.Bool(true), 236 // DesiredCapacity: pulumi.Int(12), 237 // MaxSize: pulumi.Int(15), 238 // MinSize: pulumi.Int(12), 239 // VpcZoneIdentifiers: pulumi.StringArray{ 240 // example1.Id, 241 // example2.Id, 242 // }, 243 // MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{ 244 // InstancesDistribution: &autoscaling.GroupMixedInstancesPolicyInstancesDistributionArgs{ 245 // OnDemandBaseCapacity: pulumi.Int(0), 246 // OnDemandPercentageAboveBaseCapacity: pulumi.Int(25), 247 // SpotAllocationStrategy: pulumi.String("capacity-optimized"), 248 // }, 249 // LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{ 250 // LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{ 251 // LaunchTemplateId: example.ID(), 252 // }, 253 // Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{ 254 // &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{ 255 // InstanceType: pulumi.String("c4.large"), 256 // WeightedCapacity: pulumi.String("3"), 257 // }, 258 // &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{ 259 // InstanceType: pulumi.String("c3.large"), 260 // WeightedCapacity: pulumi.String("2"), 261 // }, 262 // }, 263 // }, 264 // }, 265 // }) 266 // if err != nil { 267 // return err 268 // } 269 // return nil 270 // }) 271 // } 272 // 273 // ``` 274 // <!--End PulumiCodeChooser --> 275 // 276 // ### Mixed Instances Policy with Instance level LaunchTemplateSpecification Overrides 277 // 278 // When using a diverse instance set, some instance types might require a launch template with configuration values unique to that instance type such as a different AMI (Graviton2), architecture specific user data script, different EBS configuration, or different networking configuration. 279 // 280 // <!--Start PulumiCodeChooser --> 281 // ```go 282 // package main 283 // 284 // import ( 285 // 286 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 287 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 288 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 289 // 290 // ) 291 // 292 // func main() { 293 // pulumi.Run(func(ctx *pulumi.Context) error { 294 // example, err := ec2.NewLaunchTemplate(ctx, "example", &ec2.LaunchTemplateArgs{ 295 // NamePrefix: pulumi.String("example"), 296 // ImageId: pulumi.Any(exampleAwsAmi.Id), 297 // InstanceType: pulumi.String("c5.large"), 298 // }) 299 // if err != nil { 300 // return err 301 // } 302 // example2, err := ec2.NewLaunchTemplate(ctx, "example2", &ec2.LaunchTemplateArgs{ 303 // NamePrefix: pulumi.String("example2"), 304 // ImageId: pulumi.Any(example2AwsAmi.Id), 305 // }) 306 // if err != nil { 307 // return err 308 // } 309 // _, err = autoscaling.NewGroup(ctx, "example", &autoscaling.GroupArgs{ 310 // AvailabilityZones: pulumi.StringArray{ 311 // pulumi.String("us-east-1a"), 312 // }, 313 // DesiredCapacity: pulumi.Int(1), 314 // MaxSize: pulumi.Int(1), 315 // MinSize: pulumi.Int(1), 316 // MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{ 317 // LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{ 318 // LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{ 319 // LaunchTemplateId: example.ID(), 320 // }, 321 // Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{ 322 // &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{ 323 // InstanceType: pulumi.String("c4.large"), 324 // WeightedCapacity: pulumi.String("3"), 325 // }, 326 // &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{ 327 // InstanceType: pulumi.String("c6g.large"), 328 // LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideLaunchTemplateSpecificationArgs{ 329 // LaunchTemplateId: example2.ID(), 330 // }, 331 // WeightedCapacity: pulumi.String("2"), 332 // }, 333 // }, 334 // }, 335 // }, 336 // }) 337 // if err != nil { 338 // return err 339 // } 340 // return nil 341 // }) 342 // } 343 // 344 // ``` 345 // <!--End PulumiCodeChooser --> 346 // 347 // ### Mixed Instances Policy with Attribute-based Instance Type Selection 348 // 349 // As an alternative to manually choosing instance types when creating a mixed instances group, you can specify a set of instance attributes that describe your compute requirements. 350 // 351 // <!--Start PulumiCodeChooser --> 352 // ```go 353 // package main 354 // 355 // import ( 356 // 357 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 358 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 359 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 360 // 361 // ) 362 // 363 // func main() { 364 // pulumi.Run(func(ctx *pulumi.Context) error { 365 // example, err := ec2.NewLaunchTemplate(ctx, "example", &ec2.LaunchTemplateArgs{ 366 // NamePrefix: pulumi.String("example"), 367 // ImageId: pulumi.Any(exampleAwsAmi.Id), 368 // InstanceType: pulumi.String("c5.large"), 369 // }) 370 // if err != nil { 371 // return err 372 // } 373 // _, err = autoscaling.NewGroup(ctx, "example", &autoscaling.GroupArgs{ 374 // AvailabilityZones: pulumi.StringArray{ 375 // pulumi.String("us-east-1a"), 376 // }, 377 // DesiredCapacity: pulumi.Int(1), 378 // MaxSize: pulumi.Int(1), 379 // MinSize: pulumi.Int(1), 380 // MixedInstancesPolicy: &autoscaling.GroupMixedInstancesPolicyArgs{ 381 // LaunchTemplate: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateArgs{ 382 // LaunchTemplateSpecification: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateLaunchTemplateSpecificationArgs{ 383 // LaunchTemplateId: example.ID(), 384 // }, 385 // Overrides: autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArray{ 386 // &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideArgs{ 387 // InstanceRequirements: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsArgs{ 388 // MemoryMib: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsMemoryMibArgs{ 389 // Min: pulumi.Int(1000), 390 // }, 391 // VcpuCount: &autoscaling.GroupMixedInstancesPolicyLaunchTemplateOverrideInstanceRequirementsVcpuCountArgs{ 392 // Min: pulumi.Int(4), 393 // }, 394 // }, 395 // }, 396 // }, 397 // }, 398 // }, 399 // }) 400 // if err != nil { 401 // return err 402 // } 403 // return nil 404 // }) 405 // } 406 // 407 // ``` 408 // <!--End PulumiCodeChooser --> 409 // 410 // ### Dynamic tagging 411 // 412 // <!--Start PulumiCodeChooser --> 413 // ```go 414 // package main 415 // 416 // import ( 417 // 418 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 419 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 420 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 421 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi/config" 422 // 423 // ) 424 // 425 // func main() { 426 // pulumi.Run(func(ctx *pulumi.Context) error { 427 // cfg := config.New(ctx, "") 428 // extraTags := []map[string]interface{}{ 429 // map[string]interface{}{ 430 // "key": "Foo", 431 // "propagateAtLaunch": true, 432 // "value": "Bar", 433 // }, 434 // map[string]interface{}{ 435 // "key": "Baz", 436 // "propagateAtLaunch": true, 437 // "value": "Bam", 438 // }, 439 // } 440 // if param := cfg.GetObject("extraTags"); param != nil { 441 // extraTags = param 442 // } 443 // _, err := autoscaling.NewGroup(ctx, "test", &autoscaling.GroupArgs{ 444 // Tags: autoscaling.GroupTagArray{ 445 // &autoscaling.GroupTagArgs{ 446 // Key: pulumi.String("explicit1"), 447 // Value: pulumi.String("value1"), 448 // PropagateAtLaunch: pulumi.Bool(true), 449 // }, 450 // &autoscaling.GroupTagArgs{ 451 // Key: pulumi.String("explicit2"), 452 // Value: pulumi.String("value2"), 453 // PropagateAtLaunch: pulumi.Bool(true), 454 // }, 455 // }, 456 // Name: pulumi.String("foobar3-test"), 457 // MaxSize: pulumi.Int(5), 458 // MinSize: pulumi.Int(2), 459 // LaunchConfiguration: pulumi.Any(foobar.Name), 460 // VpcZoneIdentifiers: pulumi.StringArray{ 461 // example1.Id, 462 // example2.Id, 463 // }, 464 // }) 465 // if err != nil { 466 // return err 467 // } 468 // return nil 469 // }) 470 // } 471 // 472 // ``` 473 // <!--End PulumiCodeChooser --> 474 // 475 // ### Automatically refresh all instances after the group is updated 476 // 477 // <!--Start PulumiCodeChooser --> 478 // ```go 479 // package main 480 // 481 // import ( 482 // 483 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 484 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 485 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 486 // 487 // ) 488 // 489 // func main() { 490 // pulumi.Run(func(ctx *pulumi.Context) error { 491 // example, err := ec2.LookupAmi(ctx, &ec2.LookupAmiArgs{ 492 // MostRecent: pulumi.BoolRef(true), 493 // Owners: []string{ 494 // "amazon", 495 // }, 496 // Filters: []ec2.GetAmiFilter{ 497 // { 498 // Name: "name", 499 // Values: []string{ 500 // "amzn-ami-hvm-*-x86_64-gp2", 501 // }, 502 // }, 503 // }, 504 // }, nil) 505 // if err != nil { 506 // return err 507 // } 508 // exampleLaunchTemplate, err := ec2.NewLaunchTemplate(ctx, "example", &ec2.LaunchTemplateArgs{ 509 // ImageId: pulumi.String(example.Id), 510 // InstanceType: pulumi.String("t3.nano"), 511 // }) 512 // if err != nil { 513 // return err 514 // } 515 // _, err = autoscaling.NewGroup(ctx, "example", &autoscaling.GroupArgs{ 516 // AvailabilityZones: pulumi.StringArray{ 517 // pulumi.String("us-east-1a"), 518 // }, 519 // DesiredCapacity: pulumi.Int(1), 520 // MaxSize: pulumi.Int(2), 521 // MinSize: pulumi.Int(1), 522 // LaunchTemplate: &autoscaling.GroupLaunchTemplateArgs{ 523 // Id: exampleLaunchTemplate.ID(), 524 // Version: exampleLaunchTemplate.LatestVersion, 525 // }, 526 // Tags: autoscaling.GroupTagArray{ 527 // &autoscaling.GroupTagArgs{ 528 // Key: pulumi.String("Key"), 529 // Value: pulumi.String("Value"), 530 // PropagateAtLaunch: pulumi.Bool(true), 531 // }, 532 // }, 533 // InstanceRefresh: &autoscaling.GroupInstanceRefreshArgs{ 534 // Strategy: pulumi.String("Rolling"), 535 // Preferences: &autoscaling.GroupInstanceRefreshPreferencesArgs{ 536 // MinHealthyPercentage: pulumi.Int(50), 537 // }, 538 // Triggers: pulumi.StringArray{ 539 // pulumi.String("tag"), 540 // }, 541 // }, 542 // }) 543 // if err != nil { 544 // return err 545 // } 546 // return nil 547 // }) 548 // } 549 // 550 // ``` 551 // <!--End PulumiCodeChooser --> 552 // 553 // ### Auto Scaling group with Warm Pool 554 // 555 // <!--Start PulumiCodeChooser --> 556 // ```go 557 // package main 558 // 559 // import ( 560 // 561 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/autoscaling" 562 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" 563 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 564 // 565 // ) 566 // 567 // func main() { 568 // pulumi.Run(func(ctx *pulumi.Context) error { 569 // _, err := ec2.NewLaunchTemplate(ctx, "example", &ec2.LaunchTemplateArgs{ 570 // NamePrefix: pulumi.String("example"), 571 // ImageId: pulumi.Any(exampleAwsAmi.Id), 572 // InstanceType: pulumi.String("c5.large"), 573 // }) 574 // if err != nil { 575 // return err 576 // } 577 // _, err = autoscaling.NewGroup(ctx, "example", &autoscaling.GroupArgs{ 578 // AvailabilityZones: pulumi.StringArray{ 579 // pulumi.String("us-east-1a"), 580 // }, 581 // DesiredCapacity: pulumi.Int(1), 582 // MaxSize: pulumi.Int(5), 583 // MinSize: pulumi.Int(1), 584 // WarmPool: &autoscaling.GroupWarmPoolArgs{ 585 // PoolState: pulumi.String("Hibernated"), 586 // MinSize: pulumi.Int(1), 587 // MaxGroupPreparedCapacity: pulumi.Int(10), 588 // InstanceReusePolicy: &autoscaling.GroupWarmPoolInstanceReusePolicyArgs{ 589 // ReuseOnScaleIn: pulumi.Bool(true), 590 // }, 591 // }, 592 // }) 593 // if err != nil { 594 // return err 595 // } 596 // return nil 597 // }) 598 // } 599 // 600 // ``` 601 // <!--End PulumiCodeChooser --> 602 // 603 // ## Import 604 // 605 // Using `pulumi import`, import Auto Scaling Groups using the `name`. For example: 606 // 607 // ```sh 608 // $ pulumi import aws:autoscaling/group:Group web web-asg 609 // ``` 610 type Group struct { 611 pulumi.CustomResourceState 612 613 // ARN for this Auto Scaling Group 614 Arn pulumi.StringOutput `pulumi:"arn"` 615 // A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpcZoneIdentifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpcZoneIdentifier`. 616 AvailabilityZones pulumi.StringArrayOutput `pulumi:"availabilityZones"` 617 // Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. 618 CapacityRebalance pulumi.BoolPtrOutput `pulumi:"capacityRebalance"` 619 // Reserved. 620 Context pulumi.StringPtrOutput `pulumi:"context"` 621 // Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. 622 DefaultCooldown pulumi.IntOutput `pulumi:"defaultCooldown"` 623 // Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) 624 DefaultInstanceWarmup pulumi.IntPtrOutput `pulumi:"defaultInstanceWarmup"` 625 // Number of Amazon EC2 instances that 626 // should be running in the group. (See also Waiting for 627 // Capacity below.) 628 DesiredCapacity pulumi.IntOutput `pulumi:"desiredCapacity"` 629 // The unit of measurement for the value specified for `desiredCapacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. 630 DesiredCapacityType pulumi.StringPtrOutput `pulumi:"desiredCapacityType"` 631 // List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). 632 EnabledMetrics pulumi.StringArrayOutput `pulumi:"enabledMetrics"` 633 // Allows deleting the Auto Scaling Group without waiting 634 // for all instances in the pool to terminate. You can force an Auto Scaling Group to delete 635 // even if it's in the process of scaling a resource. Normally, this provider 636 // drains all the instances before deleting the group. This bypasses that 637 // behavior and potentially leaves resources dangling. 638 ForceDelete pulumi.BoolPtrOutput `pulumi:"forceDelete"` 639 // Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. 640 ForceDeleteWarmPool pulumi.BoolPtrOutput `pulumi:"forceDeleteWarmPool"` 641 // Time (in seconds) after instance comes into service before checking health. 642 HealthCheckGracePeriod pulumi.IntPtrOutput `pulumi:"healthCheckGracePeriod"` 643 // "EC2" or "ELB". Controls how health checking is done. 644 HealthCheckType pulumi.StringOutput `pulumi:"healthCheckType"` 645 // Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. 646 IgnoreFailedScalingActivities pulumi.BoolPtrOutput `pulumi:"ignoreFailedScalingActivities"` 647 // One or more 648 // [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) 649 // to attach to the Auto Scaling Group **before** instances are launched. The 650 // syntax is exactly the same as the separate 651 // `autoscaling.LifecycleHook` 652 // resource, without the `autoscalingGroupName` attribute. Please note that this will only work when creating 653 // a new Auto Scaling Group. For all other use-cases, please use `autoscaling.LifecycleHook` resource. 654 InitialLifecycleHooks GroupInitialLifecycleHookArrayOutput `pulumi:"initialLifecycleHooks"` 655 // If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. 656 InstanceMaintenancePolicy GroupInstanceMaintenancePolicyPtrOutput `pulumi:"instanceMaintenancePolicy"` 657 // If this block is configured, start an 658 // [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) 659 // when this Auto Scaling Group is updated. Defined below. 660 InstanceRefresh GroupInstanceRefreshPtrOutput `pulumi:"instanceRefresh"` 661 // Name of the launch configuration to use. 662 LaunchConfiguration pulumi.StringPtrOutput `pulumi:"launchConfiguration"` 663 // Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. 664 LaunchTemplate GroupLaunchTemplateOutput `pulumi:"launchTemplate"` 665 // List of elastic load balancer names to add to the autoscaling 666 // group names. Only valid for classic load balancers. For ALBs, use `targetGroupArns` instead. To remove all load balancer attachments an empty list should be specified. 667 LoadBalancers pulumi.StringArrayOutput `pulumi:"loadBalancers"` 668 // Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. 669 MaxInstanceLifetime pulumi.IntPtrOutput `pulumi:"maxInstanceLifetime"` 670 // Maximum size of the Auto Scaling Group. 671 MaxSize pulumi.IntOutput `pulumi:"maxSize"` 672 // Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. 673 MetricsGranularity pulumi.StringPtrOutput `pulumi:"metricsGranularity"` 674 // Setting this causes Pulumi to wait for 675 // this number of instances from this Auto Scaling Group to show up healthy in the 676 // ELB only on creation. Updates will not wait on ELB instance number changes. 677 // (See also Waiting for Capacity below.) 678 MinElbCapacity pulumi.IntPtrOutput `pulumi:"minElbCapacity"` 679 // Minimum size of the Auto Scaling Group. 680 // (See also Waiting for Capacity below.) 681 MinSize pulumi.IntOutput `pulumi:"minSize"` 682 // Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. 683 MixedInstancesPolicy GroupMixedInstancesPolicyOutput `pulumi:"mixedInstancesPolicy"` 684 // Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `namePrefix`. 685 Name pulumi.StringOutput `pulumi:"name"` 686 // Creates a unique name beginning with the specified 687 // prefix. Conflicts with `name`. 688 NamePrefix pulumi.StringOutput `pulumi:"namePrefix"` 689 // Name of the placement group into which you'll launch your instances, if any. 690 PlacementGroup pulumi.StringPtrOutput `pulumi:"placementGroup"` 691 // Predicted capacity of the group. 692 PredictedCapacity pulumi.IntOutput `pulumi:"predictedCapacity"` 693 // Whether newly launched instances 694 // are automatically protected from termination by Amazon EC2 Auto Scaling when 695 // scaling in. For more information about preventing instances from terminating 696 // on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) 697 // in the Amazon EC2 Auto Scaling User Guide. 698 ProtectFromScaleIn pulumi.BoolPtrOutput `pulumi:"protectFromScaleIn"` 699 // ARN of the service-linked role that the ASG will use to call other AWS services 700 ServiceLinkedRoleArn pulumi.StringOutput `pulumi:"serviceLinkedRoleArn"` 701 // List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. 702 // Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. 703 SuspendedProcesses pulumi.StringArrayOutput `pulumi:"suspendedProcesses"` 704 // Configuration block(s) containing resource tags. See Tag below for more details. 705 Tags GroupTagArrayOutput `pulumi:"tags"` 706 // Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. 707 TargetGroupArns pulumi.StringArrayOutput `pulumi:"targetGroupArns"` 708 // List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. 709 TerminationPolicies pulumi.StringArrayOutput `pulumi:"terminationPolicies"` 710 // Attaches one or more traffic sources to the specified Auto Scaling group. 711 TrafficSources GroupTrafficSourceArrayOutput `pulumi:"trafficSources"` 712 // List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availabilityZones`. 713 VpcZoneIdentifiers pulumi.StringArrayOutput `pulumi:"vpcZoneIdentifiers"` 714 // Maximum 715 // [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should 716 // wait for ASG instances to be healthy before timing out. (See also Waiting 717 // for Capacity below.) Setting this to "0" causes 718 // the provider to skip all Capacity Waiting behavior. 719 WaitForCapacityTimeout pulumi.StringPtrOutput `pulumi:"waitForCapacityTimeout"` 720 // Setting this will cause Pulumi to wait 721 // for exactly this number of healthy instances from this Auto Scaling Group in 722 // all attached load balancers on both create and update operations. (Takes 723 // precedence over `minElbCapacity` behavior.) 724 // (See also Waiting for Capacity below.) 725 WaitForElbCapacity pulumi.IntPtrOutput `pulumi:"waitForElbCapacity"` 726 // If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) 727 // to the specified Auto Scaling group. Defined below 728 WarmPool GroupWarmPoolPtrOutput `pulumi:"warmPool"` 729 // Current size of the warm pool. 730 WarmPoolSize pulumi.IntOutput `pulumi:"warmPoolSize"` 731 } 732 733 // NewGroup registers a new resource with the given unique name, arguments, and options. 734 func NewGroup(ctx *pulumi.Context, 735 name string, args *GroupArgs, opts ...pulumi.ResourceOption) (*Group, error) { 736 if args == nil { 737 return nil, errors.New("missing one or more required arguments") 738 } 739 740 if args.MaxSize == nil { 741 return nil, errors.New("invalid value for required argument 'MaxSize'") 742 } 743 if args.MinSize == nil { 744 return nil, errors.New("invalid value for required argument 'MinSize'") 745 } 746 opts = internal.PkgResourceDefaultOpts(opts) 747 var resource Group 748 err := ctx.RegisterResource("aws:autoscaling/group:Group", name, args, &resource, opts...) 749 if err != nil { 750 return nil, err 751 } 752 return &resource, nil 753 } 754 755 // GetGroup gets an existing Group resource's state with the given name, ID, and optional 756 // state properties that are used to uniquely qualify the lookup (nil if not required). 757 func GetGroup(ctx *pulumi.Context, 758 name string, id pulumi.IDInput, state *GroupState, opts ...pulumi.ResourceOption) (*Group, error) { 759 var resource Group 760 err := ctx.ReadResource("aws:autoscaling/group:Group", name, id, state, &resource, opts...) 761 if err != nil { 762 return nil, err 763 } 764 return &resource, nil 765 } 766 767 // Input properties used for looking up and filtering Group resources. 768 type groupState struct { 769 // ARN for this Auto Scaling Group 770 Arn *string `pulumi:"arn"` 771 // A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpcZoneIdentifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpcZoneIdentifier`. 772 AvailabilityZones []string `pulumi:"availabilityZones"` 773 // Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. 774 CapacityRebalance *bool `pulumi:"capacityRebalance"` 775 // Reserved. 776 Context *string `pulumi:"context"` 777 // Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. 778 DefaultCooldown *int `pulumi:"defaultCooldown"` 779 // Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) 780 DefaultInstanceWarmup *int `pulumi:"defaultInstanceWarmup"` 781 // Number of Amazon EC2 instances that 782 // should be running in the group. (See also Waiting for 783 // Capacity below.) 784 DesiredCapacity *int `pulumi:"desiredCapacity"` 785 // The unit of measurement for the value specified for `desiredCapacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. 786 DesiredCapacityType *string `pulumi:"desiredCapacityType"` 787 // List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). 788 EnabledMetrics []string `pulumi:"enabledMetrics"` 789 // Allows deleting the Auto Scaling Group without waiting 790 // for all instances in the pool to terminate. You can force an Auto Scaling Group to delete 791 // even if it's in the process of scaling a resource. Normally, this provider 792 // drains all the instances before deleting the group. This bypasses that 793 // behavior and potentially leaves resources dangling. 794 ForceDelete *bool `pulumi:"forceDelete"` 795 // Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. 796 ForceDeleteWarmPool *bool `pulumi:"forceDeleteWarmPool"` 797 // Time (in seconds) after instance comes into service before checking health. 798 HealthCheckGracePeriod *int `pulumi:"healthCheckGracePeriod"` 799 // "EC2" or "ELB". Controls how health checking is done. 800 HealthCheckType *string `pulumi:"healthCheckType"` 801 // Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. 802 IgnoreFailedScalingActivities *bool `pulumi:"ignoreFailedScalingActivities"` 803 // One or more 804 // [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) 805 // to attach to the Auto Scaling Group **before** instances are launched. The 806 // syntax is exactly the same as the separate 807 // `autoscaling.LifecycleHook` 808 // resource, without the `autoscalingGroupName` attribute. Please note that this will only work when creating 809 // a new Auto Scaling Group. For all other use-cases, please use `autoscaling.LifecycleHook` resource. 810 InitialLifecycleHooks []GroupInitialLifecycleHook `pulumi:"initialLifecycleHooks"` 811 // If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. 812 InstanceMaintenancePolicy *GroupInstanceMaintenancePolicy `pulumi:"instanceMaintenancePolicy"` 813 // If this block is configured, start an 814 // [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) 815 // when this Auto Scaling Group is updated. Defined below. 816 InstanceRefresh *GroupInstanceRefresh `pulumi:"instanceRefresh"` 817 // Name of the launch configuration to use. 818 LaunchConfiguration interface{} `pulumi:"launchConfiguration"` 819 // Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. 820 LaunchTemplate *GroupLaunchTemplate `pulumi:"launchTemplate"` 821 // List of elastic load balancer names to add to the autoscaling 822 // group names. Only valid for classic load balancers. For ALBs, use `targetGroupArns` instead. To remove all load balancer attachments an empty list should be specified. 823 LoadBalancers []string `pulumi:"loadBalancers"` 824 // Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. 825 MaxInstanceLifetime *int `pulumi:"maxInstanceLifetime"` 826 // Maximum size of the Auto Scaling Group. 827 MaxSize *int `pulumi:"maxSize"` 828 // Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. 829 MetricsGranularity *string `pulumi:"metricsGranularity"` 830 // Setting this causes Pulumi to wait for 831 // this number of instances from this Auto Scaling Group to show up healthy in the 832 // ELB only on creation. Updates will not wait on ELB instance number changes. 833 // (See also Waiting for Capacity below.) 834 MinElbCapacity *int `pulumi:"minElbCapacity"` 835 // Minimum size of the Auto Scaling Group. 836 // (See also Waiting for Capacity below.) 837 MinSize *int `pulumi:"minSize"` 838 // Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. 839 MixedInstancesPolicy *GroupMixedInstancesPolicy `pulumi:"mixedInstancesPolicy"` 840 // Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `namePrefix`. 841 Name *string `pulumi:"name"` 842 // Creates a unique name beginning with the specified 843 // prefix. Conflicts with `name`. 844 NamePrefix *string `pulumi:"namePrefix"` 845 // Name of the placement group into which you'll launch your instances, if any. 846 PlacementGroup interface{} `pulumi:"placementGroup"` 847 // Predicted capacity of the group. 848 PredictedCapacity *int `pulumi:"predictedCapacity"` 849 // Whether newly launched instances 850 // are automatically protected from termination by Amazon EC2 Auto Scaling when 851 // scaling in. For more information about preventing instances from terminating 852 // on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) 853 // in the Amazon EC2 Auto Scaling User Guide. 854 ProtectFromScaleIn *bool `pulumi:"protectFromScaleIn"` 855 // ARN of the service-linked role that the ASG will use to call other AWS services 856 ServiceLinkedRoleArn *string `pulumi:"serviceLinkedRoleArn"` 857 // List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. 858 // Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. 859 SuspendedProcesses []string `pulumi:"suspendedProcesses"` 860 // Configuration block(s) containing resource tags. See Tag below for more details. 861 Tags []GroupTag `pulumi:"tags"` 862 // Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. 863 TargetGroupArns []string `pulumi:"targetGroupArns"` 864 // List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. 865 TerminationPolicies []string `pulumi:"terminationPolicies"` 866 // Attaches one or more traffic sources to the specified Auto Scaling group. 867 TrafficSources []GroupTrafficSource `pulumi:"trafficSources"` 868 // List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availabilityZones`. 869 VpcZoneIdentifiers []string `pulumi:"vpcZoneIdentifiers"` 870 // Maximum 871 // [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should 872 // wait for ASG instances to be healthy before timing out. (See also Waiting 873 // for Capacity below.) Setting this to "0" causes 874 // the provider to skip all Capacity Waiting behavior. 875 WaitForCapacityTimeout *string `pulumi:"waitForCapacityTimeout"` 876 // Setting this will cause Pulumi to wait 877 // for exactly this number of healthy instances from this Auto Scaling Group in 878 // all attached load balancers on both create and update operations. (Takes 879 // precedence over `minElbCapacity` behavior.) 880 // (See also Waiting for Capacity below.) 881 WaitForElbCapacity *int `pulumi:"waitForElbCapacity"` 882 // If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) 883 // to the specified Auto Scaling group. Defined below 884 WarmPool *GroupWarmPool `pulumi:"warmPool"` 885 // Current size of the warm pool. 886 WarmPoolSize *int `pulumi:"warmPoolSize"` 887 } 888 889 type GroupState struct { 890 // ARN for this Auto Scaling Group 891 Arn pulumi.StringPtrInput 892 // A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpcZoneIdentifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpcZoneIdentifier`. 893 AvailabilityZones pulumi.StringArrayInput 894 // Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. 895 CapacityRebalance pulumi.BoolPtrInput 896 // Reserved. 897 Context pulumi.StringPtrInput 898 // Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. 899 DefaultCooldown pulumi.IntPtrInput 900 // Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) 901 DefaultInstanceWarmup pulumi.IntPtrInput 902 // Number of Amazon EC2 instances that 903 // should be running in the group. (See also Waiting for 904 // Capacity below.) 905 DesiredCapacity pulumi.IntPtrInput 906 // The unit of measurement for the value specified for `desiredCapacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. 907 DesiredCapacityType pulumi.StringPtrInput 908 // List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). 909 EnabledMetrics pulumi.StringArrayInput 910 // Allows deleting the Auto Scaling Group without waiting 911 // for all instances in the pool to terminate. You can force an Auto Scaling Group to delete 912 // even if it's in the process of scaling a resource. Normally, this provider 913 // drains all the instances before deleting the group. This bypasses that 914 // behavior and potentially leaves resources dangling. 915 ForceDelete pulumi.BoolPtrInput 916 // Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. 917 ForceDeleteWarmPool pulumi.BoolPtrInput 918 // Time (in seconds) after instance comes into service before checking health. 919 HealthCheckGracePeriod pulumi.IntPtrInput 920 // "EC2" or "ELB". Controls how health checking is done. 921 HealthCheckType pulumi.StringPtrInput 922 // Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. 923 IgnoreFailedScalingActivities pulumi.BoolPtrInput 924 // One or more 925 // [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) 926 // to attach to the Auto Scaling Group **before** instances are launched. The 927 // syntax is exactly the same as the separate 928 // `autoscaling.LifecycleHook` 929 // resource, without the `autoscalingGroupName` attribute. Please note that this will only work when creating 930 // a new Auto Scaling Group. For all other use-cases, please use `autoscaling.LifecycleHook` resource. 931 InitialLifecycleHooks GroupInitialLifecycleHookArrayInput 932 // If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. 933 InstanceMaintenancePolicy GroupInstanceMaintenancePolicyPtrInput 934 // If this block is configured, start an 935 // [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) 936 // when this Auto Scaling Group is updated. Defined below. 937 InstanceRefresh GroupInstanceRefreshPtrInput 938 // Name of the launch configuration to use. 939 LaunchConfiguration pulumi.Input 940 // Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. 941 LaunchTemplate GroupLaunchTemplatePtrInput 942 // List of elastic load balancer names to add to the autoscaling 943 // group names. Only valid for classic load balancers. For ALBs, use `targetGroupArns` instead. To remove all load balancer attachments an empty list should be specified. 944 LoadBalancers pulumi.StringArrayInput 945 // Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. 946 MaxInstanceLifetime pulumi.IntPtrInput 947 // Maximum size of the Auto Scaling Group. 948 MaxSize pulumi.IntPtrInput 949 // Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. 950 MetricsGranularity pulumi.StringPtrInput 951 // Setting this causes Pulumi to wait for 952 // this number of instances from this Auto Scaling Group to show up healthy in the 953 // ELB only on creation. Updates will not wait on ELB instance number changes. 954 // (See also Waiting for Capacity below.) 955 MinElbCapacity pulumi.IntPtrInput 956 // Minimum size of the Auto Scaling Group. 957 // (See also Waiting for Capacity below.) 958 MinSize pulumi.IntPtrInput 959 // Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. 960 MixedInstancesPolicy GroupMixedInstancesPolicyPtrInput 961 // Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `namePrefix`. 962 Name pulumi.StringPtrInput 963 // Creates a unique name beginning with the specified 964 // prefix. Conflicts with `name`. 965 NamePrefix pulumi.StringPtrInput 966 // Name of the placement group into which you'll launch your instances, if any. 967 PlacementGroup pulumi.Input 968 // Predicted capacity of the group. 969 PredictedCapacity pulumi.IntPtrInput 970 // Whether newly launched instances 971 // are automatically protected from termination by Amazon EC2 Auto Scaling when 972 // scaling in. For more information about preventing instances from terminating 973 // on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) 974 // in the Amazon EC2 Auto Scaling User Guide. 975 ProtectFromScaleIn pulumi.BoolPtrInput 976 // ARN of the service-linked role that the ASG will use to call other AWS services 977 ServiceLinkedRoleArn pulumi.StringPtrInput 978 // List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. 979 // Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. 980 SuspendedProcesses pulumi.StringArrayInput 981 // Configuration block(s) containing resource tags. See Tag below for more details. 982 Tags GroupTagArrayInput 983 // Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. 984 TargetGroupArns pulumi.StringArrayInput 985 // List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. 986 TerminationPolicies pulumi.StringArrayInput 987 // Attaches one or more traffic sources to the specified Auto Scaling group. 988 TrafficSources GroupTrafficSourceArrayInput 989 // List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availabilityZones`. 990 VpcZoneIdentifiers pulumi.StringArrayInput 991 // Maximum 992 // [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should 993 // wait for ASG instances to be healthy before timing out. (See also Waiting 994 // for Capacity below.) Setting this to "0" causes 995 // the provider to skip all Capacity Waiting behavior. 996 WaitForCapacityTimeout pulumi.StringPtrInput 997 // Setting this will cause Pulumi to wait 998 // for exactly this number of healthy instances from this Auto Scaling Group in 999 // all attached load balancers on both create and update operations. (Takes 1000 // precedence over `minElbCapacity` behavior.) 1001 // (See also Waiting for Capacity below.) 1002 WaitForElbCapacity pulumi.IntPtrInput 1003 // If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) 1004 // to the specified Auto Scaling group. Defined below 1005 WarmPool GroupWarmPoolPtrInput 1006 // Current size of the warm pool. 1007 WarmPoolSize pulumi.IntPtrInput 1008 } 1009 1010 func (GroupState) ElementType() reflect.Type { 1011 return reflect.TypeOf((*groupState)(nil)).Elem() 1012 } 1013 1014 type groupArgs struct { 1015 // A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpcZoneIdentifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpcZoneIdentifier`. 1016 AvailabilityZones []string `pulumi:"availabilityZones"` 1017 // Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. 1018 CapacityRebalance *bool `pulumi:"capacityRebalance"` 1019 // Reserved. 1020 Context *string `pulumi:"context"` 1021 // Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. 1022 DefaultCooldown *int `pulumi:"defaultCooldown"` 1023 // Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) 1024 DefaultInstanceWarmup *int `pulumi:"defaultInstanceWarmup"` 1025 // Number of Amazon EC2 instances that 1026 // should be running in the group. (See also Waiting for 1027 // Capacity below.) 1028 DesiredCapacity *int `pulumi:"desiredCapacity"` 1029 // The unit of measurement for the value specified for `desiredCapacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. 1030 DesiredCapacityType *string `pulumi:"desiredCapacityType"` 1031 // List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). 1032 EnabledMetrics []string `pulumi:"enabledMetrics"` 1033 // Allows deleting the Auto Scaling Group without waiting 1034 // for all instances in the pool to terminate. You can force an Auto Scaling Group to delete 1035 // even if it's in the process of scaling a resource. Normally, this provider 1036 // drains all the instances before deleting the group. This bypasses that 1037 // behavior and potentially leaves resources dangling. 1038 ForceDelete *bool `pulumi:"forceDelete"` 1039 // Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. 1040 ForceDeleteWarmPool *bool `pulumi:"forceDeleteWarmPool"` 1041 // Time (in seconds) after instance comes into service before checking health. 1042 HealthCheckGracePeriod *int `pulumi:"healthCheckGracePeriod"` 1043 // "EC2" or "ELB". Controls how health checking is done. 1044 HealthCheckType *string `pulumi:"healthCheckType"` 1045 // Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. 1046 IgnoreFailedScalingActivities *bool `pulumi:"ignoreFailedScalingActivities"` 1047 // One or more 1048 // [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) 1049 // to attach to the Auto Scaling Group **before** instances are launched. The 1050 // syntax is exactly the same as the separate 1051 // `autoscaling.LifecycleHook` 1052 // resource, without the `autoscalingGroupName` attribute. Please note that this will only work when creating 1053 // a new Auto Scaling Group. For all other use-cases, please use `autoscaling.LifecycleHook` resource. 1054 InitialLifecycleHooks []GroupInitialLifecycleHook `pulumi:"initialLifecycleHooks"` 1055 // If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. 1056 InstanceMaintenancePolicy *GroupInstanceMaintenancePolicy `pulumi:"instanceMaintenancePolicy"` 1057 // If this block is configured, start an 1058 // [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) 1059 // when this Auto Scaling Group is updated. Defined below. 1060 InstanceRefresh *GroupInstanceRefresh `pulumi:"instanceRefresh"` 1061 // Name of the launch configuration to use. 1062 LaunchConfiguration interface{} `pulumi:"launchConfiguration"` 1063 // Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. 1064 LaunchTemplate *GroupLaunchTemplate `pulumi:"launchTemplate"` 1065 // List of elastic load balancer names to add to the autoscaling 1066 // group names. Only valid for classic load balancers. For ALBs, use `targetGroupArns` instead. To remove all load balancer attachments an empty list should be specified. 1067 LoadBalancers []string `pulumi:"loadBalancers"` 1068 // Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. 1069 MaxInstanceLifetime *int `pulumi:"maxInstanceLifetime"` 1070 // Maximum size of the Auto Scaling Group. 1071 MaxSize int `pulumi:"maxSize"` 1072 // Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. 1073 MetricsGranularity *string `pulumi:"metricsGranularity"` 1074 // Setting this causes Pulumi to wait for 1075 // this number of instances from this Auto Scaling Group to show up healthy in the 1076 // ELB only on creation. Updates will not wait on ELB instance number changes. 1077 // (See also Waiting for Capacity below.) 1078 MinElbCapacity *int `pulumi:"minElbCapacity"` 1079 // Minimum size of the Auto Scaling Group. 1080 // (See also Waiting for Capacity below.) 1081 MinSize int `pulumi:"minSize"` 1082 // Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. 1083 MixedInstancesPolicy *GroupMixedInstancesPolicy `pulumi:"mixedInstancesPolicy"` 1084 // Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `namePrefix`. 1085 Name *string `pulumi:"name"` 1086 // Creates a unique name beginning with the specified 1087 // prefix. Conflicts with `name`. 1088 NamePrefix *string `pulumi:"namePrefix"` 1089 // Name of the placement group into which you'll launch your instances, if any. 1090 PlacementGroup interface{} `pulumi:"placementGroup"` 1091 // Whether newly launched instances 1092 // are automatically protected from termination by Amazon EC2 Auto Scaling when 1093 // scaling in. For more information about preventing instances from terminating 1094 // on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) 1095 // in the Amazon EC2 Auto Scaling User Guide. 1096 ProtectFromScaleIn *bool `pulumi:"protectFromScaleIn"` 1097 // ARN of the service-linked role that the ASG will use to call other AWS services 1098 ServiceLinkedRoleArn *string `pulumi:"serviceLinkedRoleArn"` 1099 // List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. 1100 // Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. 1101 SuspendedProcesses []string `pulumi:"suspendedProcesses"` 1102 // Configuration block(s) containing resource tags. See Tag below for more details. 1103 Tags []GroupTag `pulumi:"tags"` 1104 // Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. 1105 TargetGroupArns []string `pulumi:"targetGroupArns"` 1106 // List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. 1107 TerminationPolicies []string `pulumi:"terminationPolicies"` 1108 // Attaches one or more traffic sources to the specified Auto Scaling group. 1109 TrafficSources []GroupTrafficSource `pulumi:"trafficSources"` 1110 // List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availabilityZones`. 1111 VpcZoneIdentifiers []string `pulumi:"vpcZoneIdentifiers"` 1112 // Maximum 1113 // [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should 1114 // wait for ASG instances to be healthy before timing out. (See also Waiting 1115 // for Capacity below.) Setting this to "0" causes 1116 // the provider to skip all Capacity Waiting behavior. 1117 WaitForCapacityTimeout *string `pulumi:"waitForCapacityTimeout"` 1118 // Setting this will cause Pulumi to wait 1119 // for exactly this number of healthy instances from this Auto Scaling Group in 1120 // all attached load balancers on both create and update operations. (Takes 1121 // precedence over `minElbCapacity` behavior.) 1122 // (See also Waiting for Capacity below.) 1123 WaitForElbCapacity *int `pulumi:"waitForElbCapacity"` 1124 // If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) 1125 // to the specified Auto Scaling group. Defined below 1126 WarmPool *GroupWarmPool `pulumi:"warmPool"` 1127 } 1128 1129 // The set of arguments for constructing a Group resource. 1130 type GroupArgs struct { 1131 // A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpcZoneIdentifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpcZoneIdentifier`. 1132 AvailabilityZones pulumi.StringArrayInput 1133 // Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. 1134 CapacityRebalance pulumi.BoolPtrInput 1135 // Reserved. 1136 Context pulumi.StringPtrInput 1137 // Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. 1138 DefaultCooldown pulumi.IntPtrInput 1139 // Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) 1140 DefaultInstanceWarmup pulumi.IntPtrInput 1141 // Number of Amazon EC2 instances that 1142 // should be running in the group. (See also Waiting for 1143 // Capacity below.) 1144 DesiredCapacity pulumi.IntPtrInput 1145 // The unit of measurement for the value specified for `desiredCapacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. 1146 DesiredCapacityType pulumi.StringPtrInput 1147 // List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). 1148 EnabledMetrics pulumi.StringArrayInput 1149 // Allows deleting the Auto Scaling Group without waiting 1150 // for all instances in the pool to terminate. You can force an Auto Scaling Group to delete 1151 // even if it's in the process of scaling a resource. Normally, this provider 1152 // drains all the instances before deleting the group. This bypasses that 1153 // behavior and potentially leaves resources dangling. 1154 ForceDelete pulumi.BoolPtrInput 1155 // Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. 1156 ForceDeleteWarmPool pulumi.BoolPtrInput 1157 // Time (in seconds) after instance comes into service before checking health. 1158 HealthCheckGracePeriod pulumi.IntPtrInput 1159 // "EC2" or "ELB". Controls how health checking is done. 1160 HealthCheckType pulumi.StringPtrInput 1161 // Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. 1162 IgnoreFailedScalingActivities pulumi.BoolPtrInput 1163 // One or more 1164 // [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) 1165 // to attach to the Auto Scaling Group **before** instances are launched. The 1166 // syntax is exactly the same as the separate 1167 // `autoscaling.LifecycleHook` 1168 // resource, without the `autoscalingGroupName` attribute. Please note that this will only work when creating 1169 // a new Auto Scaling Group. For all other use-cases, please use `autoscaling.LifecycleHook` resource. 1170 InitialLifecycleHooks GroupInitialLifecycleHookArrayInput 1171 // If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. 1172 InstanceMaintenancePolicy GroupInstanceMaintenancePolicyPtrInput 1173 // If this block is configured, start an 1174 // [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) 1175 // when this Auto Scaling Group is updated. Defined below. 1176 InstanceRefresh GroupInstanceRefreshPtrInput 1177 // Name of the launch configuration to use. 1178 LaunchConfiguration pulumi.Input 1179 // Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. 1180 LaunchTemplate GroupLaunchTemplatePtrInput 1181 // List of elastic load balancer names to add to the autoscaling 1182 // group names. Only valid for classic load balancers. For ALBs, use `targetGroupArns` instead. To remove all load balancer attachments an empty list should be specified. 1183 LoadBalancers pulumi.StringArrayInput 1184 // Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. 1185 MaxInstanceLifetime pulumi.IntPtrInput 1186 // Maximum size of the Auto Scaling Group. 1187 MaxSize pulumi.IntInput 1188 // Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. 1189 MetricsGranularity pulumi.StringPtrInput 1190 // Setting this causes Pulumi to wait for 1191 // this number of instances from this Auto Scaling Group to show up healthy in the 1192 // ELB only on creation. Updates will not wait on ELB instance number changes. 1193 // (See also Waiting for Capacity below.) 1194 MinElbCapacity pulumi.IntPtrInput 1195 // Minimum size of the Auto Scaling Group. 1196 // (See also Waiting for Capacity below.) 1197 MinSize pulumi.IntInput 1198 // Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. 1199 MixedInstancesPolicy GroupMixedInstancesPolicyPtrInput 1200 // Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `namePrefix`. 1201 Name pulumi.StringPtrInput 1202 // Creates a unique name beginning with the specified 1203 // prefix. Conflicts with `name`. 1204 NamePrefix pulumi.StringPtrInput 1205 // Name of the placement group into which you'll launch your instances, if any. 1206 PlacementGroup pulumi.Input 1207 // Whether newly launched instances 1208 // are automatically protected from termination by Amazon EC2 Auto Scaling when 1209 // scaling in. For more information about preventing instances from terminating 1210 // on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) 1211 // in the Amazon EC2 Auto Scaling User Guide. 1212 ProtectFromScaleIn pulumi.BoolPtrInput 1213 // ARN of the service-linked role that the ASG will use to call other AWS services 1214 ServiceLinkedRoleArn pulumi.StringPtrInput 1215 // List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. 1216 // Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. 1217 SuspendedProcesses pulumi.StringArrayInput 1218 // Configuration block(s) containing resource tags. See Tag below for more details. 1219 Tags GroupTagArrayInput 1220 // Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. 1221 TargetGroupArns pulumi.StringArrayInput 1222 // List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. 1223 TerminationPolicies pulumi.StringArrayInput 1224 // Attaches one or more traffic sources to the specified Auto Scaling group. 1225 TrafficSources GroupTrafficSourceArrayInput 1226 // List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availabilityZones`. 1227 VpcZoneIdentifiers pulumi.StringArrayInput 1228 // Maximum 1229 // [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should 1230 // wait for ASG instances to be healthy before timing out. (See also Waiting 1231 // for Capacity below.) Setting this to "0" causes 1232 // the provider to skip all Capacity Waiting behavior. 1233 WaitForCapacityTimeout pulumi.StringPtrInput 1234 // Setting this will cause Pulumi to wait 1235 // for exactly this number of healthy instances from this Auto Scaling Group in 1236 // all attached load balancers on both create and update operations. (Takes 1237 // precedence over `minElbCapacity` behavior.) 1238 // (See also Waiting for Capacity below.) 1239 WaitForElbCapacity pulumi.IntPtrInput 1240 // If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) 1241 // to the specified Auto Scaling group. Defined below 1242 WarmPool GroupWarmPoolPtrInput 1243 } 1244 1245 func (GroupArgs) ElementType() reflect.Type { 1246 return reflect.TypeOf((*groupArgs)(nil)).Elem() 1247 } 1248 1249 type GroupInput interface { 1250 pulumi.Input 1251 1252 ToGroupOutput() GroupOutput 1253 ToGroupOutputWithContext(ctx context.Context) GroupOutput 1254 } 1255 1256 func (*Group) ElementType() reflect.Type { 1257 return reflect.TypeOf((**Group)(nil)).Elem() 1258 } 1259 1260 func (i *Group) ToGroupOutput() GroupOutput { 1261 return i.ToGroupOutputWithContext(context.Background()) 1262 } 1263 1264 func (i *Group) ToGroupOutputWithContext(ctx context.Context) GroupOutput { 1265 return pulumi.ToOutputWithContext(ctx, i).(GroupOutput) 1266 } 1267 1268 // GroupArrayInput is an input type that accepts GroupArray and GroupArrayOutput values. 1269 // You can construct a concrete instance of `GroupArrayInput` via: 1270 // 1271 // GroupArray{ GroupArgs{...} } 1272 type GroupArrayInput interface { 1273 pulumi.Input 1274 1275 ToGroupArrayOutput() GroupArrayOutput 1276 ToGroupArrayOutputWithContext(context.Context) GroupArrayOutput 1277 } 1278 1279 type GroupArray []GroupInput 1280 1281 func (GroupArray) ElementType() reflect.Type { 1282 return reflect.TypeOf((*[]*Group)(nil)).Elem() 1283 } 1284 1285 func (i GroupArray) ToGroupArrayOutput() GroupArrayOutput { 1286 return i.ToGroupArrayOutputWithContext(context.Background()) 1287 } 1288 1289 func (i GroupArray) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput { 1290 return pulumi.ToOutputWithContext(ctx, i).(GroupArrayOutput) 1291 } 1292 1293 // GroupMapInput is an input type that accepts GroupMap and GroupMapOutput values. 1294 // You can construct a concrete instance of `GroupMapInput` via: 1295 // 1296 // GroupMap{ "key": GroupArgs{...} } 1297 type GroupMapInput interface { 1298 pulumi.Input 1299 1300 ToGroupMapOutput() GroupMapOutput 1301 ToGroupMapOutputWithContext(context.Context) GroupMapOutput 1302 } 1303 1304 type GroupMap map[string]GroupInput 1305 1306 func (GroupMap) ElementType() reflect.Type { 1307 return reflect.TypeOf((*map[string]*Group)(nil)).Elem() 1308 } 1309 1310 func (i GroupMap) ToGroupMapOutput() GroupMapOutput { 1311 return i.ToGroupMapOutputWithContext(context.Background()) 1312 } 1313 1314 func (i GroupMap) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput { 1315 return pulumi.ToOutputWithContext(ctx, i).(GroupMapOutput) 1316 } 1317 1318 type GroupOutput struct{ *pulumi.OutputState } 1319 1320 func (GroupOutput) ElementType() reflect.Type { 1321 return reflect.TypeOf((**Group)(nil)).Elem() 1322 } 1323 1324 func (o GroupOutput) ToGroupOutput() GroupOutput { 1325 return o 1326 } 1327 1328 func (o GroupOutput) ToGroupOutputWithContext(ctx context.Context) GroupOutput { 1329 return o 1330 } 1331 1332 // ARN for this Auto Scaling Group 1333 func (o GroupOutput) Arn() pulumi.StringOutput { 1334 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 1335 } 1336 1337 // A list of Availability Zones where instances in the Auto Scaling group can be created. Used for launching into the default VPC subnet in each Availability Zone when not using the `vpcZoneIdentifier` attribute, or for attaching a network interface when an existing network interface ID is specified in a launch template. Conflicts with `vpcZoneIdentifier`. 1338 func (o GroupOutput) AvailabilityZones() pulumi.StringArrayOutput { 1339 return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.AvailabilityZones }).(pulumi.StringArrayOutput) 1340 } 1341 1342 // Whether capacity rebalance is enabled. Otherwise, capacity rebalance is disabled. 1343 func (o GroupOutput) CapacityRebalance() pulumi.BoolPtrOutput { 1344 return o.ApplyT(func(v *Group) pulumi.BoolPtrOutput { return v.CapacityRebalance }).(pulumi.BoolPtrOutput) 1345 } 1346 1347 // Reserved. 1348 func (o GroupOutput) Context() pulumi.StringPtrOutput { 1349 return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.Context }).(pulumi.StringPtrOutput) 1350 } 1351 1352 // Amount of time, in seconds, after a scaling activity completes before another scaling activity can start. 1353 func (o GroupOutput) DefaultCooldown() pulumi.IntOutput { 1354 return o.ApplyT(func(v *Group) pulumi.IntOutput { return v.DefaultCooldown }).(pulumi.IntOutput) 1355 } 1356 1357 // Amount of time, in seconds, until a newly launched instance can contribute to the Amazon CloudWatch metrics. This delay lets an instance finish initializing before Amazon EC2 Auto Scaling aggregates instance metrics, resulting in more reliable usage data. Set this value equal to the amount of time that it takes for resource consumption to become stable after an instance reaches the InService state. (See [Set the default instance warmup for an Auto Scaling group](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-default-instance-warmup.html)) 1358 func (o GroupOutput) DefaultInstanceWarmup() pulumi.IntPtrOutput { 1359 return o.ApplyT(func(v *Group) pulumi.IntPtrOutput { return v.DefaultInstanceWarmup }).(pulumi.IntPtrOutput) 1360 } 1361 1362 // Number of Amazon EC2 instances that 1363 // should be running in the group. (See also Waiting for 1364 // Capacity below.) 1365 func (o GroupOutput) DesiredCapacity() pulumi.IntOutput { 1366 return o.ApplyT(func(v *Group) pulumi.IntOutput { return v.DesiredCapacity }).(pulumi.IntOutput) 1367 } 1368 1369 // The unit of measurement for the value specified for `desiredCapacity`. Supported for attribute-based instance type selection only. Valid values: `"units"`, `"vcpu"`, `"memory-mib"`. 1370 func (o GroupOutput) DesiredCapacityType() pulumi.StringPtrOutput { 1371 return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.DesiredCapacityType }).(pulumi.StringPtrOutput) 1372 } 1373 1374 // List of metrics to collect. The allowed values are defined by the [underlying AWS API](https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_EnableMetricsCollection.html). 1375 func (o GroupOutput) EnabledMetrics() pulumi.StringArrayOutput { 1376 return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.EnabledMetrics }).(pulumi.StringArrayOutput) 1377 } 1378 1379 // Allows deleting the Auto Scaling Group without waiting 1380 // for all instances in the pool to terminate. You can force an Auto Scaling Group to delete 1381 // even if it's in the process of scaling a resource. Normally, this provider 1382 // drains all the instances before deleting the group. This bypasses that 1383 // behavior and potentially leaves resources dangling. 1384 func (o GroupOutput) ForceDelete() pulumi.BoolPtrOutput { 1385 return o.ApplyT(func(v *Group) pulumi.BoolPtrOutput { return v.ForceDelete }).(pulumi.BoolPtrOutput) 1386 } 1387 1388 // Allows deleting the Auto Scaling Group without waiting for all instances in the warm pool to terminate. 1389 func (o GroupOutput) ForceDeleteWarmPool() pulumi.BoolPtrOutput { 1390 return o.ApplyT(func(v *Group) pulumi.BoolPtrOutput { return v.ForceDeleteWarmPool }).(pulumi.BoolPtrOutput) 1391 } 1392 1393 // Time (in seconds) after instance comes into service before checking health. 1394 func (o GroupOutput) HealthCheckGracePeriod() pulumi.IntPtrOutput { 1395 return o.ApplyT(func(v *Group) pulumi.IntPtrOutput { return v.HealthCheckGracePeriod }).(pulumi.IntPtrOutput) 1396 } 1397 1398 // "EC2" or "ELB". Controls how health checking is done. 1399 func (o GroupOutput) HealthCheckType() pulumi.StringOutput { 1400 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.HealthCheckType }).(pulumi.StringOutput) 1401 } 1402 1403 // Whether to ignore failed [Auto Scaling scaling activities](https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-verify-scaling-activity.html) while waiting for capacity. The default is `false` -- failed scaling activities cause errors to be returned. 1404 func (o GroupOutput) IgnoreFailedScalingActivities() pulumi.BoolPtrOutput { 1405 return o.ApplyT(func(v *Group) pulumi.BoolPtrOutput { return v.IgnoreFailedScalingActivities }).(pulumi.BoolPtrOutput) 1406 } 1407 1408 // One or more 1409 // [Lifecycle Hooks](http://docs.aws.amazon.com/autoscaling/latest/userguide/lifecycle-hooks.html) 1410 // to attach to the Auto Scaling Group **before** instances are launched. The 1411 // syntax is exactly the same as the separate 1412 // `autoscaling.LifecycleHook` 1413 // resource, without the `autoscalingGroupName` attribute. Please note that this will only work when creating 1414 // a new Auto Scaling Group. For all other use-cases, please use `autoscaling.LifecycleHook` resource. 1415 func (o GroupOutput) InitialLifecycleHooks() GroupInitialLifecycleHookArrayOutput { 1416 return o.ApplyT(func(v *Group) GroupInitialLifecycleHookArrayOutput { return v.InitialLifecycleHooks }).(GroupInitialLifecycleHookArrayOutput) 1417 } 1418 1419 // If this block is configured, add a instance maintenance policy to the specified Auto Scaling group. Defined below. 1420 func (o GroupOutput) InstanceMaintenancePolicy() GroupInstanceMaintenancePolicyPtrOutput { 1421 return o.ApplyT(func(v *Group) GroupInstanceMaintenancePolicyPtrOutput { return v.InstanceMaintenancePolicy }).(GroupInstanceMaintenancePolicyPtrOutput) 1422 } 1423 1424 // If this block is configured, start an 1425 // [Instance Refresh](https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html) 1426 // when this Auto Scaling Group is updated. Defined below. 1427 func (o GroupOutput) InstanceRefresh() GroupInstanceRefreshPtrOutput { 1428 return o.ApplyT(func(v *Group) GroupInstanceRefreshPtrOutput { return v.InstanceRefresh }).(GroupInstanceRefreshPtrOutput) 1429 } 1430 1431 // Name of the launch configuration to use. 1432 func (o GroupOutput) LaunchConfiguration() pulumi.StringPtrOutput { 1433 return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.LaunchConfiguration }).(pulumi.StringPtrOutput) 1434 } 1435 1436 // Nested argument with Launch template specification to use to launch instances. See Launch Template below for more details. 1437 func (o GroupOutput) LaunchTemplate() GroupLaunchTemplateOutput { 1438 return o.ApplyT(func(v *Group) GroupLaunchTemplateOutput { return v.LaunchTemplate }).(GroupLaunchTemplateOutput) 1439 } 1440 1441 // List of elastic load balancer names to add to the autoscaling 1442 // group names. Only valid for classic load balancers. For ALBs, use `targetGroupArns` instead. To remove all load balancer attachments an empty list should be specified. 1443 func (o GroupOutput) LoadBalancers() pulumi.StringArrayOutput { 1444 return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.LoadBalancers }).(pulumi.StringArrayOutput) 1445 } 1446 1447 // Maximum amount of time, in seconds, that an instance can be in service, values must be either equal to 0 or between 86400 and 31536000 seconds. 1448 func (o GroupOutput) MaxInstanceLifetime() pulumi.IntPtrOutput { 1449 return o.ApplyT(func(v *Group) pulumi.IntPtrOutput { return v.MaxInstanceLifetime }).(pulumi.IntPtrOutput) 1450 } 1451 1452 // Maximum size of the Auto Scaling Group. 1453 func (o GroupOutput) MaxSize() pulumi.IntOutput { 1454 return o.ApplyT(func(v *Group) pulumi.IntOutput { return v.MaxSize }).(pulumi.IntOutput) 1455 } 1456 1457 // Granularity to associate with the metrics to collect. The only valid value is `1Minute`. Default is `1Minute`. 1458 func (o GroupOutput) MetricsGranularity() pulumi.StringPtrOutput { 1459 return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.MetricsGranularity }).(pulumi.StringPtrOutput) 1460 } 1461 1462 // Setting this causes Pulumi to wait for 1463 // this number of instances from this Auto Scaling Group to show up healthy in the 1464 // ELB only on creation. Updates will not wait on ELB instance number changes. 1465 // (See also Waiting for Capacity below.) 1466 func (o GroupOutput) MinElbCapacity() pulumi.IntPtrOutput { 1467 return o.ApplyT(func(v *Group) pulumi.IntPtrOutput { return v.MinElbCapacity }).(pulumi.IntPtrOutput) 1468 } 1469 1470 // Minimum size of the Auto Scaling Group. 1471 // (See also Waiting for Capacity below.) 1472 func (o GroupOutput) MinSize() pulumi.IntOutput { 1473 return o.ApplyT(func(v *Group) pulumi.IntOutput { return v.MinSize }).(pulumi.IntOutput) 1474 } 1475 1476 // Configuration block containing settings to define launch targets for Auto Scaling groups. See Mixed Instances Policy below for more details. 1477 func (o GroupOutput) MixedInstancesPolicy() GroupMixedInstancesPolicyOutput { 1478 return o.ApplyT(func(v *Group) GroupMixedInstancesPolicyOutput { return v.MixedInstancesPolicy }).(GroupMixedInstancesPolicyOutput) 1479 } 1480 1481 // Name of the Auto Scaling Group. By default generated by Pulumi. Conflicts with `namePrefix`. 1482 func (o GroupOutput) Name() pulumi.StringOutput { 1483 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) 1484 } 1485 1486 // Creates a unique name beginning with the specified 1487 // prefix. Conflicts with `name`. 1488 func (o GroupOutput) NamePrefix() pulumi.StringOutput { 1489 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.NamePrefix }).(pulumi.StringOutput) 1490 } 1491 1492 // Name of the placement group into which you'll launch your instances, if any. 1493 func (o GroupOutput) PlacementGroup() pulumi.StringPtrOutput { 1494 return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.PlacementGroup }).(pulumi.StringPtrOutput) 1495 } 1496 1497 // Predicted capacity of the group. 1498 func (o GroupOutput) PredictedCapacity() pulumi.IntOutput { 1499 return o.ApplyT(func(v *Group) pulumi.IntOutput { return v.PredictedCapacity }).(pulumi.IntOutput) 1500 } 1501 1502 // Whether newly launched instances 1503 // are automatically protected from termination by Amazon EC2 Auto Scaling when 1504 // scaling in. For more information about preventing instances from terminating 1505 // on scale in, see [Using instance scale-in protection](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-instance-protection.html) 1506 // in the Amazon EC2 Auto Scaling User Guide. 1507 func (o GroupOutput) ProtectFromScaleIn() pulumi.BoolPtrOutput { 1508 return o.ApplyT(func(v *Group) pulumi.BoolPtrOutput { return v.ProtectFromScaleIn }).(pulumi.BoolPtrOutput) 1509 } 1510 1511 // ARN of the service-linked role that the ASG will use to call other AWS services 1512 func (o GroupOutput) ServiceLinkedRoleArn() pulumi.StringOutput { 1513 return o.ApplyT(func(v *Group) pulumi.StringOutput { return v.ServiceLinkedRoleArn }).(pulumi.StringOutput) 1514 } 1515 1516 // List of processes to suspend for the Auto Scaling Group. The allowed values are `Launch`, `Terminate`, `HealthCheck`, `ReplaceUnhealthy`, `AZRebalance`, `AlarmNotification`, `ScheduledActions`, `AddToLoadBalancer`, `InstanceRefresh`. 1517 // Note that if you suspend either the `Launch` or `Terminate` process types, it can prevent your Auto Scaling Group from functioning properly. 1518 func (o GroupOutput) SuspendedProcesses() pulumi.StringArrayOutput { 1519 return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.SuspendedProcesses }).(pulumi.StringArrayOutput) 1520 } 1521 1522 // Configuration block(s) containing resource tags. See Tag below for more details. 1523 func (o GroupOutput) Tags() GroupTagArrayOutput { 1524 return o.ApplyT(func(v *Group) GroupTagArrayOutput { return v.Tags }).(GroupTagArrayOutput) 1525 } 1526 1527 // Set of `alb.TargetGroup` ARNs, for use with Application or Network Load Balancing. To remove all target group attachments an empty list should be specified. 1528 func (o GroupOutput) TargetGroupArns() pulumi.StringArrayOutput { 1529 return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.TargetGroupArns }).(pulumi.StringArrayOutput) 1530 } 1531 1532 // List of policies to decide how the instances in the Auto Scaling Group should be terminated. The allowed values are `OldestInstance`, `NewestInstance`, `OldestLaunchConfiguration`, `ClosestToNextInstanceHour`, `OldestLaunchTemplate`, `AllocationStrategy`, `Default`. Additionally, the ARN of a Lambda function can be specified for custom termination policies. 1533 func (o GroupOutput) TerminationPolicies() pulumi.StringArrayOutput { 1534 return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.TerminationPolicies }).(pulumi.StringArrayOutput) 1535 } 1536 1537 // Attaches one or more traffic sources to the specified Auto Scaling group. 1538 func (o GroupOutput) TrafficSources() GroupTrafficSourceArrayOutput { 1539 return o.ApplyT(func(v *Group) GroupTrafficSourceArrayOutput { return v.TrafficSources }).(GroupTrafficSourceArrayOutput) 1540 } 1541 1542 // List of subnet IDs to launch resources in. Subnets automatically determine which availability zones the group will reside. Conflicts with `availabilityZones`. 1543 func (o GroupOutput) VpcZoneIdentifiers() pulumi.StringArrayOutput { 1544 return o.ApplyT(func(v *Group) pulumi.StringArrayOutput { return v.VpcZoneIdentifiers }).(pulumi.StringArrayOutput) 1545 } 1546 1547 // Maximum 1548 // [duration](https://golang.org/pkg/time/#ParseDuration) that the provider should 1549 // wait for ASG instances to be healthy before timing out. (See also Waiting 1550 // for Capacity below.) Setting this to "0" causes 1551 // the provider to skip all Capacity Waiting behavior. 1552 func (o GroupOutput) WaitForCapacityTimeout() pulumi.StringPtrOutput { 1553 return o.ApplyT(func(v *Group) pulumi.StringPtrOutput { return v.WaitForCapacityTimeout }).(pulumi.StringPtrOutput) 1554 } 1555 1556 // Setting this will cause Pulumi to wait 1557 // for exactly this number of healthy instances from this Auto Scaling Group in 1558 // all attached load balancers on both create and update operations. (Takes 1559 // precedence over `minElbCapacity` behavior.) 1560 // (See also Waiting for Capacity below.) 1561 func (o GroupOutput) WaitForElbCapacity() pulumi.IntPtrOutput { 1562 return o.ApplyT(func(v *Group) pulumi.IntPtrOutput { return v.WaitForElbCapacity }).(pulumi.IntPtrOutput) 1563 } 1564 1565 // If this block is configured, add a [Warm Pool](https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-warm-pools.html) 1566 // to the specified Auto Scaling group. Defined below 1567 func (o GroupOutput) WarmPool() GroupWarmPoolPtrOutput { 1568 return o.ApplyT(func(v *Group) GroupWarmPoolPtrOutput { return v.WarmPool }).(GroupWarmPoolPtrOutput) 1569 } 1570 1571 // Current size of the warm pool. 1572 func (o GroupOutput) WarmPoolSize() pulumi.IntOutput { 1573 return o.ApplyT(func(v *Group) pulumi.IntOutput { return v.WarmPoolSize }).(pulumi.IntOutput) 1574 } 1575 1576 type GroupArrayOutput struct{ *pulumi.OutputState } 1577 1578 func (GroupArrayOutput) ElementType() reflect.Type { 1579 return reflect.TypeOf((*[]*Group)(nil)).Elem() 1580 } 1581 1582 func (o GroupArrayOutput) ToGroupArrayOutput() GroupArrayOutput { 1583 return o 1584 } 1585 1586 func (o GroupArrayOutput) ToGroupArrayOutputWithContext(ctx context.Context) GroupArrayOutput { 1587 return o 1588 } 1589 1590 func (o GroupArrayOutput) Index(i pulumi.IntInput) GroupOutput { 1591 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *Group { 1592 return vs[0].([]*Group)[vs[1].(int)] 1593 }).(GroupOutput) 1594 } 1595 1596 type GroupMapOutput struct{ *pulumi.OutputState } 1597 1598 func (GroupMapOutput) ElementType() reflect.Type { 1599 return reflect.TypeOf((*map[string]*Group)(nil)).Elem() 1600 } 1601 1602 func (o GroupMapOutput) ToGroupMapOutput() GroupMapOutput { 1603 return o 1604 } 1605 1606 func (o GroupMapOutput) ToGroupMapOutputWithContext(ctx context.Context) GroupMapOutput { 1607 return o 1608 } 1609 1610 func (o GroupMapOutput) MapIndex(k pulumi.StringInput) GroupOutput { 1611 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *Group { 1612 return vs[0].(map[string]*Group)[vs[1].(string)] 1613 }).(GroupOutput) 1614 } 1615 1616 func init() { 1617 pulumi.RegisterInputType(reflect.TypeOf((*GroupInput)(nil)).Elem(), &Group{}) 1618 pulumi.RegisterInputType(reflect.TypeOf((*GroupArrayInput)(nil)).Elem(), GroupArray{}) 1619 pulumi.RegisterInputType(reflect.TypeOf((*GroupMapInput)(nil)).Elem(), GroupMap{}) 1620 pulumi.RegisterOutputType(GroupOutput{}) 1621 pulumi.RegisterOutputType(GroupArrayOutput{}) 1622 pulumi.RegisterOutputType(GroupMapOutput{}) 1623 }