aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
184 stars 62 forks source link

correctly handle stack argument for generate schema command #2028

Closed rtpascual closed 1 month ago

rtpascual commented 1 month ago

Problem

When passing stack option for generate schema-from-database command, secret client getSecret is expecting backend identifier to be like https://github.com/aws-amplify/amplify-backend/blob/main/packages/plugin-types/src/backend_identifier.ts#L17 but it is resolved to { stackName: '<stack>' }. So we fail to convert the backend identifier to parameter path strings for connection URI and SSL Cert secrets.

Issue number, if available:

Changes

If stack is passed, we correctly convert to BackendIdentifier before getting secrets.

Corresponding docs PR, if applicable:

Validation

Updated test.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: 46dc9b31a85d3d9bd7604a6a86f049fa39dc554d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ------------------------ | ----- | | @aws-amplify/backend-cli | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR