-
Notifications
You must be signed in to change notification settings - Fork 613
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
ECS support JSON key and version for secrets #2358
Merged
Merged
Conversation
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
fenxiong
reviewed
Feb 13, 2020
yumex93
reviewed
Feb 14, 2020
yumex93
reviewed
Feb 14, 2020
yumex93
reviewed
Feb 14, 2020
yumex93
reviewed
Feb 14, 2020
yumex93
reviewed
Feb 14, 2020
jy19
force-pushed
the
roadmap385
branch
2 times, most recently
from
February 14, 2020 20:30
71b1169
to
c7ebb43
Compare
fenxiong
approved these changes
Feb 14, 2020
jy19
force-pushed
the
roadmap385
branch
2 times, most recently
from
February 14, 2020 21:23
60e6dba
to
9b22396
Compare
yumex93
reviewed
Feb 17, 2020
agent/asm/asm.go
Outdated
|
||
secretValue, ok := secretMap[jsonKey] | ||
if !ok { | ||
err = errors.New(fmt.Sprintf("Retrieved secret from Secrets Manager did not contain json key %s", jsonKey)) |
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.
The error should start with lower case for golang.
yumex93
approved these changes
Feb 17, 2020
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 can go ahead and merge the pr once you resolve the last comment.
for roadmap issue aws#385 aws/containers-roadmap#385 this commit adds the ability for customers to add parameters to the secretsmanager ARN specified in containers. agent will be able to retrieve secret by version or retrieve part of a secret by json key. this commit also fixes a minor issue breaking go vet in an unrelated test.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This pull request is for our roadmap item: aws/containers-roadmap#385
This change allows customers to specify parameters such as
json-key
,version-stage
, orversion-id
along with the AWS Secrets Manager ARN they are already inputting for a more specific secret value.Implementation details
Agent will continue to take in an AWS Secrets Manager ARN, but will now parse the ARN into the parameters it expects. Some string manipulation and
arn.Parse
is involved. Existing secrets without these additional parameters has the same behavior.Testing
Manually tested on an EC2 instance with local agent. New and existing unit tests and integration tests pass.
New tests cover the changes: yes
Description for the changelog
Adding enhancement to secretsmanager secret specified in ECS.
Licensing
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.