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

module region output can be blank, breaking tests #309

Closed
ideasculptor opened this issue Nov 6, 2019 · 0 comments · Fixed by #362
Closed

module region output can be blank, breaking tests #309

ideasculptor opened this issue Nov 6, 2019 · 0 comments · Fixed by #362
Assignees
Labels
bug Something isn't working P2 high priority issues

Comments

@ideasculptor
Copy link
Contributor

Looks like the region output of the beta_private_cluster module (computed from a local.cluster_output_region, assigned as cluster_output_region = google_container_cluster.primary.region) can be null. This potentially breaks tests.

The case that I exercised was as follows:

regional = false
region = 'us-east4'
zones = ['us-east4-a']

According to the documentation of the google_container_cluster resource, the region attribute is deprecated, and will only have a value if the cluster is regional instead of zonal. The module should be computing the region from the location (zone), in a zonal cluster, if it is going to output a region - since tests for the with_network examples require a region. Location will contain the region in a regional cluster.

I fixed the private_zonal_with_network example by using the incoming variable as the output value instead of retrieving it from the resource attribute.

@aaron-lane aaron-lane added bug Something isn't working P2 high priority issues labels Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working P2 high priority issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants