Skip to content

add resources to support apigee proxy deployments#15126

Merged
c2thorn merged 27 commits into
GoogleCloudPlatform:mainfrom
jcaldwell-lb:api-deployment-resource
Sep 24, 2025
Merged

add resources to support apigee proxy deployments#15126
c2thorn merged 27 commits into
GoogleCloudPlatform:mainfrom
jcaldwell-lb:api-deployment-resource

Conversation

@jcaldwell-lb
Copy link
Copy Markdown
Contributor

@jcaldwell-lb jcaldwell-lb commented Sep 11, 2025

Fixes hashicorp/terraform-provider-google#24218

Provides a resource called google_apigee_api_deployment that manages Apigee proxy deployments, similar to the existing resource google_apigee_sharedflow_deployment.

Release Note Template for Downstream PRs (will be copied)

See Write release notes for guidance.

`google_apigee_api_deployment`

@github-actions github-actions Bot requested a review from c2thorn September 11, 2025 20:55
@github-actions
Copy link
Copy Markdown

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.

@c2thorn, 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
Copy Markdown
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 ( 5 files changed, 566 insertions(+))
google-beta provider: Diff ( 5 files changed, 566 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccApigeeApiDeployment_apigeeApiDeploymentTestExample

Tests analytics

Total tests: 67
Passed tests: 24
Skipped tests: 43
Affected tests: 0

Click here to see the affected service packages
  • apigee

🟢 All tests passed!

View the build log

Copy link
Copy Markdown
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

The test is skipped in VCR so I'm running a manual test run in our CI. I'll post the results later.

For now, can you tell me why this resource is handwritten instead of generated via yaml in the apigee product folder: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/apigee

Looking through the schema, I don't believe I'm seeing anything out of the ordinary. If its possible, we'd prefer to have the yaml files be the source of truth for resource schemas.

resource "google_apigee_api" "test_apigee_api" {
name = "tf-test-apigee-api"
org_id = google_project.project.project_id
config_bundle = "%{config_bundle}"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

By changing the config_bundle here, are we expecting the api_deployment resource to force recreate?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We are - when I ran this acceptance test I saw that both a revision 1 and 2 were deployed. This is akin to the shared flow test.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This resource is handwritten because the related google_apigee_sharedflow_deployment is also handwritten, and the use case is very similar. I can look into the MMv1 format if you'd prefer that.

Copy link
Copy Markdown
Member

@c2thorn c2thorn Sep 12, 2025

Choose a reason for hiding this comment

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

Thanks for sharing the similar resource. Looking at its creation PR
#7202, I see

Using handwritten approach for sharedflow as create API requires a file to be uploaded as `octet-stream` and mmv1 does not support this pattern

It looks like Sharedflow needed be handwritten, but I'm very doubtful SharedflowDeployment needed to be. It does have a non-standard create URL but it seems google_apigee_api_deployment does not.

Handwritten resources are considered only to be created when absolutely necessary and make it harder for maintainability over time (divergence from large sweeping changes to the engine, harder for our metric tracking). I appreciate that this resource is already complete, but I have to ask you to please recreate it following the standard "MMv1" method here: https://googlecloudplatform.github.io/magic-modules/develop/add-resource/. This resource is fairly small, so hopefully it should be quick.

This will reduce the need for the handwritten documentation file as well. You could keep the test file you already have, but there would need to be at least one create test example for the generated documentation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It took me some time to figure out but I believe I have constructed a new resource using the MMv1 templating format. It looks like the generated test file passes as well. Please take a look and let me know if there's anything else you'll need!

@github-actions github-actions Bot requested a review from c2thorn September 16, 2025 22:46
@github-actions
Copy link
Copy Markdown

@c2thorn This PR has been waiting for review for 3 weekdays. Please take a look! Use the label disable-review-reminders to disable these notifications.

Copy link
Copy Markdown
Member

@c2thorn c2thorn left a comment

Choose a reason for hiding this comment

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

kicking off the build

@jcaldwell-lb
Copy link
Copy Markdown
Contributor Author

kicking off the build

Does it look successful from your end?

@github-actions github-actions Bot requested a review from c2thorn September 22, 2025 15:50
@modular-magician
Copy link
Copy Markdown
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 ( 5 files changed, 591 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 5 files changed, 591 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 59 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccApigeeApiDeployment_apigeeApiDeploymentBasicTestExample

Tests analytics

Total tests: 67
Passed tests: 23
Skipped tests: 43
Affected tests: 1

Click here to see the affected service packages
  • apigee

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
  • TestAccApigeeDeveloper_apigeeDeveloperUpdateTest

Get to know how VCR tests work

@modular-magician
Copy link
Copy Markdown
Collaborator

🟢 Tests passed during RECORDING mode:
TestAccApigeeDeveloper_apigeeDeveloperUpdateTest [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

@jcaldwell-lb
Copy link
Copy Markdown
Contributor Author

I see there is a failing check, that seems to be a test. I cannot see the reason behind the issue, do I need to make a change?

@zli82016
Copy link
Copy Markdown
Member

/gcbrun

@zli82016
Copy link
Copy Markdown
Member

zli82016 commented Sep 24, 2025

I see there is a failing check, that seems to be a test. I cannot see the reason behind the issue, do I need to make a change?

Feel free to ignore the failed google conversion integration tests. Sorry for the confusion.

@modular-magician
Copy link
Copy Markdown
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 ( 5 files changed, 591 insertions(+), 2 deletions(-))
google-beta provider: Diff ( 5 files changed, 591 insertions(+), 2 deletions(-))
terraform-google-conversion: Diff ( 1 file changed, 59 insertions(+))

@modular-magician
Copy link
Copy Markdown
Collaborator

Non-exercised tests

🔴 Tests were added that are skipped in VCR:

  • TestAccApigeeApiDeployment_apigeeApiDeploymentBasicTestExample

Tests analytics

Total tests: 67
Passed tests: 24
Skipped tests: 43
Affected tests: 0

Click here to see the affected service packages
  • apigee

🟢 All tests passed!

View the build log

@c2thorn c2thorn added this pull request to the merge queue Sep 24, 2025
Merged via the queue into GoogleCloudPlatform:main with commit c92357c Sep 24, 2025
25 of 26 checks passed
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Sep 26, 2025
jkrish-c pushed a commit to jkrish-c/magic-modules that referenced this pull request Oct 14, 2025
g-dreva pushed a commit to g-dreva/magic-modules that referenced this pull request Oct 15, 2025
BBBmau pushed a commit to BBBmau/magic-modules that referenced this pull request Oct 20, 2025
JianweiQ pushed a commit to JianweiQ/magic-modules that referenced this pull request Feb 20, 2026
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.

Presence of a "google_apigee_sharedflow_deployment" resource, but not a "google_apigee_api_deployment" resource.

4 participants