Skip to content

Conversation

hoffa
Copy link
Contributor

@hoffa hoffa commented Oct 12, 2022

Issue #, if available

#2534

Description of changes

A connector logical ID in DependsOn will be automatically replaced by the logical IDs of its generated resources. This makes situations where DependsOn is necessary a little easier (e.g. event source mapping with DLQ), and it's consistent with how currently the abstract resources are referenceable.

For example, the following:

DependsOn:
  - SomeConnector

Will be replaced by:

DependsOn:
  - SomeConnectorWriteLambdaPermission 

Description of how you validated changes

Checklist

  • Add/update unit tests using:
  • Add/update integration tests
  • Update documentation
  • Verify transformed template deploys and application functions as expected
  • Do these changes include any template validations?
    • Did the newly validated properties support intrinsics prior to adding the validations? (If unsure, please review Intrinsic Functions before proceeding).
      • Does the pull request ensure that intrinsics remain functional with the new validations?

Examples?

Please reach out in the comments, if you want to add an example. Examples will be
added to sam init through https://github.com/awslabs/aws-sam-cli-app-templates/

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

@hoffa hoffa changed the title Replace DependsOn to connector by its generated logical IDs feat: replace DependsOn to connector by its generated logical IDs Oct 12, 2022
@hoffa hoffa marked this pull request as ready for review October 19, 2022 20:48
Copy link
Contributor

@GavinZZ GavinZZ left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Contributor

@hawflau hawflau left a comment

Choose a reason for hiding this comment

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

LGTM. I originally thought this is better done via a plugin. But this seems more precise as each connector handles its own logical ID.

@hoffa hoffa merged commit 5e96b39 into aws:develop Oct 20, 2022
@hoffa hoffa deleted the replace-connector-dependson branch October 20, 2022 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants