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

Add use_tf_var_google_credentials_env_var variable #377

Conversation

Gabology
Copy link
Contributor

@Gabology Gabology commented Feb 20, 2020

Fixes #380.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution!

Could you also make sure to add this to the variant submodules? (./gsuite_enabled/ and ./shared_vpc/)

modules/core_project_factory/variables.tf Outdated Show resolved Hide resolved
modules/core_project_factory/variables.tf Outdated Show resolved Hide resolved
@Gabology
Copy link
Contributor Author

Thanks for the review!

I've added it to the variant modules as requested

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Thanks! Just one final thing, could you run make generate_docs?

@Gabology
Copy link
Contributor Author

Gabology commented Mar 2, 2020

@morgante Docs updated as requested.

Copy link
Contributor

@morgante morgante left a comment

Choose a reason for hiding this comment

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

Sorry, just noticed a small bug. Please fix & regenerate thanks!

@@ -185,7 +186,8 @@ module "gcloud_deprivilege" {
source = "terraform-google-modules/gcloud/google"
version = "~> 0.5.0"

enabled = var.default_service_account == "deprivilege"
enabled = var.default_service_account == "deprivilege"
use_tf_google_credentials_env_var = use_tf_google_credentials_env_var
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
use_tf_google_credentials_env_var = use_tf_google_credentials_env_var
use_tf_google_credentials_env_var = var.use_tf_google_credentials_env_var

@@ -210,7 +212,8 @@ module "gcloud_disable" {
source = "terraform-google-modules/gcloud/google"
version = "~> 0.5.0"

enabled = var.default_service_account == "disable"
enabled = var.default_service_account == "disable"
use_tf_google_credentials_env_var = use_tf_google_credentials_env_var
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
use_tf_google_credentials_env_var = use_tf_google_credentials_env_var
use_tf_google_credentials_env_var = var.use_tf_google_credentials_env_var

variables.tf Outdated
@@ -179,6 +179,12 @@ variable "pip_executable_path" {
default = "pip3"
}

variable "use_tf_google_credentials_env_var" {
description = "Use GOOGLE_CREDENTIALS environment variable to run gcloud auth activate-service-account with."
type = string
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
type = string
type = bool

@Gabology
Copy link
Contributor Author

Gabology commented Mar 3, 2020

@morgante Thanks for the thorough review, I have updated the reference and variable type now.

@morgante morgante merged commit 64459de into terraform-google-modules:master Mar 3, 2020
@morgante
Copy link
Contributor

morgante commented Mar 3, 2020

Thanks for adding this and being patient with the review process.

@Gabology Gabology deleted the feature/add-use-tf-var-google-credentials-env-var branch March 23, 2020 03:51
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.

Ability to use GOOGLE_CREDENTIALS and still delete default account
2 participants