Skip to content
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

Add NetworkTier for GlobalForwardingRule. #12474

Merged
merged 1 commit into from
Dec 4, 2024

Conversation

marcinpilat
Copy link
Contributor

@marcinpilat marcinpilat commented Dec 3, 2024

Adds a NetworkTier for GlobalForwardingRule.

Fixes hashicorp/terraform-provider-google#20514

Release Note Template for Downstream PRs (will be copied)

compute: added `network_tier` field to `google_compute_global_forwarding_rule` resource

Copy link

github-actions bot commented Dec 3, 2024

Hello! I am a robot. Tests will require approval from a repository maintainer to run.

@slevenick, a repository maintainer, has been assigned to review your changes. If you have not received review feedback within 2 business days, please leave a comment on this PR asking them to take a look.

You can help make sure that review is quick by doing a self-review and by running impacted tests locally.

@github-actions github-actions bot requested a review from slevenick December 3, 2024 11:00
@modular-magician
Copy link
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes:

Diff report

Your PR generated some diffs in downstreams - here they are.

google provider: Diff ( 3 files changed, 50 insertions(+))
google-beta provider: Diff ( 3 files changed, 50 insertions(+))
terraform-google-conversion: Diff ( 1 file changed, 10 insertions(+))
Open in Cloud Shell: Diff ( 1 file changed, 1 insertion(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 1070
Passed tests: 996
Skipped tests: 73
Affected tests: 1

Click here to see the affected service packages
  • compute

Action taken

Found 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
  • TestAccComputeGlobalForwardingRule_globalForwardingRuleExternalManagedExample

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccComputeGlobalForwardingRule_globalForwardingRuleExternalManagedExample [Debug log]

🟢 No issues found for passed tests after REPLAYING rerun.


🟢 All tests passed!

View the build log or the debug log for each test

@@ -3,6 +3,7 @@ resource "google_compute_global_forwarding_rule" "default" {
target = google_compute_target_http_proxy.default.id
port_range = "80"
load_balancing_scheme = "EXTERNAL_MANAGED"
network_tier = "PREMIUM"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you set this to the non-default value in this test? Just to make sure we can set to something that's not PREMIUM

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Default is more complex here - PREMIUM in general is default for global ForwardingRules unless someone has project defined STANDARD network tier. STANDARD is not allowed for global ForwardingRules, so if someone has this per-project setting, then effectively cannot use terraform to setup global FRs.

This also is a reason why we cannot specify here other tier than PREMIUM.

I was considering two options:

  • Mimic API and just add networkTier to global FR (so users can set PREMIUM explicitly), or
  • Add custom code for terraform that would always set PREMIUM as networkTier.

Copy link
Contributor

Choose a reason for hiding this comment

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

If that's the case, why add this field at all to Terraform?

Copy link
Contributor

Choose a reason for hiding this comment

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

Talked offline, this is only applicable for STANDARD projects that need to specify PREMIUM to be able to create a GFR. We don't have access to these for testing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google_compute_global_forwarding_rule does not work with default project network tier STANDARD
4 participants