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

Create resource gateway #7489

Merged
merged 15 commits into from
Mar 21, 2023

Conversation

felipegc
Copy link
Contributor

@felipegc felipegc commented Mar 17, 2023

Adding network service gateway resource support.

issue tracker: hashicorp/terraform-provider-google#14027

If this PR is for Terraform, I acknowledge that I have:

  • Searched through the issue tracker for an open issue that this either resolves or contributes to, commented on it to claim it, and written "fixes {url}" or "part of {url}" in this PR description. If there were no relevant open issues, I opened one and commented that I would like to work on it (not necessary for very small changes).
  • Ensured that all new fields I added that can be set by a user appear in at least one example (for generated resources) or third_party test (for handwritten resources or update tests).
  • Generated Terraform providers, and ran make test and make lint in the generated providers to ensure it passes unit and linter tests.
  • Ran relevant acceptance tests using my own Google Cloud project and credentials (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know).
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

networkservices: added resource `gateway`

@felipegc felipegc requested a review from a team as a code owner March 17, 2023 19:16
@felipegc felipegc requested review from hao-nan-li and removed request for a team March 17, 2023 19:16
@google-cla
Copy link

google-cla bot commented Mar 17, 2023

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@modular-magician
Copy link
Collaborator

Oops! It looks like you're using an unknown release-note type in your changelog entries:

  • REPLACEME

Please only use the types listed in https://github.com/GoogleCloudPlatform/magic-modules/blob/master/.ci/RELEASE_NOTES_GUIDE.md.

@felipegc
Copy link
Contributor Author

/gcbrun

1 similar comment
@hao-nan-li
Copy link
Contributor

/gcbrun

