-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support custom ids #8216
Merged
Merged
Support custom ids #8216
Changes from 10 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
9198e50
implement base id generation utilities
cloutierMat 32d552e
implement apigw and secretsmanager
cloutierMat 5b844ed
fixed typing
cloutierMat 60f884f
fixed typing for legacy python version
cloutierMat 56e54b8
remove Callable type
cloutierMat 56f5229
implementation of ResourceIdentifier
cloutierMat 228f2ea
fix error when ne values are provided when creating an api key
cloutierMat 93f156a
added test and support for passing in set ids
cloutierMat 578f48c
skip test if in server mode
cloutierMat dd111ab
fixed linting
cloutierMat 3f67c65
Fix rest api identifier naming
cloutierMat 64033bc
implement retrieving from _custom_id_ tag
cloutierMat 1c959f6
fixed type annotation
cloutierMat 8aa20a2
Fixed formatting
cloutierMat 29ba736
added unit tests
cloutierMat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having a list of ExistingId's essentially means that it's up to the user to call
moto_id_manager.set_custom_id(..)
before everyDeployment
is instantiated.So in pseudo code:
Am I understanding the flow correctly?
I can't recall another resource where this is the case, but I'm sure this happens more often.. And it is slightly confusing if the actual behaviour differs for specific Resources.
Do you think it makes sense to implement this in a different way? Maybe make it an incremental generator somehow, so that the names become
account.region.deployment1
,account.region.deployment2
, etc?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are correct.
However I don't see this as a big issue but rather a normal behavior.
The way it is currently implemented would guarantee the first run of your IAC will have the same result every time you restart. But subsequent deployment will create a new deployment in a non-destructive manner.
I can see the argument going both ways and if it ever becomes problematic we can review this behaviour, and add an auto-increment.