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

Expose service account variable #658

Merged
merged 1 commit into from
Sep 10, 2020
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions modules/asm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ To deploy this config:
| internal\_ip | Use internal ip for the cluster endpoint. | bool | `"false"` | no |
| location | The location (zone or region) this cluster has been created in. | string | n/a | yes |
| project\_id | The project in which the resource belongs. | string | n/a | yes |
| service\_account\_key\_file | Path to service account key file to auth as for running `gcloud container clusters get-credentials`. | string | `""` | no |
| skip\_gcloud\_download | Whether to skip downloading gcloud (assumes gcloud and kubectl already available outside the module) | bool | `"true"` | no |

## Outputs
Expand Down
15 changes: 8 additions & 7 deletions modules/asm/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,14 @@ module "asm_install" {
version = "~> 1.4"
module_depends_on = [var.cluster_endpoint]

gcloud_sdk_version = var.gcloud_sdk_version
skip_download = var.skip_gcloud_download
upgrade = true
additional_components = ["kubectl", "kpt", "beta", "kustomize"]
cluster_name = var.cluster_name
cluster_location = var.location
project_id = var.project_id
gcloud_sdk_version = var.gcloud_sdk_version
skip_download = var.skip_gcloud_download
upgrade = true
additional_components = ["kubectl", "kpt", "beta", "kustomize"]
cluster_name = var.cluster_name
cluster_location = var.location
project_id = var.project_id
service_account_key_file = var.service_account_key_file


kubectl_create_command = "${path.module}/scripts/install_asm.sh ${var.project_id} ${var.cluster_name} ${var.location} ${var.asm_dir} ${var.asm_version}"
Expand Down
6 changes: 6 additions & 0 deletions modules/asm/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,9 @@ variable "asm_version" {
type = string
default = "release-1.6-asm"
}

variable "service_account_key_file" {
description = "Path to service account key file to auth as for running `gcloud container clusters get-credentials`."
default = ""
}