@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 ( 2 files changed, 160 insertions(+))
Terraform Beta: Diff ( 6 files changed, 1004 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 220 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2504
Passed tests 2236
Skipped tests: 263
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccNetworkServicesGateway_update|TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample|TestAccNetworkServicesGateway_networkServicesGatewayBasicExample|TestAccDataSourceDnsManagedZone_basic|TestAccComposerEnvironment_withEncryptionConfigComposer2

Get to know how VCR tests work

Copy link
Contributor

@hao-nan-li hao-nan-li left a comment

Choose a reason for hiding this comment

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

Looks like you added a new resource. Is there a public doc I can refer?

Edit: Actually I saw it in the committed file as https://cloud.google.com/traffic-director/docs/reference/network-services/rest/v1beta1/projects.locations.gateways

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample[Debug log]
TestAccComposerEnvironment_withEncryptionConfigComposer2[Debug log]

Tests failed during RECORDING mode:
TestAccNetworkServicesGateway_update[Error message] [Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayBasicExample[Error message] [Debug log]
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@felipegc
Copy link
Contributor Author

/gcbrun

1 similar comment
@hao-nan-li
Copy link
Contributor

/gcbrun

@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 ( 2 files changed, 160 insertions(+))
Terraform Beta: Diff ( 6 files changed, 1004 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 220 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2506
Passed tests 2237
Skipped tests: 263
Affected tests: 6

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccNetworkServicesGateway_update|TestAccNetworkServicesGateway_networkServicesGatewayBasicExample|TestAccFirebaserulesRelease_BasicRelease|TestAccComputeForwardingRule_update|TestAccComposerEnvironment_withEncryptionConfigComposer2|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccNetworkServicesGateway_networkServicesGatewayBasicExample[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]
TestAccComputeForwardingRule_update[Debug log]
TestAccComposerEnvironment_withEncryptionConfigComposer2[Debug log]

Tests failed during RECORDING mode:
TestAccNetworkServicesGateway_update[Error message] [Debug log]
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@hao-nan-li
Copy link
Contributor

/gcbrun

@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 ( 2 files changed, 160 insertions(+))
Terraform Beta: Diff ( 6 files changed, 1004 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 220 insertions(+))

@hao-nan-li
Copy link
Contributor

/gcbrun

@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 ( 2 files changed, 160 insertions(+))
Terraform Beta: Diff ( 6 files changed, 1004 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 220 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2506
Passed tests 2237
Skipped tests: 263
Affected tests: 6

Action taken

Found 6 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccNetworkServicesGateway_update|TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample|TestAccNetworkServicesGateway_networkServicesGatewayBasicExample|TestAccDataSourceGoogleServiceAccountJwt|TestAccFirebaserulesRelease_BasicRelease|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccNetworkServicesGateway_update[Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayAdvancedExample[Debug log]
TestAccNetworkServicesGateway_networkServicesGatewayBasicExample[Debug log]
TestAccDataSourceGoogleServiceAccountJwt[Debug log]
TestAccFirebaserulesRelease_BasicRelease[Debug log]

Tests failed during RECORDING mode:
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

@felipegc
Copy link
Contributor Author

@hao-nan-li I don't think this test is related to my changes: "TestAccDataSourceDnsManagedZone_basic". Is that possible to go ahead with the review? Thanks

@hao-nan-li
Copy link
Contributor

Don't worry about TestAccDataSourceDnsManagedZone_basic, it's not related to your PR.

@felipegc
Copy link
Contributor Author

@hao-nan-li ready for new review. Thanks

@hao-nan-li
Copy link
Contributor

/gcbrun

@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 ( 2 files changed, 165 insertions(+))
Terraform Beta: Diff ( 6 files changed, 998 insertions(+), 2 deletions(-))
TF Validator: Diff ( 2 files changed, 3 insertions(+), 3 deletions(-))
TF OiCS: Diff ( 8 files changed, 220 insertions(+))

@modular-magician
Copy link
Collaborator

Tests analytics

Total tests: 2516
Passed tests 2248
Skipped tests: 263
Affected tests: 5

Action taken

Found 5 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
TestAccNetworkServicesGateway_update|TestAccLoggingBucketConfigProject_analyticsEnabled|TestAccComputeForwardingRule_update|TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample|TestAccDataSourceDnsManagedZone_basic

Get to know how VCR tests work

@modular-magician
Copy link
Collaborator

Tests passed during RECORDING mode:
TestAccNetworkServicesGateway_update[Debug log]
TestAccLoggingBucketConfigProject_analyticsEnabled[Debug log]
TestAccComputeForwardingRule_update[Debug log]
TestAccBigtableAppProfile_bigtableAppProfileAnyclusterExample[Debug log]

Tests failed during RECORDING mode:
TestAccDataSourceDnsManagedZone_basic[Error message] [Debug log]

Please fix these to complete your PR
View the build log or the debug log for each test

Copy link
Contributor

@hao-nan-li hao-nan-li left a comment

Choose a reason for hiding this comment

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

LGTM

@hao-nan-li hao-nan-li merged commit 82f5393 into GoogleCloudPlatform:main Mar 21, 2023
dannawang0221 pushed a commit to dannawang0221/magic-modules that referenced this pull request Mar 24, 2023
* creating gateway resource

* creating gateway basic test

* adding update test and shipping only to beta

* adapting the network services gateway terraform examples and tests

* setting location to global because dynamic one is not working

* adding serverTlsPolicy field in gateway properties

* removing useless comments

* changing gateway scopes for each test scenario

* fixing PR comments: updating attributes in properties spec

* allowing the location to be parametrized
ericayyliu pushed a commit to ericayyliu/magic-modules that referenced this pull request Jul 26, 2023
* creating gateway resource

* creating gateway basic test

* adding update test and shipping only to beta

* adapting the network services gateway terraform examples and tests

* setting location to global because dynamic one is not working

* adding serverTlsPolicy field in gateway properties

* removing useless comments

* changing gateway scopes for each test scenario

* fixing PR comments: updating attributes in properties spec

* allowing the location to be parametrized
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