github.com/pulumi/pulumi-aws/sdk/v6@v6.32.0/go/aws/codedeploy/deploymentGroup.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 codedeploy 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 a CodeDeploy Deployment Group for a CodeDeploy Application 16 // 17 // > **NOTE on blue/green deployments:** When using `greenFleetProvisioningOption` with the `COPY_AUTO_SCALING_GROUP` action, CodeDeploy will create a new ASG with a different name. This ASG is _not_ managed by this provider and will conflict with existing configuration and state. You may want to use a different approach to managing deployments that involve multiple ASG, such as `DISCOVER_EXISTING` with separate blue and green ASG. 18 // 19 // ## Example Usage 20 // 21 // <!--Start PulumiCodeChooser --> 22 // ```go 23 // package main 24 // 25 // import ( 26 // 27 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codedeploy" 28 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/iam" 29 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/sns" 30 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 31 // 32 // ) 33 // 34 // func main() { 35 // pulumi.Run(func(ctx *pulumi.Context) error { 36 // assumeRole, err := iam.GetPolicyDocument(ctx, &iam.GetPolicyDocumentArgs{ 37 // Statements: []iam.GetPolicyDocumentStatement{ 38 // { 39 // Effect: pulumi.StringRef("Allow"), 40 // Principals: []iam.GetPolicyDocumentStatementPrincipal{ 41 // { 42 // Type: "Service", 43 // Identifiers: []string{ 44 // "codedeploy.amazonaws.com", 45 // }, 46 // }, 47 // }, 48 // Actions: []string{ 49 // "sts:AssumeRole", 50 // }, 51 // }, 52 // }, 53 // }, nil) 54 // if err != nil { 55 // return err 56 // } 57 // example, err := iam.NewRole(ctx, "example", &iam.RoleArgs{ 58 // Name: pulumi.String("example-role"), 59 // AssumeRolePolicy: pulumi.String(assumeRole.Json), 60 // }) 61 // if err != nil { 62 // return err 63 // } 64 // _, err = iam.NewRolePolicyAttachment(ctx, "AWSCodeDeployRole", &iam.RolePolicyAttachmentArgs{ 65 // PolicyArn: pulumi.String("arn:aws:iam::aws:policy/service-role/AWSCodeDeployRole"), 66 // Role: example.Name, 67 // }) 68 // if err != nil { 69 // return err 70 // } 71 // exampleApplication, err := codedeploy.NewApplication(ctx, "example", &codedeploy.ApplicationArgs{ 72 // Name: pulumi.String("example-app"), 73 // }) 74 // if err != nil { 75 // return err 76 // } 77 // exampleTopic, err := sns.NewTopic(ctx, "example", &sns.TopicArgs{ 78 // Name: pulumi.String("example-topic"), 79 // }) 80 // if err != nil { 81 // return err 82 // } 83 // _, err = codedeploy.NewDeploymentGroup(ctx, "example", &codedeploy.DeploymentGroupArgs{ 84 // AppName: exampleApplication.Name, 85 // DeploymentGroupName: pulumi.String("example-group"), 86 // ServiceRoleArn: example.Arn, 87 // Ec2TagSets: codedeploy.DeploymentGroupEc2TagSetArray{ 88 // &codedeploy.DeploymentGroupEc2TagSetArgs{ 89 // Ec2TagFilters: codedeploy.DeploymentGroupEc2TagSetEc2TagFilterArray{ 90 // &codedeploy.DeploymentGroupEc2TagSetEc2TagFilterArgs{ 91 // Key: pulumi.String("filterkey1"), 92 // Type: pulumi.String("KEY_AND_VALUE"), 93 // Value: pulumi.String("filtervalue"), 94 // }, 95 // &codedeploy.DeploymentGroupEc2TagSetEc2TagFilterArgs{ 96 // Key: pulumi.String("filterkey2"), 97 // Type: pulumi.String("KEY_AND_VALUE"), 98 // Value: pulumi.String("filtervalue"), 99 // }, 100 // }, 101 // }, 102 // }, 103 // TriggerConfigurations: codedeploy.DeploymentGroupTriggerConfigurationArray{ 104 // &codedeploy.DeploymentGroupTriggerConfigurationArgs{ 105 // TriggerEvents: pulumi.StringArray{ 106 // pulumi.String("DeploymentFailure"), 107 // }, 108 // TriggerName: pulumi.String("example-trigger"), 109 // TriggerTargetArn: exampleTopic.Arn, 110 // }, 111 // }, 112 // AutoRollbackConfiguration: &codedeploy.DeploymentGroupAutoRollbackConfigurationArgs{ 113 // Enabled: pulumi.Bool(true), 114 // Events: pulumi.StringArray{ 115 // pulumi.String("DEPLOYMENT_FAILURE"), 116 // }, 117 // }, 118 // AlarmConfiguration: &codedeploy.DeploymentGroupAlarmConfigurationArgs{ 119 // Alarms: pulumi.StringArray{ 120 // pulumi.String("my-alarm-name"), 121 // }, 122 // Enabled: pulumi.Bool(true), 123 // }, 124 // OutdatedInstancesStrategy: pulumi.String("UPDATE"), 125 // }) 126 // if err != nil { 127 // return err 128 // } 129 // return nil 130 // }) 131 // } 132 // 133 // ``` 134 // <!--End PulumiCodeChooser --> 135 // 136 // ### Blue Green Deployments with ECS 137 // 138 // <!--Start PulumiCodeChooser --> 139 // ```go 140 // package main 141 // 142 // import ( 143 // 144 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codedeploy" 145 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 146 // 147 // ) 148 // 149 // func main() { 150 // pulumi.Run(func(ctx *pulumi.Context) error { 151 // example, err := codedeploy.NewApplication(ctx, "example", &codedeploy.ApplicationArgs{ 152 // ComputePlatform: pulumi.String("ECS"), 153 // Name: pulumi.String("example"), 154 // }) 155 // if err != nil { 156 // return err 157 // } 158 // _, err = codedeploy.NewDeploymentGroup(ctx, "example", &codedeploy.DeploymentGroupArgs{ 159 // AppName: example.Name, 160 // DeploymentConfigName: pulumi.String("CodeDeployDefault.ECSAllAtOnce"), 161 // DeploymentGroupName: pulumi.String("example"), 162 // ServiceRoleArn: pulumi.Any(exampleAwsIamRole.Arn), 163 // AutoRollbackConfiguration: &codedeploy.DeploymentGroupAutoRollbackConfigurationArgs{ 164 // Enabled: pulumi.Bool(true), 165 // Events: pulumi.StringArray{ 166 // pulumi.String("DEPLOYMENT_FAILURE"), 167 // }, 168 // }, 169 // BlueGreenDeploymentConfig: &codedeploy.DeploymentGroupBlueGreenDeploymentConfigArgs{ 170 // DeploymentReadyOption: &codedeploy.DeploymentGroupBlueGreenDeploymentConfigDeploymentReadyOptionArgs{ 171 // ActionOnTimeout: pulumi.String("CONTINUE_DEPLOYMENT"), 172 // }, 173 // TerminateBlueInstancesOnDeploymentSuccess: &codedeploy.DeploymentGroupBlueGreenDeploymentConfigTerminateBlueInstancesOnDeploymentSuccessArgs{ 174 // Action: pulumi.String("TERMINATE"), 175 // TerminationWaitTimeInMinutes: pulumi.Int(5), 176 // }, 177 // }, 178 // DeploymentStyle: &codedeploy.DeploymentGroupDeploymentStyleArgs{ 179 // DeploymentOption: pulumi.String("WITH_TRAFFIC_CONTROL"), 180 // DeploymentType: pulumi.String("BLUE_GREEN"), 181 // }, 182 // EcsService: &codedeploy.DeploymentGroupEcsServiceArgs{ 183 // ClusterName: pulumi.Any(exampleAwsEcsCluster.Name), 184 // ServiceName: pulumi.Any(exampleAwsEcsService.Name), 185 // }, 186 // LoadBalancerInfo: &codedeploy.DeploymentGroupLoadBalancerInfoArgs{ 187 // TargetGroupPairInfo: &codedeploy.DeploymentGroupLoadBalancerInfoTargetGroupPairInfoArgs{ 188 // ProdTrafficRoute: &codedeploy.DeploymentGroupLoadBalancerInfoTargetGroupPairInfoProdTrafficRouteArgs{ 189 // ListenerArns: pulumi.StringArray{ 190 // exampleAwsLbListener.Arn, 191 // }, 192 // }, 193 // TargetGroups: codedeploy.DeploymentGroupLoadBalancerInfoTargetGroupPairInfoTargetGroupArray{ 194 // &codedeploy.DeploymentGroupLoadBalancerInfoTargetGroupPairInfoTargetGroupArgs{ 195 // Name: pulumi.Any(blue.Name), 196 // }, 197 // &codedeploy.DeploymentGroupLoadBalancerInfoTargetGroupPairInfoTargetGroupArgs{ 198 // Name: pulumi.Any(green.Name), 199 // }, 200 // }, 201 // }, 202 // }, 203 // }) 204 // if err != nil { 205 // return err 206 // } 207 // return nil 208 // }) 209 // } 210 // 211 // ``` 212 // <!--End PulumiCodeChooser --> 213 // 214 // ### Blue Green Deployments with Servers and Classic ELB 215 // 216 // <!--Start PulumiCodeChooser --> 217 // ```go 218 // package main 219 // 220 // import ( 221 // 222 // "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/codedeploy" 223 // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" 224 // 225 // ) 226 // 227 // func main() { 228 // pulumi.Run(func(ctx *pulumi.Context) error { 229 // example, err := codedeploy.NewApplication(ctx, "example", &codedeploy.ApplicationArgs{ 230 // Name: pulumi.String("example-app"), 231 // }) 232 // if err != nil { 233 // return err 234 // } 235 // _, err = codedeploy.NewDeploymentGroup(ctx, "example", &codedeploy.DeploymentGroupArgs{ 236 // AppName: example.Name, 237 // DeploymentGroupName: pulumi.String("example-group"), 238 // ServiceRoleArn: pulumi.Any(exampleAwsIamRole.Arn), 239 // DeploymentStyle: &codedeploy.DeploymentGroupDeploymentStyleArgs{ 240 // DeploymentOption: pulumi.String("WITH_TRAFFIC_CONTROL"), 241 // DeploymentType: pulumi.String("BLUE_GREEN"), 242 // }, 243 // LoadBalancerInfo: &codedeploy.DeploymentGroupLoadBalancerInfoArgs{ 244 // ElbInfos: codedeploy.DeploymentGroupLoadBalancerInfoElbInfoArray{ 245 // &codedeploy.DeploymentGroupLoadBalancerInfoElbInfoArgs{ 246 // Name: pulumi.Any(exampleAwsElb.Name), 247 // }, 248 // }, 249 // }, 250 // BlueGreenDeploymentConfig: &codedeploy.DeploymentGroupBlueGreenDeploymentConfigArgs{ 251 // DeploymentReadyOption: &codedeploy.DeploymentGroupBlueGreenDeploymentConfigDeploymentReadyOptionArgs{ 252 // ActionOnTimeout: pulumi.String("STOP_DEPLOYMENT"), 253 // WaitTimeInMinutes: pulumi.Int(60), 254 // }, 255 // GreenFleetProvisioningOption: &codedeploy.DeploymentGroupBlueGreenDeploymentConfigGreenFleetProvisioningOptionArgs{ 256 // Action: pulumi.String("DISCOVER_EXISTING"), 257 // }, 258 // TerminateBlueInstancesOnDeploymentSuccess: &codedeploy.DeploymentGroupBlueGreenDeploymentConfigTerminateBlueInstancesOnDeploymentSuccessArgs{ 259 // Action: pulumi.String("KEEP_ALIVE"), 260 // }, 261 // }, 262 // }) 263 // if err != nil { 264 // return err 265 // } 266 // return nil 267 // }) 268 // } 269 // 270 // ``` 271 // <!--End PulumiCodeChooser --> 272 // 273 // ## Import 274 // 275 // Using `pulumi import`, import CodeDeploy Deployment Groups using `app_name`, a colon, and `deployment_group_name`. For example: 276 // 277 // ```sh 278 // $ pulumi import aws:codedeploy/deploymentGroup:DeploymentGroup example my-application:my-deployment-group 279 // ``` 280 type DeploymentGroup struct { 281 pulumi.CustomResourceState 282 283 // Configuration block of alarms associated with the deployment group (documented below). 284 AlarmConfiguration DeploymentGroupAlarmConfigurationPtrOutput `pulumi:"alarmConfiguration"` 285 // The name of the application. 286 AppName pulumi.StringOutput `pulumi:"appName"` 287 // The ARN of the CodeDeploy deployment group. 288 Arn pulumi.StringOutput `pulumi:"arn"` 289 // Configuration block of the automatic rollback configuration associated with the deployment group (documented below). 290 AutoRollbackConfiguration DeploymentGroupAutoRollbackConfigurationPtrOutput `pulumi:"autoRollbackConfiguration"` 291 // Autoscaling groups associated with the deployment group. 292 AutoscalingGroups pulumi.StringArrayOutput `pulumi:"autoscalingGroups"` 293 // Configuration block of the blue/green deployment options for a deployment group (documented below). 294 BlueGreenDeploymentConfig DeploymentGroupBlueGreenDeploymentConfigOutput `pulumi:"blueGreenDeploymentConfig"` 295 // The destination platform type for the deployment. 296 ComputePlatform pulumi.StringOutput `pulumi:"computePlatform"` 297 // The name of the group's deployment config. The default is "CodeDeployDefault.OneAtATime". 298 DeploymentConfigName pulumi.StringPtrOutput `pulumi:"deploymentConfigName"` 299 // The ID of the CodeDeploy deployment group. 300 DeploymentGroupId pulumi.StringOutput `pulumi:"deploymentGroupId"` 301 // The name of the deployment group. 302 DeploymentGroupName pulumi.StringOutput `pulumi:"deploymentGroupName"` 303 // Configuration block of the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer (documented below). 304 DeploymentStyle DeploymentGroupDeploymentStylePtrOutput `pulumi:"deploymentStyle"` 305 // Tag filters associated with the deployment group. See the AWS docs for details. 306 Ec2TagFilters DeploymentGroupEc2TagFilterArrayOutput `pulumi:"ec2TagFilters"` 307 // Configuration block(s) of Tag filters associated with the deployment group, which are also referred to as tag groups (documented below). See the AWS docs for details. 308 Ec2TagSets DeploymentGroupEc2TagSetArrayOutput `pulumi:"ec2TagSets"` 309 // Configuration block(s) of the ECS services for a deployment group (documented below). 310 EcsService DeploymentGroupEcsServicePtrOutput `pulumi:"ecsService"` 311 // Single configuration block of the load balancer to use in a blue/green deployment (documented below). 312 LoadBalancerInfo DeploymentGroupLoadBalancerInfoPtrOutput `pulumi:"loadBalancerInfo"` 313 // On premise tag filters associated with the group. See the AWS docs for details. 314 OnPremisesInstanceTagFilters DeploymentGroupOnPremisesInstanceTagFilterArrayOutput `pulumi:"onPremisesInstanceTagFilters"` 315 // Configuration block of Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. Valid values are `UPDATE` and `IGNORE`. Defaults to `UPDATE`. 316 OutdatedInstancesStrategy pulumi.StringPtrOutput `pulumi:"outdatedInstancesStrategy"` 317 // The service role ARN that allows deployments. 318 ServiceRoleArn pulumi.StringOutput `pulumi:"serviceRoleArn"` 319 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 320 Tags pulumi.StringMapOutput `pulumi:"tags"` 321 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 322 // 323 // Deprecated: Please use `tags` instead. 324 TagsAll pulumi.StringMapOutput `pulumi:"tagsAll"` 325 // Configuration block(s) of the triggers for the deployment group (documented below). 326 TriggerConfigurations DeploymentGroupTriggerConfigurationArrayOutput `pulumi:"triggerConfigurations"` 327 } 328 329 // NewDeploymentGroup registers a new resource with the given unique name, arguments, and options. 330 func NewDeploymentGroup(ctx *pulumi.Context, 331 name string, args *DeploymentGroupArgs, opts ...pulumi.ResourceOption) (*DeploymentGroup, error) { 332 if args == nil { 333 return nil, errors.New("missing one or more required arguments") 334 } 335 336 if args.AppName == nil { 337 return nil, errors.New("invalid value for required argument 'AppName'") 338 } 339 if args.DeploymentGroupName == nil { 340 return nil, errors.New("invalid value for required argument 'DeploymentGroupName'") 341 } 342 if args.ServiceRoleArn == nil { 343 return nil, errors.New("invalid value for required argument 'ServiceRoleArn'") 344 } 345 opts = internal.PkgResourceDefaultOpts(opts) 346 var resource DeploymentGroup 347 err := ctx.RegisterResource("aws:codedeploy/deploymentGroup:DeploymentGroup", name, args, &resource, opts...) 348 if err != nil { 349 return nil, err 350 } 351 return &resource, nil 352 } 353 354 // GetDeploymentGroup gets an existing DeploymentGroup resource's state with the given name, ID, and optional 355 // state properties that are used to uniquely qualify the lookup (nil if not required). 356 func GetDeploymentGroup(ctx *pulumi.Context, 357 name string, id pulumi.IDInput, state *DeploymentGroupState, opts ...pulumi.ResourceOption) (*DeploymentGroup, error) { 358 var resource DeploymentGroup 359 err := ctx.ReadResource("aws:codedeploy/deploymentGroup:DeploymentGroup", name, id, state, &resource, opts...) 360 if err != nil { 361 return nil, err 362 } 363 return &resource, nil 364 } 365 366 // Input properties used for looking up and filtering DeploymentGroup resources. 367 type deploymentGroupState struct { 368 // Configuration block of alarms associated with the deployment group (documented below). 369 AlarmConfiguration *DeploymentGroupAlarmConfiguration `pulumi:"alarmConfiguration"` 370 // The name of the application. 371 AppName *string `pulumi:"appName"` 372 // The ARN of the CodeDeploy deployment group. 373 Arn *string `pulumi:"arn"` 374 // Configuration block of the automatic rollback configuration associated with the deployment group (documented below). 375 AutoRollbackConfiguration *DeploymentGroupAutoRollbackConfiguration `pulumi:"autoRollbackConfiguration"` 376 // Autoscaling groups associated with the deployment group. 377 AutoscalingGroups []string `pulumi:"autoscalingGroups"` 378 // Configuration block of the blue/green deployment options for a deployment group (documented below). 379 BlueGreenDeploymentConfig *DeploymentGroupBlueGreenDeploymentConfig `pulumi:"blueGreenDeploymentConfig"` 380 // The destination platform type for the deployment. 381 ComputePlatform *string `pulumi:"computePlatform"` 382 // The name of the group's deployment config. The default is "CodeDeployDefault.OneAtATime". 383 DeploymentConfigName *string `pulumi:"deploymentConfigName"` 384 // The ID of the CodeDeploy deployment group. 385 DeploymentGroupId *string `pulumi:"deploymentGroupId"` 386 // The name of the deployment group. 387 DeploymentGroupName *string `pulumi:"deploymentGroupName"` 388 // Configuration block of the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer (documented below). 389 DeploymentStyle *DeploymentGroupDeploymentStyle `pulumi:"deploymentStyle"` 390 // Tag filters associated with the deployment group. See the AWS docs for details. 391 Ec2TagFilters []DeploymentGroupEc2TagFilter `pulumi:"ec2TagFilters"` 392 // Configuration block(s) of Tag filters associated with the deployment group, which are also referred to as tag groups (documented below). See the AWS docs for details. 393 Ec2TagSets []DeploymentGroupEc2TagSet `pulumi:"ec2TagSets"` 394 // Configuration block(s) of the ECS services for a deployment group (documented below). 395 EcsService *DeploymentGroupEcsService `pulumi:"ecsService"` 396 // Single configuration block of the load balancer to use in a blue/green deployment (documented below). 397 LoadBalancerInfo *DeploymentGroupLoadBalancerInfo `pulumi:"loadBalancerInfo"` 398 // On premise tag filters associated with the group. See the AWS docs for details. 399 OnPremisesInstanceTagFilters []DeploymentGroupOnPremisesInstanceTagFilter `pulumi:"onPremisesInstanceTagFilters"` 400 // Configuration block of Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. Valid values are `UPDATE` and `IGNORE`. Defaults to `UPDATE`. 401 OutdatedInstancesStrategy *string `pulumi:"outdatedInstancesStrategy"` 402 // The service role ARN that allows deployments. 403 ServiceRoleArn *string `pulumi:"serviceRoleArn"` 404 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 405 Tags map[string]string `pulumi:"tags"` 406 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 407 // 408 // Deprecated: Please use `tags` instead. 409 TagsAll map[string]string `pulumi:"tagsAll"` 410 // Configuration block(s) of the triggers for the deployment group (documented below). 411 TriggerConfigurations []DeploymentGroupTriggerConfiguration `pulumi:"triggerConfigurations"` 412 } 413 414 type DeploymentGroupState struct { 415 // Configuration block of alarms associated with the deployment group (documented below). 416 AlarmConfiguration DeploymentGroupAlarmConfigurationPtrInput 417 // The name of the application. 418 AppName pulumi.StringPtrInput 419 // The ARN of the CodeDeploy deployment group. 420 Arn pulumi.StringPtrInput 421 // Configuration block of the automatic rollback configuration associated with the deployment group (documented below). 422 AutoRollbackConfiguration DeploymentGroupAutoRollbackConfigurationPtrInput 423 // Autoscaling groups associated with the deployment group. 424 AutoscalingGroups pulumi.StringArrayInput 425 // Configuration block of the blue/green deployment options for a deployment group (documented below). 426 BlueGreenDeploymentConfig DeploymentGroupBlueGreenDeploymentConfigPtrInput 427 // The destination platform type for the deployment. 428 ComputePlatform pulumi.StringPtrInput 429 // The name of the group's deployment config. The default is "CodeDeployDefault.OneAtATime". 430 DeploymentConfigName pulumi.StringPtrInput 431 // The ID of the CodeDeploy deployment group. 432 DeploymentGroupId pulumi.StringPtrInput 433 // The name of the deployment group. 434 DeploymentGroupName pulumi.StringPtrInput 435 // Configuration block of the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer (documented below). 436 DeploymentStyle DeploymentGroupDeploymentStylePtrInput 437 // Tag filters associated with the deployment group. See the AWS docs for details. 438 Ec2TagFilters DeploymentGroupEc2TagFilterArrayInput 439 // Configuration block(s) of Tag filters associated with the deployment group, which are also referred to as tag groups (documented below). See the AWS docs for details. 440 Ec2TagSets DeploymentGroupEc2TagSetArrayInput 441 // Configuration block(s) of the ECS services for a deployment group (documented below). 442 EcsService DeploymentGroupEcsServicePtrInput 443 // Single configuration block of the load balancer to use in a blue/green deployment (documented below). 444 LoadBalancerInfo DeploymentGroupLoadBalancerInfoPtrInput 445 // On premise tag filters associated with the group. See the AWS docs for details. 446 OnPremisesInstanceTagFilters DeploymentGroupOnPremisesInstanceTagFilterArrayInput 447 // Configuration block of Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. Valid values are `UPDATE` and `IGNORE`. Defaults to `UPDATE`. 448 OutdatedInstancesStrategy pulumi.StringPtrInput 449 // The service role ARN that allows deployments. 450 ServiceRoleArn pulumi.StringPtrInput 451 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 452 Tags pulumi.StringMapInput 453 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 454 // 455 // Deprecated: Please use `tags` instead. 456 TagsAll pulumi.StringMapInput 457 // Configuration block(s) of the triggers for the deployment group (documented below). 458 TriggerConfigurations DeploymentGroupTriggerConfigurationArrayInput 459 } 460 461 func (DeploymentGroupState) ElementType() reflect.Type { 462 return reflect.TypeOf((*deploymentGroupState)(nil)).Elem() 463 } 464 465 type deploymentGroupArgs struct { 466 // Configuration block of alarms associated with the deployment group (documented below). 467 AlarmConfiguration *DeploymentGroupAlarmConfiguration `pulumi:"alarmConfiguration"` 468 // The name of the application. 469 AppName string `pulumi:"appName"` 470 // Configuration block of the automatic rollback configuration associated with the deployment group (documented below). 471 AutoRollbackConfiguration *DeploymentGroupAutoRollbackConfiguration `pulumi:"autoRollbackConfiguration"` 472 // Autoscaling groups associated with the deployment group. 473 AutoscalingGroups []string `pulumi:"autoscalingGroups"` 474 // Configuration block of the blue/green deployment options for a deployment group (documented below). 475 BlueGreenDeploymentConfig *DeploymentGroupBlueGreenDeploymentConfig `pulumi:"blueGreenDeploymentConfig"` 476 // The name of the group's deployment config. The default is "CodeDeployDefault.OneAtATime". 477 DeploymentConfigName *string `pulumi:"deploymentConfigName"` 478 // The name of the deployment group. 479 DeploymentGroupName string `pulumi:"deploymentGroupName"` 480 // Configuration block of the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer (documented below). 481 DeploymentStyle *DeploymentGroupDeploymentStyle `pulumi:"deploymentStyle"` 482 // Tag filters associated with the deployment group. See the AWS docs for details. 483 Ec2TagFilters []DeploymentGroupEc2TagFilter `pulumi:"ec2TagFilters"` 484 // Configuration block(s) of Tag filters associated with the deployment group, which are also referred to as tag groups (documented below). See the AWS docs for details. 485 Ec2TagSets []DeploymentGroupEc2TagSet `pulumi:"ec2TagSets"` 486 // Configuration block(s) of the ECS services for a deployment group (documented below). 487 EcsService *DeploymentGroupEcsService `pulumi:"ecsService"` 488 // Single configuration block of the load balancer to use in a blue/green deployment (documented below). 489 LoadBalancerInfo *DeploymentGroupLoadBalancerInfo `pulumi:"loadBalancerInfo"` 490 // On premise tag filters associated with the group. See the AWS docs for details. 491 OnPremisesInstanceTagFilters []DeploymentGroupOnPremisesInstanceTagFilter `pulumi:"onPremisesInstanceTagFilters"` 492 // Configuration block of Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. Valid values are `UPDATE` and `IGNORE`. Defaults to `UPDATE`. 493 OutdatedInstancesStrategy *string `pulumi:"outdatedInstancesStrategy"` 494 // The service role ARN that allows deployments. 495 ServiceRoleArn string `pulumi:"serviceRoleArn"` 496 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 497 Tags map[string]string `pulumi:"tags"` 498 // Configuration block(s) of the triggers for the deployment group (documented below). 499 TriggerConfigurations []DeploymentGroupTriggerConfiguration `pulumi:"triggerConfigurations"` 500 } 501 502 // The set of arguments for constructing a DeploymentGroup resource. 503 type DeploymentGroupArgs struct { 504 // Configuration block of alarms associated with the deployment group (documented below). 505 AlarmConfiguration DeploymentGroupAlarmConfigurationPtrInput 506 // The name of the application. 507 AppName pulumi.StringInput 508 // Configuration block of the automatic rollback configuration associated with the deployment group (documented below). 509 AutoRollbackConfiguration DeploymentGroupAutoRollbackConfigurationPtrInput 510 // Autoscaling groups associated with the deployment group. 511 AutoscalingGroups pulumi.StringArrayInput 512 // Configuration block of the blue/green deployment options for a deployment group (documented below). 513 BlueGreenDeploymentConfig DeploymentGroupBlueGreenDeploymentConfigPtrInput 514 // The name of the group's deployment config. The default is "CodeDeployDefault.OneAtATime". 515 DeploymentConfigName pulumi.StringPtrInput 516 // The name of the deployment group. 517 DeploymentGroupName pulumi.StringInput 518 // Configuration block of the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer (documented below). 519 DeploymentStyle DeploymentGroupDeploymentStylePtrInput 520 // Tag filters associated with the deployment group. See the AWS docs for details. 521 Ec2TagFilters DeploymentGroupEc2TagFilterArrayInput 522 // Configuration block(s) of Tag filters associated with the deployment group, which are also referred to as tag groups (documented below). See the AWS docs for details. 523 Ec2TagSets DeploymentGroupEc2TagSetArrayInput 524 // Configuration block(s) of the ECS services for a deployment group (documented below). 525 EcsService DeploymentGroupEcsServicePtrInput 526 // Single configuration block of the load balancer to use in a blue/green deployment (documented below). 527 LoadBalancerInfo DeploymentGroupLoadBalancerInfoPtrInput 528 // On premise tag filters associated with the group. See the AWS docs for details. 529 OnPremisesInstanceTagFilters DeploymentGroupOnPremisesInstanceTagFilterArrayInput 530 // Configuration block of Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. Valid values are `UPDATE` and `IGNORE`. Defaults to `UPDATE`. 531 OutdatedInstancesStrategy pulumi.StringPtrInput 532 // The service role ARN that allows deployments. 533 ServiceRoleArn pulumi.StringInput 534 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 535 Tags pulumi.StringMapInput 536 // Configuration block(s) of the triggers for the deployment group (documented below). 537 TriggerConfigurations DeploymentGroupTriggerConfigurationArrayInput 538 } 539 540 func (DeploymentGroupArgs) ElementType() reflect.Type { 541 return reflect.TypeOf((*deploymentGroupArgs)(nil)).Elem() 542 } 543 544 type DeploymentGroupInput interface { 545 pulumi.Input 546 547 ToDeploymentGroupOutput() DeploymentGroupOutput 548 ToDeploymentGroupOutputWithContext(ctx context.Context) DeploymentGroupOutput 549 } 550 551 func (*DeploymentGroup) ElementType() reflect.Type { 552 return reflect.TypeOf((**DeploymentGroup)(nil)).Elem() 553 } 554 555 func (i *DeploymentGroup) ToDeploymentGroupOutput() DeploymentGroupOutput { 556 return i.ToDeploymentGroupOutputWithContext(context.Background()) 557 } 558 559 func (i *DeploymentGroup) ToDeploymentGroupOutputWithContext(ctx context.Context) DeploymentGroupOutput { 560 return pulumi.ToOutputWithContext(ctx, i).(DeploymentGroupOutput) 561 } 562 563 // DeploymentGroupArrayInput is an input type that accepts DeploymentGroupArray and DeploymentGroupArrayOutput values. 564 // You can construct a concrete instance of `DeploymentGroupArrayInput` via: 565 // 566 // DeploymentGroupArray{ DeploymentGroupArgs{...} } 567 type DeploymentGroupArrayInput interface { 568 pulumi.Input 569 570 ToDeploymentGroupArrayOutput() DeploymentGroupArrayOutput 571 ToDeploymentGroupArrayOutputWithContext(context.Context) DeploymentGroupArrayOutput 572 } 573 574 type DeploymentGroupArray []DeploymentGroupInput 575 576 func (DeploymentGroupArray) ElementType() reflect.Type { 577 return reflect.TypeOf((*[]*DeploymentGroup)(nil)).Elem() 578 } 579 580 func (i DeploymentGroupArray) ToDeploymentGroupArrayOutput() DeploymentGroupArrayOutput { 581 return i.ToDeploymentGroupArrayOutputWithContext(context.Background()) 582 } 583 584 func (i DeploymentGroupArray) ToDeploymentGroupArrayOutputWithContext(ctx context.Context) DeploymentGroupArrayOutput { 585 return pulumi.ToOutputWithContext(ctx, i).(DeploymentGroupArrayOutput) 586 } 587 588 // DeploymentGroupMapInput is an input type that accepts DeploymentGroupMap and DeploymentGroupMapOutput values. 589 // You can construct a concrete instance of `DeploymentGroupMapInput` via: 590 // 591 // DeploymentGroupMap{ "key": DeploymentGroupArgs{...} } 592 type DeploymentGroupMapInput interface { 593 pulumi.Input 594 595 ToDeploymentGroupMapOutput() DeploymentGroupMapOutput 596 ToDeploymentGroupMapOutputWithContext(context.Context) DeploymentGroupMapOutput 597 } 598 599 type DeploymentGroupMap map[string]DeploymentGroupInput 600 601 func (DeploymentGroupMap) ElementType() reflect.Type { 602 return reflect.TypeOf((*map[string]*DeploymentGroup)(nil)).Elem() 603 } 604 605 func (i DeploymentGroupMap) ToDeploymentGroupMapOutput() DeploymentGroupMapOutput { 606 return i.ToDeploymentGroupMapOutputWithContext(context.Background()) 607 } 608 609 func (i DeploymentGroupMap) ToDeploymentGroupMapOutputWithContext(ctx context.Context) DeploymentGroupMapOutput { 610 return pulumi.ToOutputWithContext(ctx, i).(DeploymentGroupMapOutput) 611 } 612 613 type DeploymentGroupOutput struct{ *pulumi.OutputState } 614 615 func (DeploymentGroupOutput) ElementType() reflect.Type { 616 return reflect.TypeOf((**DeploymentGroup)(nil)).Elem() 617 } 618 619 func (o DeploymentGroupOutput) ToDeploymentGroupOutput() DeploymentGroupOutput { 620 return o 621 } 622 623 func (o DeploymentGroupOutput) ToDeploymentGroupOutputWithContext(ctx context.Context) DeploymentGroupOutput { 624 return o 625 } 626 627 // Configuration block of alarms associated with the deployment group (documented below). 628 func (o DeploymentGroupOutput) AlarmConfiguration() DeploymentGroupAlarmConfigurationPtrOutput { 629 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupAlarmConfigurationPtrOutput { return v.AlarmConfiguration }).(DeploymentGroupAlarmConfigurationPtrOutput) 630 } 631 632 // The name of the application. 633 func (o DeploymentGroupOutput) AppName() pulumi.StringOutput { 634 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringOutput { return v.AppName }).(pulumi.StringOutput) 635 } 636 637 // The ARN of the CodeDeploy deployment group. 638 func (o DeploymentGroupOutput) Arn() pulumi.StringOutput { 639 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringOutput { return v.Arn }).(pulumi.StringOutput) 640 } 641 642 // Configuration block of the automatic rollback configuration associated with the deployment group (documented below). 643 func (o DeploymentGroupOutput) AutoRollbackConfiguration() DeploymentGroupAutoRollbackConfigurationPtrOutput { 644 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupAutoRollbackConfigurationPtrOutput { 645 return v.AutoRollbackConfiguration 646 }).(DeploymentGroupAutoRollbackConfigurationPtrOutput) 647 } 648 649 // Autoscaling groups associated with the deployment group. 650 func (o DeploymentGroupOutput) AutoscalingGroups() pulumi.StringArrayOutput { 651 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringArrayOutput { return v.AutoscalingGroups }).(pulumi.StringArrayOutput) 652 } 653 654 // Configuration block of the blue/green deployment options for a deployment group (documented below). 655 func (o DeploymentGroupOutput) BlueGreenDeploymentConfig() DeploymentGroupBlueGreenDeploymentConfigOutput { 656 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupBlueGreenDeploymentConfigOutput { 657 return v.BlueGreenDeploymentConfig 658 }).(DeploymentGroupBlueGreenDeploymentConfigOutput) 659 } 660 661 // The destination platform type for the deployment. 662 func (o DeploymentGroupOutput) ComputePlatform() pulumi.StringOutput { 663 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringOutput { return v.ComputePlatform }).(pulumi.StringOutput) 664 } 665 666 // The name of the group's deployment config. The default is "CodeDeployDefault.OneAtATime". 667 func (o DeploymentGroupOutput) DeploymentConfigName() pulumi.StringPtrOutput { 668 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringPtrOutput { return v.DeploymentConfigName }).(pulumi.StringPtrOutput) 669 } 670 671 // The ID of the CodeDeploy deployment group. 672 func (o DeploymentGroupOutput) DeploymentGroupId() pulumi.StringOutput { 673 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringOutput { return v.DeploymentGroupId }).(pulumi.StringOutput) 674 } 675 676 // The name of the deployment group. 677 func (o DeploymentGroupOutput) DeploymentGroupName() pulumi.StringOutput { 678 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringOutput { return v.DeploymentGroupName }).(pulumi.StringOutput) 679 } 680 681 // Configuration block of the type of deployment, either in-place or blue/green, you want to run and whether to route deployment traffic behind a load balancer (documented below). 682 func (o DeploymentGroupOutput) DeploymentStyle() DeploymentGroupDeploymentStylePtrOutput { 683 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupDeploymentStylePtrOutput { return v.DeploymentStyle }).(DeploymentGroupDeploymentStylePtrOutput) 684 } 685 686 // Tag filters associated with the deployment group. See the AWS docs for details. 687 func (o DeploymentGroupOutput) Ec2TagFilters() DeploymentGroupEc2TagFilterArrayOutput { 688 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupEc2TagFilterArrayOutput { return v.Ec2TagFilters }).(DeploymentGroupEc2TagFilterArrayOutput) 689 } 690 691 // Configuration block(s) of Tag filters associated with the deployment group, which are also referred to as tag groups (documented below). See the AWS docs for details. 692 func (o DeploymentGroupOutput) Ec2TagSets() DeploymentGroupEc2TagSetArrayOutput { 693 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupEc2TagSetArrayOutput { return v.Ec2TagSets }).(DeploymentGroupEc2TagSetArrayOutput) 694 } 695 696 // Configuration block(s) of the ECS services for a deployment group (documented below). 697 func (o DeploymentGroupOutput) EcsService() DeploymentGroupEcsServicePtrOutput { 698 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupEcsServicePtrOutput { return v.EcsService }).(DeploymentGroupEcsServicePtrOutput) 699 } 700 701 // Single configuration block of the load balancer to use in a blue/green deployment (documented below). 702 func (o DeploymentGroupOutput) LoadBalancerInfo() DeploymentGroupLoadBalancerInfoPtrOutput { 703 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupLoadBalancerInfoPtrOutput { return v.LoadBalancerInfo }).(DeploymentGroupLoadBalancerInfoPtrOutput) 704 } 705 706 // On premise tag filters associated with the group. See the AWS docs for details. 707 func (o DeploymentGroupOutput) OnPremisesInstanceTagFilters() DeploymentGroupOnPremisesInstanceTagFilterArrayOutput { 708 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupOnPremisesInstanceTagFilterArrayOutput { 709 return v.OnPremisesInstanceTagFilters 710 }).(DeploymentGroupOnPremisesInstanceTagFilterArrayOutput) 711 } 712 713 // Configuration block of Indicates what happens when new Amazon EC2 instances are launched mid-deployment and do not receive the deployed application revision. Valid values are `UPDATE` and `IGNORE`. Defaults to `UPDATE`. 714 func (o DeploymentGroupOutput) OutdatedInstancesStrategy() pulumi.StringPtrOutput { 715 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringPtrOutput { return v.OutdatedInstancesStrategy }).(pulumi.StringPtrOutput) 716 } 717 718 // The service role ARN that allows deployments. 719 func (o DeploymentGroupOutput) ServiceRoleArn() pulumi.StringOutput { 720 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringOutput { return v.ServiceRoleArn }).(pulumi.StringOutput) 721 } 722 723 // Key-value map of resource tags. .If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. 724 func (o DeploymentGroupOutput) Tags() pulumi.StringMapOutput { 725 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringMapOutput { return v.Tags }).(pulumi.StringMapOutput) 726 } 727 728 // A map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. 729 // 730 // Deprecated: Please use `tags` instead. 731 func (o DeploymentGroupOutput) TagsAll() pulumi.StringMapOutput { 732 return o.ApplyT(func(v *DeploymentGroup) pulumi.StringMapOutput { return v.TagsAll }).(pulumi.StringMapOutput) 733 } 734 735 // Configuration block(s) of the triggers for the deployment group (documented below). 736 func (o DeploymentGroupOutput) TriggerConfigurations() DeploymentGroupTriggerConfigurationArrayOutput { 737 return o.ApplyT(func(v *DeploymentGroup) DeploymentGroupTriggerConfigurationArrayOutput { 738 return v.TriggerConfigurations 739 }).(DeploymentGroupTriggerConfigurationArrayOutput) 740 } 741 742 type DeploymentGroupArrayOutput struct{ *pulumi.OutputState } 743 744 func (DeploymentGroupArrayOutput) ElementType() reflect.Type { 745 return reflect.TypeOf((*[]*DeploymentGroup)(nil)).Elem() 746 } 747 748 func (o DeploymentGroupArrayOutput) ToDeploymentGroupArrayOutput() DeploymentGroupArrayOutput { 749 return o 750 } 751 752 func (o DeploymentGroupArrayOutput) ToDeploymentGroupArrayOutputWithContext(ctx context.Context) DeploymentGroupArrayOutput { 753 return o 754 } 755 756 func (o DeploymentGroupArrayOutput) Index(i pulumi.IntInput) DeploymentGroupOutput { 757 return pulumi.All(o, i).ApplyT(func(vs []interface{}) *DeploymentGroup { 758 return vs[0].([]*DeploymentGroup)[vs[1].(int)] 759 }).(DeploymentGroupOutput) 760 } 761 762 type DeploymentGroupMapOutput struct{ *pulumi.OutputState } 763 764 func (DeploymentGroupMapOutput) ElementType() reflect.Type { 765 return reflect.TypeOf((*map[string]*DeploymentGroup)(nil)).Elem() 766 } 767 768 func (o DeploymentGroupMapOutput) ToDeploymentGroupMapOutput() DeploymentGroupMapOutput { 769 return o 770 } 771 772 func (o DeploymentGroupMapOutput) ToDeploymentGroupMapOutputWithContext(ctx context.Context) DeploymentGroupMapOutput { 773 return o 774 } 775 776 func (o DeploymentGroupMapOutput) MapIndex(k pulumi.StringInput) DeploymentGroupOutput { 777 return pulumi.All(o, k).ApplyT(func(vs []interface{}) *DeploymentGroup { 778 return vs[0].(map[string]*DeploymentGroup)[vs[1].(string)] 779 }).(DeploymentGroupOutput) 780 } 781 782 func init() { 783 pulumi.RegisterInputType(reflect.TypeOf((*DeploymentGroupInput)(nil)).Elem(), &DeploymentGroup{}) 784 pulumi.RegisterInputType(reflect.TypeOf((*DeploymentGroupArrayInput)(nil)).Elem(), DeploymentGroupArray{}) 785 pulumi.RegisterInputType(reflect.TypeOf((*DeploymentGroupMapInput)(nil)).Elem(), DeploymentGroupMap{}) 786 pulumi.RegisterOutputType(DeploymentGroupOutput{}) 787 pulumi.RegisterOutputType(DeploymentGroupArrayOutput{}) 788 pulumi.RegisterOutputType(DeploymentGroupMapOutput{}) 789 }