hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.77k stars 9.13k forks source link

[Enhancement]: Add option to wait until deployment created by aws_appconfig_deployment is finished #35516

Open mnylensc opened 8 months ago

mnylensc commented 8 months ago

Description

It seems in https://github.com/hashicorp/terraform-provider-aws/pull/20288 the functionality to wait for AppConfig Deployment to be completed was removed. I understand the reasoning behind the change (sometimes the bake times can be very long), but would be nice if the resource provided an option for those with faster deployment strategies to wait until the deployment has completed.

Then, if the deployment is rolled back (due to environment monitor failing), the terraform apply could also fail.

This could be similar to how aws_ecs_service resource has option to specify wait_for_steady_state = true.

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_appconfig_deployment" "default" {
  application_id           = aws_appconfig_application.default.id
  environment_id           = aws_appconfig_environment.default.environment_id
  configuration_profile_id = aws_appconfig_configuration_profile.default.configuration_profile_id
  configuration_version    = aws_appconfig_hosted_configuration_version.default.version_number
  deployment_strategy_id   = data.aws_appconfig_deployment_strategy.default.id

  # New argument to wait until the deployment is completed
  wait_for_completion      = true

  # Possibly allow defining max wait time
  max_wait_time            = 10 # minutes
}

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 8 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue