Skip to content

Conversation

palpatim
Copy link
Member

@palpatim palpatim commented Jun 28, 2024

Problem

Enables end-to-end support for custom SSL certificates in SQL data sources by tying together all of:

Docs update: aws-amplify/docs#7802

New public API

Data schema configuration now includes the ability to define an sslCert secret.

const schema = configure({
  database: {
    engine: 'mysql',
    connectionUri: secret('SQL_CONNECTION_STRING'),
    // v----- Added
    sslCert: secret('CUSTOM_SSL_CERT'),
  },
});

The sslCert secret will be resolved at deploy time and passed to the CDK construct sslCertConfig setting added in the @aws-amplify/data-construct 1.9.0 release.

Changeset

This change introduces a new feature API. The only code changes are in @aws-amplify/backend-data. There are explicit dependency updates in both @aws-amplify/backend-data and @aws-amplify/schema-generator:

  • @aws-amplify/backend-data
  • @aws-amplify/schema-generator

Validation

  • Unit tests
  • New unit tests included
  • Manual testing

Checklist

  • If this PR includes a functional change to the runtime behavior of the code, I have added or updated automated test coverage for this change.
  • If this PR requires a docs update, I have linked to that docs PR.
  • If this PR modifies E2E tests, makes changes to resource provisioning, or makes SDK calls, I have run the PR checks with the run-e2e label set.

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

Copy link

changeset-bot bot commented Jun 28, 2024

🦋 Changeset detected

Latest commit: 331f369

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

This PR includes changesets to release 2 packages
Name Type
@aws-amplify/backend-data Minor
@aws-amplify/schema-generator Minor

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

@palpatim palpatim added the run-e2e Label that will include e2e tests in PR checks workflow label Jun 28, 2024
"type": "module",
"scripts": {
"build": "tsc --build packages/* && tsc --build scripts",
"build": "tsc --build packages/* scripts",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--build takes multiple source directories as arguments. The previous construction of this command meant that the --watch argument from the watch script ("npm run build -- --watch") only applied to tsc --build scripts.

@palpatim palpatim marked this pull request as ready for review July 1, 2024 16:45
@palpatim palpatim requested review from a team as code owners July 1, 2024 16:45
sundersc
sundersc previously approved these changes Jul 1, 2024
Copy link
Contributor

@edwardfoyle edwardfoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

functionally LGTM, just a comment on the changeset

Amplifiyer
Amplifiyer previously approved these changes Jul 2, 2024
edwardfoyle
edwardfoyle previously approved these changes Jul 2, 2024
@palpatim palpatim marked this pull request as draft July 2, 2024 17:41
@palpatim
Copy link
Member Author

palpatim commented Jul 2, 2024

Converting to draft to wait for amplify-category-api release, to consume aws-amplify/amplify-category-api#2680, which fixes the attribute name created by ampx generate schema-from-database

@palpatim palpatim dismissed stale reviews from edwardfoyle and Amplifiyer via d9356f6 July 2, 2024 21:44
@palpatim palpatim marked this pull request as ready for review July 2, 2024 21:44
@palpatim
Copy link
Member Author

palpatim commented Jul 2, 2024

amplify-category-api release is complete, ready to re-review

@edwardfoyle edwardfoyle merged commit f5eeb67 into main Jul 3, 2024
@edwardfoyle edwardfoyle deleted the palpatim.feat.custom-ssl-cert-support branch July 3, 2024 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
run-e2e Label that will include e2e tests in PR checks workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants