-
Notifications
You must be signed in to change notification settings - Fork 92
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
feat!: Adds support for labels #96
feat!: Adds support for labels #96
Conversation
Thanks for the PR! 🚀 |
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.
Thanks for the PR @willroberts
main.tf
Outdated
@@ -28,6 +28,7 @@ data "google_compute_subnetwork" "network" { | |||
} | |||
|
|||
resource "google_compute_forwarding_rule" "default" { | |||
provider = google-beta |
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.
I was doing some more digging and it seemed to me like the regular provider may actually support this but it is not documented. Did you try this with the regular provider before using beta?
https://github.com/hashicorp/terraform-provider-google/blob/922b67a420efa3bfabde02dd097ef1e1d68d7316/google/resource_compute_forwarding_rule.go#L289
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.
I just tested and confirmed that forwarding rules support labels without the beta provider, so I've removed the provider attribute from that resource. These docs may be slightly out of date: https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/compute_forwarding_rule#labels
The health checks do still require the beta provider, so I'll keep it in versions.tf
.
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.
We are currently using provider version >= 3.53, < 5.0
, which does not contain label support outside of beta. Should we bump our version (to >= 4.26, < 5.0
), or leave the beta provider on the forwarding rule resource for now?
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.
@willroberts Lets bump the version to 4.26
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.
Thanks @willroberts - It looks like you will need to (at least) also bump
version = "~> 2.3" |
3.1
to support the TPG4 requirement.
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.
Still looking at this; the instance_template
dependency also needed to be updated, and I'm tracking down some additional sources of provider < 4.0.0
constraints.
The terraform_validate
steps in make docker_test_lint
appear to be installing provider 3.62.0
and beta provider 3.90.1
.
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.
Got this working locally. /usr/local/bin/terraform_validate
in the container uses terraform init -backend=false
. Adding -upgrade
to the arguments resolved the dependencies successfully.
Looks like it's also passing in CI now.
No description provided.