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

Adding Apigee NAT Address Resource #5018

Merged

Conversation

danistrebel
Copy link
Contributor

Adding Apigee NAT addresses for Apigee Instances as per the Apigee API

fixes hashicorp/terraform-provider-google#9358

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).
  • Generated Terraform, and ran make test and make lint to ensure it passes unit and linter tests.
  • 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).
  • Ran relevant acceptance tests (If the acceptance tests do not yet pass or you are unable to run them, please let your reviewer know). => Unable to run the terraform-provider-google tests 😞 .
  • Read the Release Notes Guide before writing my release note below.

Release Note Template for Downstream PRs (will be copied)

`google_apigee_nat_address`

@google-cla google-cla bot added the cla: yes label Jul 30, 2021
@modular-magician
Copy link
Collaborator

Hello! I am a robot who works on Magic Modules PRs.

I have detected that you are a community contributor, so your PR will be assigned to someone with a commit-bit on this repo for initial review.

Thanks for your contribution! A human will be with you soon.

@rileykarson, please review this PR or find an appropriate assignee.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 7 files changed, 537 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 9 files changed, 539 insertions(+), 7 deletions(-))
TF Conversion: Diff ( 1 file changed, 54 insertions(+))

@rileykarson rileykarson requested review from melinath and removed request for rileykarson August 13, 2021 09:11
@rileykarson
Copy link
Member

Sorry, lost email on my end. @melinath do you mind picking up this review, since you've looked at Apigee more extensively?

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

This seems reasonable. I'll start a /gcbrun.

org_id = google_apigee_organization.apigee_org.id
}

resource "google_apigee_nat_address" "apigee_nat_addres" {
Copy link
Member

Choose a reason for hiding this comment

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

typo: should be apigee_nat_adress

@melinath
Copy link
Member

/gcbrun

@melinath melinath self-requested a review September 22, 2021 18:00
Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

It looks like this is failing due to issues in the ansible provider. If you merge master (or rebase your PR) that should address the issue. Could you clarify the issues you had running the acceptance tests for this change?

Sorry that this fell through the cracks. Please feel free to re-request review any time that you're ready for another review.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 7 files changed, 537 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 8 files changed, 539 insertions(+), 5 deletions(-))
TF Conversion: Diff ( 1 file changed, 63 insertions(+))

@danistrebel
Copy link
Contributor Author

thanks @melinath rebased the branch and it looks like we need a /gcbrun again for the remaining check. Thanks

@melinath
Copy link
Member

/gcbrun

@melinath melinath self-requested a review September 29, 2021 15:17
@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 7 files changed, 537 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 7 files changed, 537 insertions(+), 4 deletions(-))
TF Conversion: Diff ( 1 file changed, 63 insertions(+))

@modular-magician
Copy link
Collaborator

Tests were added that did not run in TeamCity:

  • TestAccApigeeNatAddress_apigeeNatAddressBasicTestExample

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccTags You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=208280

@melinath
Copy link
Member

melinath commented Oct 1, 2021

@melinath
Copy link
Member

melinath commented Oct 1, 2021

Hm. That failed with the following error:

