-
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
Merged
bharathkkb
merged 10 commits into
terraform-google-modules:master
from
willroberts:label-support
Jun 27, 2022
Merged
Changes from 3 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
bdf4dbf
Adds support for labels
09637a2
Merge branch 'master' into label-support
bharathkkb 5505339
Add provider_meta
a18c53c
forwarding rule does not need beta provider
3a79610
Use provider version 4.26
2a60503
Upgrade GCP/lb/google to 3.1
2e239a3
bump provider versions
f66baf4
bump test setup providers
387ea26
Update instance_template module to allow provider v4
af5db6e
Update project factory module to allow provider v4
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
terraform-google-lb-internal/examples/simple/main.tf
Line 19 in 7bdf7ab
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 ofprovider < 4.0.0
constraints.The
terraform_validate
steps inmake docker_test_lint
appear to be installing provider3.62.0
and beta provider3.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 usesterraform init -backend=false
. Adding-upgrade
to the arguments resolved the dependencies successfully.Looks like it's also passing in CI now.