Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Cannot deploy App Runner with Storage add on #6010

Open
nitzan-frock opened this issue Feb 10, 2025 · 0 comments
Open

[Bug]: Cannot deploy App Runner with Storage add on #6010

nitzan-frock opened this issue Feb 10, 2025 · 0 comments
Labels
type/bug Issues that are bugs.

Comments

@nitzan-frock
Copy link

nitzan-frock commented Feb 10, 2025

Description:

Deploying a service in a new env with an Aurora postgres storage add on fails.

ValidationError: Template error: instance of Fn::GetAtt references undefined resource ServiceSecurityGroup

Details:

Copilot Version: 1.34.0 built for darwin

Observed result:

# copilot/server/manifest.yml
name: server
type: Request-Driven Web Service

image:
  port: 8000
  build:
    context: .
    dockerfile: containers/Dockerfile

https:
  healthcheck:
    path: /
    interval: 5s
    timeout: 2s

cpu: 1024
memory: 2048

observability:
  tracing: awsxray

secrets: # Pass secrets from AWS Systems Manager (SSM) Parameter Store and Secrets Manager.
  DB_SECRET:
    from_cfn: ${COPILOT_APPLICATION_NAME}-${COPILOT_ENVIRONMENT_NAME}-serverclusterAuroraSecret

environments:
  dev:
    variables:
      APP_ENV: dev
    image:
      build:
        target: dev
# copilot/server/addons/addons.parameters.yml
Parameters:
  ServiceSecurityGroupId: !GetAtt ServiceSecurityGroup.GroupId
# copilot/server/addons/server-cluster-ingress.yml

# likely relevant section to error
Resources:
  serverclusterClusterSecurityGroupIngressFromWorkload:
    Type: AWS::EC2::SecurityGroupIngress
    Properties:
      Description: !Sub Ingress from workload ${Name}.
      ToPort: 5432
      FromPort: 5432
      GroupId:
        Fn::ImportValue: !Sub "${App}-${Env}-serverclusterDBClusterSecurityGroup"
      IpProtocol: tcp
      SourceSecurityGroupId: !Ref ServiceSecurityGroupId
> copilot svc deploy -n server -e dev
✘ Proposing infrastructure changes for stack across-dev-server
✘ deploy service server to environment dev: deploy service: check if changeset is empty: create change set copilot-e89eab5a-d627-469f-998e-2c3ff603a47b for stack across-dev-server: ValidationError: Template error: instance of Fn::GetAtt references undefined resource ServiceSecurityGroup
        status code: 400, request id: 8223f634-ca20-471d-bd4c-fb05e90dce64: describe change set copilot-e89eab5a-d627-469f-998e-2c3ff603a47b for stack across-dev-server: ValidationError: Stack [across-dev-server] does not exist
        status code: 400, request id: 306e66b1-1da6-4abd-94fb-c2f18d67f484: describe stack: describe stack events for stack across-dev-server: ValidationError: Stack [across-dev-server] does not exist
        status code: 400, request id: 3c65fdca-53be-4b3e-9219-56103ab80662

Expected result:

The service should deploy successfully when it is being created in the environment or being updated.

Debugging:

  1. copilot env init -n dev
  2. copilot env deploy -n dev
  3. copilot svc init -n server -e dev
  4. copilot storage init -n server-cluster -t Aurora -w server --engine PostgreSQL --initial-db my_db -l environment.
  5. copilot svc deploy -n server -e dev

I've attempted to reset the entire application, I've tried creating new environments, I've looked at all the docs for usage on storage, services and environments.

@nitzan-frock nitzan-frock added the type/bug Issues that are bugs. label Feb 10, 2025
@nitzan-frock nitzan-frock changed the title [Bug]: Cannot deploy App Runner in an env with Storage add on [Bug]: Cannot deploy App Runner with Storage add on Feb 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Issues that are bugs.
Projects
None yet
Development

No branches or pull requests

1 participant