Fix Test and Update AuthZ policy resource to support new API signature#15070
Conversation
|
Hello! I am a robot. Tests will require approval from a repository maintainer to run. Googlers: For automatic test runs see go/terraform-auto-test-runs. @NickElliot, 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. |
…incipals-field sync from upstream/main
NickElliot
left a comment
There was a problem hiding this comment.
largely lgtm pending test runs, but a bunch of changes to formatting are necessary
also if you could write a changelog note that would be great thanks!
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_network_security_authz_policy" "primary" {
http_rules {
from {
not_sources {
ip_blocks {
length = # value needed
prefix = # value needed
}
principals {
contains = # value needed
ignore_case = # value needed
prefix = # value needed
suffix = # value needed
}
}
sources {
ip_blocks {
length = # value needed
prefix = # value needed
}
principals {
contains = # value needed
exact = # value needed
ignore_case = # value needed
prefix = # value needed
suffix = # value needed
}
}
}
}
}
|
Tests analyticsTotal tests: 67 Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
…incipals-field sync from upstream/main
|
Hello @NickElliot, I added the missing IpBlocks to test. However I am not sure on how to proceed with the test check for untested fields. The old fields were removed from the API signature but I understand I will have to follow the deprecation steps to get them removed in provider ver 8.0 |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_network_security_authz_policy" "primary" {
http_rules {
from {
not_sources {
principals {
contains = # value needed
ignore_case = # value needed
prefix = # value needed
suffix = # value needed
}
}
sources {
principals {
contains = # value needed
exact = # value needed
ignore_case = # value needed
prefix = # value needed
suffix = # value needed
}
}
}
}
}
|
Tests analyticsTotal tests: 67 Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
|
@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
NickElliot
left a comment
There was a problem hiding this comment.
the tests are failing due to errors about prefix, i.e.
on terraform_plugin_test.tf line 135, in resource "google_network_security_authz_policy" "default":
135: prefix = "10.1.6.0"
Inappropriate value for attribute "prefix": a number is required.
can you fix your additions to the tests? thanks!
…incipals-field sync merge from upstream/main
|
Hi @NickElliot, this is not consistent with API docs. I am checking this with the appropiate team. |
…incipals-field sync merge upstream/main
|
Hello @NickElliot, could you run tests please? I already talked with team regarding some of the updates and I updated the PR appropiately. |
…incipals-field sync merge upstream/main
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_network_security_authz_policy" "primary" {
http_rules {
from {
not_sources {
principals {
contains = # value needed
ignore_case = # value needed
prefix = # value needed
principal {
contains = # value needed
prefix = # value needed
suffix = # value needed
}
suffix = # value needed
}
}
sources {
principals {
contains = # value needed
exact = # value needed
ignore_case = # value needed
prefix = # value needed
principal {
contains = # value needed
prefix = # value needed
suffix = # value needed
}
suffix = # value needed
}
}
}
}
}
|
Tests analyticsTotal tests: 68 Click here to see the affected service packages
Action takenFound 2 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
|
🟢 Tests passed during RECORDING mode: 🟢 No issues found for passed tests after REPLAYING rerun. 🔴 Tests failed during RECORDING mode: 🔴 Errors occurred during RECORDING mode. Please fix them to complete your PR. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
Missing test reportYour PR includes resource fields which are not covered by any test. Resource: resource "google_network_security_authz_policy" "primary" {
http_rules {
from {
not_sources {
principals {
contains = # value needed
exact = # value needed
ignore_case = # value needed
prefix = # value needed
principal {
contains = # value needed
prefix = # value needed
suffix = # value needed
}
suffix = # value needed
}
}
sources {
principals {
contains = # value needed
exact = # value needed
ignore_case = # value needed
prefix = # value needed
principal {
contains = # value needed
prefix = # value needed
suffix = # value needed
}
suffix = # value needed
}
}
}
}
}
|
Tests analyticsTotal tests: 68 Click here to see the affected service packages
Action takenFound 1 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
|
15e896b
Fixes: hashicorp/terraform-provider-google#23036
Fixes: hashicorp/terraform-provider-google#23037
Due to the API update for AuthzPolicies, some limits have been revised and the signatures of certain fields have changed. The provider still accepts the old format, but calls will be rejected because of the API change. This PR aims to reconcile the provider with the new signature and deprecate the fields that are no longer available.
The deprecated fields should be removed in another PR for version 8.0 of the provider.
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.