This fixes oauth scopes not being set for the autoscaled pool that got introduced in #106
Background:
the auto scaled pool has different oauth scopes (the default ones) than the clusters default pool.
Default pool:
Auto scaled pool:
Presumably this also causes the issue described in #169
Note:
The long term solution to this, according to googles and terraforms documentation, would be setting a non-default service account with fine grained permission on IAM level
google recommends custom service accounts that have cloud-platform scope and permissions granted via IAM Roles.
This is not part of this PR because I'm not aware of what permissions are required
Safety:
This change is save to re-apply with terraform although it won't change the existing pools configuration. In order for these changes to take effect, recreating the autoscale pool (or, of course, the cluster) is required. However, terraform doesn't fail if a cluster has been created pre this change and then another apply with the updated terraform configuration is run.
This fixes oauth scopes not being set for the autoscaled pool that got introduced in #106
Background: the auto scaled pool has different oauth scopes (the default ones) than the clusters default pool. Default pool: Auto scaled pool: Presumably this also causes the issue described in #169
Fix: The same oauth permissions are applied both to the clusters default pool and the autoscale pool using the
auto_provisioning_defaults
in thecluster_autoscaling
block: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/container_cluster#oauth_scopes This consistently restores oauth scopes across both pools to the state pre #106Note: The long term solution to this, according to googles and terraforms documentation, would be setting a non-default service account with fine grained permission on IAM level
Safety: This change is save to re-apply with terraform although it won't change the existing pools configuration. In order for these changes to take effect, recreating the autoscale pool (or, of course, the cluster) is required. However, terraform doesn't fail if a cluster has been created pre this change and then another apply with the updated terraform configuration is run.