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

refact: resolve ambigous variable name #1253

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gcp-py-cloudrun-cloudsql/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@
"database", instance=cloud_sql_instance.name, name=config.require("db-name")
)

users = pulumi_gcp.sql.User(
"users",
user = pulumi_gcp.sql.User(
"user",
Comment on lines +22 to +23
Copy link
Author

Choose a reason for hiding this comment

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

It's a single user so no point in being plural.y

name=config.require("db-name"),
instance=cloud_sql_instance.name,
password=config.require_secret("db-password"),
)

sql_instance_url = Output.concat(
"postgres://",
config.require("db-name"),
user.name,
Copy link
Author

Choose a reason for hiding this comment

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

Even though config.require("db-name") === user.name, it'd be best to reference user.name instead so the chain of dependencies is clear to both the reader and to the Pulumi engine.

":",
config.require_secret("db-password"),
"@/",
Expand Down