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

Fix issues with substr for Service Accounts #91

Merged
merged 2 commits into from
Mar 12, 2019
Merged

Fix issues with substr for Service Accounts #91

merged 2 commits into from
Mar 12, 2019

Conversation

lawliet89
Copy link
Contributor

Fixes the following error:

* module.gke.google_service_account.cluster_service_account: substr: 'offset + length' cannot be larger than the length of the string in:

tf-gke-${substr(var.name, 0, 20)}

* module.gke.google_service_account.cluster_service_account: substr: 'offset + length' cannot be larger than the length of the string in:

tf-gke-${substr(var.name, 0, 20)}
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.

LGTM, can merge once CI is green.

@adrienthebo
Copy link
Contributor

We'll need to merge #87 before CI will pass on this PR; hopefully we can wrap that up by EOD.

@adrienthebo
Copy link
Contributor

Verified with the following diff:

diff --git i/examples/simple_zonal/main.tf w/examples/simple_zonal/main.tf
index a0dc9ff..c95038a 100644
--- i/examples/simple_zonal/main.tf
+++ w/examples/simple_zonal/main.tf
@@ -27,7 +27,7 @@ provider "google" {
 module "gke" {
   source            = "../../"
   project_id        = "${var.project_id}"
-  name              = "${local.cluster_type}-cluster${var.cluster_name_suffix}"
+  name              = "sz"
   regional          = false
   region            = "${var.region}"
   zones             = "${var.zones}"

I'll submit a followup PR to add this code path to our test coverage.

@adrienthebo adrienthebo merged commit de467d9 into terraform-google-modules:master Mar 12, 2019
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this pull request Jul 15, 2024
Fix issues with `substr` for Service Accounts
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.

3 participants