-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
refactor: use gcloud module for scripts, closes #401 #404
refactor: use gcloud module for scripts, closes #401 #404
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately it looks like we're still seeing errors with the dependency:
Step #23 - "converge simple-regional-with-networking-local": Error: Invalid value for module argument
Step #23 - "converge simple-regional-with-networking-local":
Step #23 - "converge simple-regional-with-networking-local": on ../../../cluster.tf line 236, in module "gcloud_wait_for_cluster":
Step #23 - "converge simple-regional-with-networking-local": 236: module_depends_on = [
Step #23 - "converge simple-regional-with-networking-local": 237: google_container_cluster.primary,
Step #23 - "converge simple-regional-with-networking-local": 238: google_container_node_pool.pools,
Step #23 - "converge simple-regional-with-networking-local": 239: ]
Step #23 - "converge simple-regional-with-networking-local":
Step #23 - "converge simple-regional-with-networking-local": The given value is not suitable for child module variable "module_depends_on"
Step #23 - "converge simple-regional-with-networking-local": defined at
Step #23 - "converge simple-regional-with-networking-local": .terraform/modules/example.gke.gcloud_wait_for_cluster/terraform-google-modules-terraform-google-gcloud-55b927a/variables.tf:29,1-29:
Step #23 - "converge simple-regional-with-networking-local": all list elements must have the same type.
I'm new to the |
Yeah I think they need to be the exact same type. Let's try making them two string values. |
How does the usage of
|
You'll probably need to use splat syntax:
|
I'm getting this error now:
|
|
I'd like to keep this PR moving. @morgante, what's the current error? I'd love to wrap this up. |
Rerunning tests. @marshallford Could you resolve conflicts? |
Here's the error I'm seeing in CI, which makes me thing the dependency order isn't working properly:
|
I recant my earlier statement, this recent PR clarifies that |
@marshallford FYI this is still failing. This is the error:
|
@marshallford it would be great to get this in. Anything we can do to help complete this? |
@bharathkkb As you can see, I fought quite a bit with TF trying to establish a dependency between |
@marshallford I have a couple of ideas. Let me know if you have additional questions module_depends_on = concat(
[google_container_cluster.primary.master_version],
[for pool in google_container_node_pool.pools: pool.name]
) This similar to what @morgante suggested but I don't believe you can use splat with for_each resources as it will output a map. So I have used the usual for expansion here. ii) A few other things are we should expose |
@marshallford it looks like a bunch of unrelated |
@marshallford this is the test that failed and it was fixed here: #454
|
…lt-resource scripts Signed-off-by: Marshall Ford <[email protected]>
Signed-off-by: Marshall Ford <[email protected]>
Signed-off-by: Marshall Ford <[email protected]>
I hope I rebased correctly, dealing with the generated files wasn't fun. Had to step through a couple of manual fixes and |
@marshallford I am seeing some submodule generation errors, could you run
|
@marshallford looks like tests are green 😄
I would still like to provide this functionality if possible in this PR |
@bharathkkb Agreed. Given that I've been at odds with the module dependency issue I figured I'd focus on that first. Can you expand on what you mean by
|
@marshallford sure. From the gcloud module I think we should surface the following imho the recommended defaults should be |
I don't think we need to expose sdk_version, but otherwise agreed. |
@marshallford the lint tests are failing due to a timeout issue, should be safe to ignore. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@morgante do we need anything else before we can merge this? |
Uses gcloud module for wait-for-cluster and delete-default-resource scripts.
Fixes #401
In other words: Removes dependency on locally installed
glcloud
,kubectl
, andjq
binaries.