You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Potential Error The for_each condition in the google_secret_manager_secret_version data source might cause issues if username_password_credentials_password_secret_name is provided but username_password_credentials_username is empty.
Unused Variable The username_password_credentials_password_secret_version variable is still defined in variables.tf but not used in the main configuration.
Incomplete Validation The validation for remote repository configuration doesn't check if both username and password secret name are provided when mode is REMOTE_REPOSITORY.
Why: The suggestion improves code readability by using coalesce(), which is more idiomatic in Terraform. However, it's a minor improvement and doesn't address any critical issues.
6
Maintainability
Improve readability of complex condition by formatting it across multiple lines
Consider using a more descriptive name for the alltrue condition to improve code readability.
Why: The suggestion enhances code readability by breaking a long condition into multiple lines. While helpful, it's a minor formatting change that doesn't significantly impact functionality.
5
Improve variable naming in complex condition for better code clarity
Consider using a more descriptive variable name for cp in the flatten function to improve code readability.
-condition = alltrue([for policy in flatten([for repo in var.repositories : [for cp in repo.cleanup_policies : cp]]) : policy.most_recent_versions == {} || policy.most_recent_versions.keep_count == null || policy.most_recent_versions.keep_count >= 0])+condition = alltrue([for policy in flatten([for repo in var.repositories : [for cleanup_policy in repo.cleanup_policies : cleanup_policy]]) : policy.most_recent_versions == {} || policy.most_recent_versions.keep_count == null || policy.most_recent_versions.keep_count >= 0])
Suggestion importance[1-10]: 4
Why: The suggestion proposes renaming a variable for better clarity. While it slightly improves code readability, the impact is minimal and doesn't address any functional issues.
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.
PR Type
Enhancement
Description
username_password_credentials_password_secret_name
field in theremote_repository_config_docker
objectgoogle_artifact_registry_repository
resource to use Secret Manager for password retrievalremote_repositories
to manage remote repository configurationsChanges walkthrough 📝
main.tf
Implement remote repository secret management
main.tf
remote_repositories
local variable to handle remote repositoryconfigurations
google_secret_manager_secret_version
data source for remoterepository secrets
google_artifact_registry_repository
resource to use secretmanager for password
variables.tf
Update variables and add validation for remote repositories
variables.tf
username_password_credentials_password_secret_name
toremote_repository_config_docker
objectCHANGELOG.md
Update CHANGELOG for version 0.7.0
CHANGELOG.md