Add google_apigee_datastore resource#16957
Conversation
|
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. |
|
@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
|
@GoogleCloudPlatform/terraform-team @NickElliot This PR has been waiting for review for 1 week. Please take a look! Use the label |
NickElliot
left a comment
There was a problem hiding this comment.
sorry for the delays, was on PTO! could you share logs of running those tests on your configured environment?
|
@NickElliot CI is looking clean on this one — all checks pass:
Similar to #16954 (DataCollector), this Datastore resource requires a live Apigee org so the acceptance test is VCR-skipped. The resource has been manually tested end-to-end against a live GCP project — full CRUD lifecycle verified. Same note as above — I've already incorporated the review patterns from @zli82016 on #16955 (vars, update tests, etc.) and can apply them here if needed. Happy to make any changes — just let me know. |
Enable storage.googleapis.com on the test project and set uniform_bucket_level_access on the analytics bucket. Found during local acceptance testing against an org with storage constraints.
|
Pushed a test template fix found during local acceptance testing:
This push should trigger a fresh CI run. The DataCollector sibling resource (#16954) passed its full acceptance test locally — 15 minute end-to-end CRUD lifecycle against a live Apigee org. |
NickElliot
left a comment
There was a problem hiding this comment.
I still need to see debug logs of the acceptance tests passing even if they passed on the other resource, thanks!
Also as with the other resource, I double checked other apigee tests and saw we are able to provision Orgs within those tests without skipping them in CI/VCR e.g. TestAccApigeeOrganization_apigeeOrganizationCloudBasicTestExample, is there any reason we can't do the same here?
|
Thanks @NickElliot — same answer as on #16954. I'll remove Appreciate the thorough review. |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit bdd7f31: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 4 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the build log or the debug logs folder for detailed results. @ogormans-deptstack, @NickElliot VCR tests complete for bdd7f31! |
|
@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
- Remove exclude_sweeper to enable resource cleanup - Add network_name and range_name vars to doc examples - Consistent with reviewer feedback on sibling PR GoogleCloudPlatform#16955
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit ce4434b: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the build log or the debug logs folder for detailed results. @ogormans-deptstack, @NickElliot VCR tests complete for ce4434b! |
|
@NickElliot VCR results are in. VCR recording results:
The Datastore test failure is in the same category as the Organization tests — the generated test creates a full Apigee org from scratch (new project, VPC, service networking, org provisioning) which is inherently fragile in VCR recording mode. The two Organization test failures are pre-existing and appear on every Apigee PR (same failures on #16954 and #16955). For comparison: on #16954 (DataCollector), the resource-specific test passed VCR replay cleanly — it wasn't even flagged as affected. The difference is that DataCollector has a simpler test setup, while Datastore's BigQuery test requires additional GCS bucket infrastructure that adds more variability to the recording. Context from the sibling PRs:
Happy to address any other concerns. |
|
@GoogleCloudPlatform/terraform-team @NickElliot This PR has been waiting for review for 1 week. Please take a look! Use the label |
NickElliot
left a comment
There was a problem hiding this comment.
the TestAccApigeeDatastore_apigeeDatastoreBigqueryTestExample error is not related to org provisioning but enabling bigquery, can you add a resource for google_project_service to enable it?
|
Fixed — the |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 3f5810f: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode 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
View the replaying VCR build log Step 2: Recording Mode
🟢 All tests passed! View the recording VCR build log or the debug logs folder for detailed results. @ogormans-deptstack, @NickElliot VCR tests complete for 3f5810f! |
|
@NickElliot This PR has been waiting for review for 3 weekdays. Please take a look! Use the label |
b3bb99a
New resource
google_apigee_datastorefor managing Apigee Analytics data export destinations via theorganizations.analytics.datastoresAPI.Fixes hashicorp/terraform-provider-google#24772
Datastores define where Apigee exports analytics data -- either a Cloud Storage bucket or a BigQuery dataset. This resource supports both target types with all configuration fields from the API.
Tested all CRUD operations + import against a live Apigee evaluation org:
organizations/{org}/analytics/datastores/{uuid})Key implementation details:
selffield (notname) containing the full resource path with a server-assigned UUID. A custom decoder extracts the UUID from the last path segment ofselfand sets it asnamefor URL template resolution.PUTwith no update mask (same pattern asDeveloperApp,CustomReport).pathfield with a leading/-- the example reflects this.targetTypeis immutable (cannot switch betweengcsandbigqueryafter creation).Operational note on lifecycle management
Analytics datastores are often used in rotation patterns -- e.g., pointing exports to date-partitioned GCS paths or rotating BigQuery table prefixes on a schedule. When managing datastores that receive frequent config updates from external automation (export schedulers, rotation scripts), users may want to use Terraform lifecycle meta-arguments to avoid drift:
For datastores that are fully Terraform-managed with no external rotation, no special lifecycle configuration is needed.
Related to PR #16954 (
google_apigee_data_collector) and PR #16955 (google_apigee_custom_report).Release Note Template for Downstream PRs (will be copied)