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.76k stars 9.12k forks source link

aws_apprunner_service example App Runner doesn't support automatic deployments for an image in an ECR Public repository. #24531

Closed marekaf closed 2 years ago

marekaf commented 2 years ago

Community Note

Terraform CLI and Terraform AWS Provider Version

Affected Resource(s)

Terraform Configuration Files

resource "aws_apprunner_service" "example" {
  service_name = "example"

  source_configuration {
    image_repository {
      image_configuration {
        port = "8000"
      }
      image_identifier      = "public.ecr.aws/jg/hello:latest"
      image_repository_type = "ECR_PUBLIC"
    }
  }

  tags = {
    Name = "example-apprunner-service"
  }
}

Expected Behavior

terraform apply should succeed

Actual Behavior

aws_apprunner_service.example: Creating...
╷
│ Error: error creating App Runner Service (example): InvalidRequestException: App Runner doesn't support automatic deployments for an image in an ECR Public repository.

Steps to Reproduce

  1. terraform apply

Important Factoids

References

this seems to work:

resource "aws_apprunner_service" "example" {
  service_name = "example"

  source_configuration {
    image_repository {
      image_configuration {
        port = "8000"
      }
      image_identifier      = "public.ecr.aws/aws-containers/hello-app-runner:latest"
      image_repository_type = "ECR_PUBLIC"
    }

    auto_deployments_enabled = false
  }

  tags = {
    Name = "example-apprunner-service"
  }
}
justinretzolk commented 2 years ago

Hey @marekaf 👋 Thank you for taking the time to raise this! I confirmed the behavior that you saw, and that your supplied updated configuration works as expected (thank you very much for that!). I'll be opening a PR shortly to update the documentation.

github-actions[bot] commented 2 years ago

This functionality has been released in v4.14.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

github-actions[bot] commented 2 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.