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 NetworkSecurity AddressGroup IAM support #9760

Merged
merged 6 commits into from
Jan 16, 2024
Merged

Add NetworkSecurity AddressGroup IAM support #9760

merged 6 commits into from
Jan 16, 2024

Conversation

averbuks
Copy link
Member

@averbuks averbuks commented Jan 5, 2024

Add NetworkSecurity AddressGroup IAM support,
Note, only project level AddressGroups have support for IAM Policies, while the upstream resource google_network_security_address_group is implemented to support both org and project parents. Hence the implementation is deviating from the normal flow.

Release Note Template for Downstream PRs (will be copied)

`google_network_security_address_group_iam_*`

@modular-magician
Copy link
Collaborator

Hello! I am a robot. It looks like you are a: Community Contributor Googler Core Contributor. Tests will run automatically.

@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.

@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.

Terraform GA: Diff ( 5 files changed, 778 insertions(+), 69 deletions(-))
Terraform Beta: Diff ( 5 files changed, 795 insertions(+), 86 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_network_security_project_address_group_iam_binding (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

Resource: google_network_security_project_address_group_iam_member (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 0
Passed tests 0
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • networksecurity

$\textcolor{red}{\textsf{Errors occurred during REPLAYING mode. Please fix them to complete your PR}}$
View the build log

@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.

Terraform GA: Diff ( 5 files changed, 747 insertions(+), 69 deletions(-))
Terraform Beta: Diff ( 5 files changed, 764 insertions(+), 86 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_network_security_project_address_group_iam_binding (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

Resource: google_network_security_project_address_group_iam_member (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 29
Passed tests 26
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • networksecurity

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccNetworkSecurityProjectAddressGroupIamBindingGenerated|TestAccNetworkSecurityProjectAddressGroupIamPolicyGenerated|TestAccNetworkSecurityProjectAddressGroupIamMemberGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccNetworkSecurityProjectAddressGroupIamBindingGenerated[Error message] [Debug log]
TestAccNetworkSecurityProjectAddressGroupIamPolicyGenerated[Error message] [Debug log]
TestAccNetworkSecurityProjectAddressGroupIamMemberGenerated[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

@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.

Terraform GA: Diff ( 5 files changed, 747 insertions(+), 69 deletions(-))
Terraform Beta: Diff ( 5 files changed, 764 insertions(+), 86 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_network_security_project_address_group_iam_binding (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

Resource: google_network_security_project_address_group_iam_member (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 29
Passed tests 26
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • networksecurity

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccNetworkSecurityProjectAddressGroupIamMemberGenerated|TestAccNetworkSecurityProjectAddressGroupIamBindingGenerated|TestAccNetworkSecurityProjectAddressGroupIamPolicyGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{green}{\textsf{Tests passed during RECORDING mode:}}$
TestAccNetworkSecurityProjectAddressGroupIamMemberGenerated[Debug log]
TestAccNetworkSecurityProjectAddressGroupIamBindingGenerated[Debug log]
TestAccNetworkSecurityProjectAddressGroupIamPolicyGenerated[Debug log]

Rerun these tests in REPLAYING mode to catch issues

$\textcolor{green}{\textsf{No issues found for passed tests after REPLAYING rerun.}}$


$\textcolor{green}{\textsf{All tests passed!}}$
View the build log or the debug log for each test

@averbuks
Copy link
Member Author

averbuks commented Jan 6, 2024

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.

Terraform GA: Diff ( 5 files changed, 747 insertions(+), 69 deletions(-)) Terraform Beta: Diff ( 5 files changed, 764 insertions(+), 86 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_network_security_project_address_group_iam_binding (2 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

Resource: google_network_security_project_address_group_iam_member (1 total tests) Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_project_address_group_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

Address Group IAM Policy does not seem to support IAM conditions

@averbuks averbuks marked this pull request as ready for review January 6, 2024 19:43
Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

a couple things I think should be changed otherwise LGTM!

@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.

Terraform GA: Diff ( 5 files changed, 678 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 678 insertions(+), 2 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: AddressGroup_iam_binding (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "AddressGroup_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

Resource: AddressGroup_iam_member (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "AddressGroup_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 29
Passed tests 26
Skipped tests: 0
Affected tests: 3

Click here to see the affected service packages
  • networksecurity

Action taken

Found 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccNetworkSecurityProjectAddressGroupIamBindingGenerated|TestAccNetworkSecurityProjectAddressGroupIamMemberGenerated|TestAccNetworkSecurityProjectAddressGroupIamPolicyGenerated

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

$\textcolor{red}{\textsf{Tests failed during RECORDING mode:}}$
TestAccNetworkSecurityProjectAddressGroupIamBindingGenerated[Error message] [Debug log]
TestAccNetworkSecurityProjectAddressGroupIamMemberGenerated[Error message] [Debug log]
TestAccNetworkSecurityProjectAddressGroupIamPolicyGenerated[Error message] [Debug log]

$\textcolor{red}{\textsf{Please fix these to complete your PR.}}$
View the build log or the debug log for each test

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

Should be better after this

mmv1/products/networksecurity/ProjectAddressGroup.yaml Outdated Show resolved Hide resolved
Co-authored-by: Nick Elliot <nickelliot@google.com>
@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.

Terraform GA: Diff ( 5 files changed, 678 insertions(+), 2 deletions(-))
Terraform Beta: Diff ( 5 files changed, 678 insertions(+), 2 deletions(-))

Missing test report

Your PR includes resource fields which are not covered by any test.

Resource: google_network_security_address_group_iam_binding (2 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_address_group_iam_binding" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

Resource: google_network_security_address_group_iam_member (1 total tests)
Please add an acceptance test which includes these fields. The test should include the following:

resource "google_network_security_address_group_iam_member" "primary" {
  condition {
    description = # value needed
    expression  = # value needed
    title       = # value needed
  }
}

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 29
Passed tests 29
Skipped tests: 0
Affected tests: 0

Click here to see the affected service packages
  • networksecurity

$\textcolor{green}{\textsf{All tests passed in REPLAYING mode.}}$
View the build log

Copy link
Contributor

@NickElliot NickElliot left a comment

Choose a reason for hiding this comment

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

LGTM! missing test detector does not apply for the conditions here.

@NickElliot NickElliot merged commit 3bde0c1 into GoogleCloudPlatform:main Jan 16, 2024
12 checks passed
@averbuks averbuks deleted the AddressGroupIAMSupport branch January 17, 2024 09:13
bskaplan pushed a commit to bskaplan/magic-modules that referenced this pull request Jan 17, 2024
* add: NetworkSecurity AddressGroup IAM support

* Remove IAM condition support, since API does not seem to support it yet.

* Fix copyright

* Fix tests

* Add legacy_name

* Update legacy_name

Co-authored-by: Nick Elliot <nickelliot@google.com>

---------

Co-authored-by: Nick Elliot <nickelliot@google.com>
kylase pushed a commit to yuanchuankee/magic-modules that referenced this pull request Jan 21, 2024
* add: NetworkSecurity AddressGroup IAM support

* Remove IAM condition support, since API does not seem to support it yet.

* Fix copyright

* Fix tests

* Add legacy_name

* Update legacy_name

Co-authored-by: Nick Elliot <nickelliot@google.com>

---------

Co-authored-by: Nick Elliot <nickelliot@google.com>
balanaguharsha pushed a commit to balanaguharsha/magic-modules that referenced this pull request May 2, 2024
* add: NetworkSecurity AddressGroup IAM support

* Remove IAM condition support, since API does not seem to support it yet.

* Fix copyright

* Fix tests

* Add legacy_name

* Update legacy_name

Co-authored-by: Nick Elliot <nickelliot@google.com>

---------

Co-authored-by: Nick Elliot <nickelliot@google.com>
pengq-google pushed a commit to pengq-google/magic-modules that referenced this pull request May 21, 2024
* add: NetworkSecurity AddressGroup IAM support

* Remove IAM condition support, since API does not seem to support it yet.

* Fix copyright

* Fix tests

* Add legacy_name

* Update legacy_name

Co-authored-by: Nick Elliot <nickelliot@google.com>

---------

Co-authored-by: Nick Elliot <nickelliot@google.com>
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