Skip to content

Conversation

rs1986x
Copy link
Contributor

@rs1986x rs1986x commented Sep 4, 2025

Hi

i have added the default_compute_class_enabled parameter. it is supported since version 7 of the provider so it's all good. the test fail in some examples because other dependency modules (e.g. project factory) have not yet updated to version 7 and for that reason it uses still provider 6.x

@rs1986x rs1986x requested review from a team, apeabody and ericyz as code owners September 4, 2025 19:38
@apeabody
Copy link
Collaborator

apeabody commented Sep 4, 2025

i have added the default_compute_class_enabled parameter. it is supported since version 7 of the provider so it's all good. the test fail in some examples because other dependency modules (e.g. project factory) have not yet updated to version 7 and for that reason it uses still provider 6.x

Thanks @rs1986x - Can you also please bump the minimum TPG constraint as appropriate, that will make the version constraint failure clear rather than unknown default_compute_class_enabled field errors: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/main/autogen/main/versions.tf.tmpl#L27

Also, https://github.com/terraform-google-modules/terraform-google-project-factory/releases/tag/v18.1.0, now includes support for TPG v7. :)

@rs1986x
Copy link
Contributor Author

rs1986x commented Sep 8, 2025

i have added the default_compute_class_enabled parameter. it is supported since version 7 of the provider so it's all good. the test fail in some examples because other dependency modules (e.g. project factory) have not yet updated to version 7 and for that reason it uses still provider 6.x

Thanks @rs1986x - Can you also please bump the minimum TPG constraint as appropriate, that will make the version constraint failure clear rather than unknown default_compute_class_enabled field errors: https://github.com/terraform-google-modules/terraform-google-kubernetes-engine/blob/main/autogen/main/versions.tf.tmpl#L27

Also, https://github.com/terraform-google-modules/terraform-google-project-factory/releases/tag/v18.1.0, now includes support for TPG v7. :)

Hi @apeabody thanks for the comment, is there anything else you would require before merging the PR? thanks

@apeabody apeabody changed the title feat: adding default_compute_class_enabled feat(TPG>=7.0): adding default_compute_class_enabled Sep 8, 2025
@apeabody apeabody changed the title feat(TPG>=7.0): adding default_compute_class_enabled feat(TPG>=7.0)!: adding default_compute_class_enabled Sep 8, 2025
@apeabody
Copy link
Collaborator

apeabody commented Sep 8, 2025

/gcbrun

@apeabody apeabody added the blocked Blocked by some other work label Sep 8, 2025
@apeabody apeabody self-assigned this Sep 8, 2025
@apeabody
Copy link
Collaborator

apeabody commented Sep 8, 2025

Probably wait for v40 for TPG>=7

@rs1986x
Copy link
Contributor Author

rs1986x commented Sep 9, 2025

Probably wait for v40 for TPG>=7

No problem. For now i am using my fork, i imagine that eventually somebody would have made the same change i have made but if it can help speed up the release why not. Let me know if you require any other change, in the meantime thanks again and i look forward to see the default class parameter in the main modules

@apeabody apeabody removed the blocked Blocked by some other work label Sep 16, 2025
@apeabody
Copy link
Collaborator

/gcbrun

@apeabody
Copy link
Collaborator

At a minimum this PR is needed first: #2446

@apeabody
Copy link
Collaborator

/gcbrun

@apeabody
Copy link
Collaborator

Currently waiting on terraform-google-modules/terraform-google-bastion-host#231

@apeabody
Copy link
Collaborator

/gcbrun

@apeabody
Copy link
Collaborator

/gcbrun

@apeabody
Copy link
Collaborator

/gcbrun

@apeabody
Copy link
Collaborator

/gemini review

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the default_compute_class_enabled parameter, which requires bumping the Google provider version to >=7.0.0. The changes are consistently applied across the main module and its submodules. I've identified a potential issue in non-autopilot clusters where default_compute_class_enabled is set unconditionally, which could lead to errors if autoscaling is disabled. I've provided suggestions to make this setting conditional for improved robustness. The rest of the changes, including documentation and metadata updates, look good.

Copy link
Collaborator

@apeabody apeabody left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution @rs1986x!

@apeabody apeabody merged commit b61584c into terraform-google-modules:main Sep 30, 2025
4 checks passed
Comment on lines +862 to +867
variable "default_compute_class_enabled" {
type = bool
description = "Enable Spot VMs as the default compute class for Node Auto-Provisioning"
default = null
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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