fix: avoid auto_provisioning_defaults drift#1806
Conversation
need support for gke gateway related - terraform-google-modules/terraform-google-kubernetes-engine#1806
0bf17d2 to
bc1c27b
Compare
| disk_size = optional(number, 100) | ||
| disk_type = optional(string, "pd-standard") |
There was a problem hiding this comment.
the default values for optional needs to be provided in the modifier, otherwise, terraform will still require the attribute.
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
|
renew |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
|
renew |
|
This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days |
apeabody
left a comment
There was a problem hiding this comment.
Thanks for the contribution @michaellzc!
Can you please rebase/re-build, and we'll get a fresh run of the CI tests.
bc1c27b to
43a1d7e
Compare
@apeabody |
|
/gcbrun |
@apeabody Thank you. All CI checks pass now. Is there anything I can do to help move things forward? |
apeabody
left a comment
There was a problem hiding this comment.
Thanks for the contribution @michaellzc!
enable_secure_boot = false and enable_integrity_monitoring = true matches TPG defaults, and are GA in minimum TPG version constraint
fixes #1596
This PR added two new optional fields to
var.cluster_autoscaling,enable_secure_boot=false, andenable_integrity_monitoring=true.design decisions:
enable_integrity_monitoringdefaults totrue, which is what other places are usingenable_secure_bootdefaults tofalse, which is what other places are usinglookup(var.node_pools[0], "enable_integrity_monitoring", true), similar pattern was used forauto_provisioning_defaults.oauth_scopes, and it was actually a surprise to me. It's better to give users more control over it.Why not just let provider to decide this optional field?
Since some google provider version ago, cluster in this module with NAP enabled will result in infinite drift, and GCP may or may not decided to update the cluster (it's unpredictable)
Test:
Using our own fork with this patch https://github.com/michaellzc/terraform-google-kubernetes-engine/tree/fork-26-1-1,
terraform planno longer showed any drift atauto_provisioning_defaults .shielded_instance_config.