------- Stdout: -------
=== RUN   TestAccApigeeNatAddress_apigeeNatAddressBasicTestExample
=== PAUSE TestAccApigeeNatAddress_apigeeNatAddressBasicTestExample
=== CONT  TestAccApigeeNatAddress_apigeeNatAddressBasicTestExample
provider_test.go:278: Step 1/2 error: Error running apply: exit status 1
2021/10/01 18:48:31 [DEBUG] Using modified User-Agent: Terraform/0.12.30 HashiCorp-terraform-exec/0.13.0
Error: Error waiting to create Instance: Error waiting for Creating Instance: Error code 13, message: Unexpected error during operation. Try again later
on terraform_plugin_test.tf line 56, in resource "google_apigee_instance" "apigee_instance":
56: resource "google_apigee_instance" "apigee_instance" {
--- FAIL: TestAccApigeeNatAddress_apigeeNatAddressBasicTestExample (2443.86s)
FAIL

Here's the full request/response:

---[ REQUEST ]---------------------------------------
GET /v1/organizations/tf-testvh9ifx91zu/operations/9f6ef1e2-28ba-42eb-b780-a72e4a0f485d?alt=json HTTP/1.1
Host: apigee.googleapis.com
User-Agent: Terraform/0.12.30 (+https://www.terraform.io) Terraform-Plugin-SDK/2.5.0 terraform-provider-google-beta/dev
Content-Type: application/json
Accept-Encoding: gzip


-----------------------------------------------------
2021/10/01 19:26:43 [DEBUG] Google API Response Details:
---[ RESPONSE ]--------------------------------------
HTTP/2.0 200 OK
Alt-Svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000,h3-T051=":443"; ma=2592000,h3-Q050=":443"; ma=2592000,h3-Q046=":443"; ma=2592000,h3-Q043=":443"; ma=2592000,quic=":443"; ma=2592000; v="46,43"
Cache-Control: private
Content-Type: application/json; charset=UTF-8
Date: Fri, 01 Oct 2021 19:26:43 GMT
Server: ESF
Vary: Origin
Vary: X-Origin
Vary: Referer
X-Content-Type-Options: nosniff
X-Frame-Options: SAMEORIGIN
X-Xss-Protection: 0

{
  "name": "organizations/tf-testvh9ifx91zu/operations/9f6ef1e2-28ba-42eb-b780-a72e4a0f485d",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.apigee.v1.OperationMetadata",
    "operationType": "INSERT",
    "targetResourceName": "organizations/tf-testvh9ifx91zu/instances/tf-testvh9ifx91zu",
    "state": "FINISHED",
    "progress": {
      "description": "Succeeded",
      "percentDone": 100
    }
  },
  "done": true,
  "error": {
    "code": 13,
    "message": "Unexpected error during operation. Try again later"
  }
}

-----------------------------------------------------

Is this probably transient, or more likely flakey? (Starting another CI test run for just this test: https://ci-oss.hashicorp.engineering/buildConfiguration/GoogleCloudBeta_ProviderGoogleCloudBetaMmUpstream/208699)

@melinath
Copy link
Member

melinath commented Oct 8, 2021

(FWIW it looks like that last run failed with the same error.)

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

I'm removing this from my review queue pending a response/fix re: the above error.

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 8 files changed, 555 insertions(+), 22 deletions(-))
Terraform Beta: Diff ( 8 files changed, 555 insertions(+), 22 deletions(-))
TF Conversion: Diff ( 1 file changed, 63 insertions(+))
TF Validator: Diff ( 1 file changed, 63 insertions(+))

@danistrebel
Copy link
Contributor Author

@melinath Could you please re-run the cloud build again? I trust the Apigee instance provisioning has stabilized since we last tried. Thanks

@melinath
Copy link
Member

/gcbrun

@modular-magician
Copy link
Collaborator

Hi! I'm the modular magician. Your PR generated some diffs in downstreams - here they are.

Diff report:

Terraform GA: Diff ( 7 files changed, 537 insertions(+), 4 deletions(-))
Terraform Beta: Diff ( 8 files changed, 555 insertions(+), 22 deletions(-))
TF Conversion: Diff ( 1 file changed, 63 insertions(+))
TF Validator: Diff ( 1 file changed, 63 insertions(+))

@modular-magician
Copy link
Collaborator

Tests were added that did not run in TeamCity:

  • TestAccApigeeNatAddress_apigeeNatAddressBasicTestExample

@modular-magician
Copy link
Collaborator

I have triggered VCR tests in RECORDING mode for the following tests that failed during VCR: TestAccDatasourceGoogleServiceNetworkingPeeredDnsDomain_basic|TestAccApigeeEnvironmentIamMemberGenerated|TestAccApigeeEnvironmentIamPolicyGenerated|TestAccCloudFunctionsFunction_vpcConnector|TestAccContainerNodePool_withInvalidUpgradeSettings|TestAccServiceNetworkingPeeredDNSDomain_basic You can view the result here: https://ci-oss.hashicorp.engineering/viewQueued.html?itemId=232708

@melinath
Copy link
Member

Copy link
Member

@melinath melinath left a comment

Choose a reason for hiding this comment

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

LGTM - test failure seems to be related to hashicorp/terraform-provider-google#9988 (Apigee instance permadiff)

@rileykarson
Copy link
Member

Given the basic test for this resource failed on its first nightly, can we revert and resolve the Apigee instance failure prior to merging?

@melinath
Copy link
Member

@rileykarson sure, if that's preferred.

melinath added a commit that referenced this pull request Dec 23, 2021
@rileykarson
Copy link
Member

A fix-forward also works, I'd like to avoid merging a resource whose sole test is already failing out of the gate is all!

@melinath
Copy link
Member

given the holidays, I think a rollback is going to be safer / more useful than a fix-forward.

melinath added a commit that referenced this pull request Dec 23, 2021
xuchenma pushed a commit to xuchenma/magic-modules that referenced this pull request Jan 7, 2022
xuchenma pushed a commit to xuchenma/magic-modules that referenced this pull request Jan 7, 2022
betsy-lichtenberg pushed a commit to betsy-lichtenberg/magic-modules that referenced this pull request Apr 25, 2022
betsy-lichtenberg pushed a commit to betsy-lichtenberg/magic-modules that referenced this pull request Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for NAT addresses of the Apigee X instance
4 participants