Skip to content
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

Refactor environment tag #3

Merged
merged 13 commits into from
Jan 12, 2024
Merged

Refactor environment tag #3

merged 13 commits into from
Jan 12, 2024

Conversation

markdboyd
Copy link
Contributor

Changes proposed in this pull request:

There's some pretty extensive refactoring in this PR, namely:

  • Making the environment tag key came from a property on the CFTagManager struct rather than an argument to GenerateTags
  • Rename CFNameResolver to CFResourceGetter
  • Refactor CFResourceGetter functions to return the CF resource, not just the resource name
  • In GenerateTags, add the ability to look up the space and org for an instance and thus set tags for them when getMissingResources = true. This helps in the context of a bind request to the broker, where there is no information about the space or org provided in the request, but we may still want to tag generated AWS resources with information about the org and space
  • Refactor GenerateTags to accept a struct of GUIDs as ResourceGUIDs rather than separate positional arguments for each GUID
  • Add/update unit tests

Things to check

  • For any logging statements, is there any chance that they could be logging sensitive data?
  • Are log statements using a logging library with a logging level set? Setting a logging level means that log statements "below" that level will not be written to the output. For example, if the logging level is set to INFO and debugging statements are written with log.debug or similar, then they won't be written to the otput, which can prevent unintentional leaks of sensitive data.

Security considerations

No security considerations, just refactoring how tags are generated for AWS resources

@markdboyd markdboyd requested a review from a team January 12, 2024 19:11
@markdboyd markdboyd merged commit 8f1bb58 into main Jan 12, 2024
1 check passed
@markdboyd markdboyd deleted the refactor-environment-tag branch January 12, 2024 19:25
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.

2 participants