Skip to content

Add google_vertex_ai_monitored_agent resource (beta)#18300

Open
jiany18-qd wants to merge 12 commits into
GoogleCloudPlatform:mainfrom
jiany18-qd:aad-monitored-agent
Open

Add google_vertex_ai_monitored_agent resource (beta)#18300
jiany18-qd wants to merge 12 commits into
GoogleCloudPlatform:mainfrom
jiany18-qd:aad-monitored-agent

Conversation

@jiany18-qd

Copy link
Copy Markdown

Adds a beta resource for MonitoredAgent using the enable/disable-as-CRUD pattern (Create=Enable, Delete=Disable, Read=Get). Includes disable_on_destroy and NOT_FOUND retry for agent discovery lag.

Companion to PR #18270 (AgentAnomalyDetectionScope).

b/527074080

`google_vertex_ai_monitored_agent`

Adds a new beta resource for the Vertex AI Agent Anomaly Detection (AAD)
scope, which defines the Cloud Logging and Observability buckets that AAD
monitors for anomalous agent behavior in a location. The resource supports
create/read/delete with LRO (async) create and delete; all configurable
fields are immutable since the API has no public update method.
Update insert minutes to 40
…attern)

Adds a Terraform resource for AAD MonitoredAgent that maps the TF lifecycle
to Enable/Disable APIs (same pattern as google_project_service):
- Create = EnableMonitoredAgent (POST :enable, sync LRO)
- Read   = GetMonitoredAgent (DISABLED state = absent from TF)
- Delete = DisableMonitoredAgent (POST :disable, sync LRO)
- No Update (immutable)

Features:
- disable_on_destroy field (default true, like google_project_service)
- Retry on NOT_FOUND during Enable (Dataplex EntryLink pattern) for
  agents not yet discovered by the background sync job
- Decoder clears TF state when agent state is DISABLED
- 3 minute timeouts for enable/disable

Part of AAD GA Terraform compliance (b/527074080).
Splitting per modular-magician's request: one resource per PR.
MonitoredAgent (enable/disable pattern) will follow in a separate PR
after this one merges.
…attern)

Adds a Terraform resource for AAD MonitoredAgent that maps the TF lifecycle
to Enable/Disable APIs (same pattern as google_project_service):
- Create = EnableMonitoredAgent (POST :enable, sync LRO)
- Read   = GetMonitoredAgent (DISABLED state = absent from TF)
- Delete = DisableMonitoredAgent (POST :disable, sync LRO)
- No Update (immutable)

Features:
- disable_on_destroy field (default true, like google_project_service)
- Retry on NOT_FOUND during Enable (Dataplex EntryLink pattern) for
  agents not yet discovered by the background sync job
- Decoder clears TF state when agent state is DISABLED
- 3 minute timeouts for enable/disable

Part of AAD GA Terraform compliance (b/527074080).
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 15, 2026
@github-actions

Copy link
Copy Markdown

Googlers: For automatic test runs see go/terraform-auto-test-runs.

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

@github-actions
github-actions Bot requested a review from slevenick July 15, 2026 22:17
@jiany18-qd
jiany18-qd force-pushed the aad-monitored-agent branch from d6aeb2b to 464bc26 Compare July 16, 2026 21:05
@modular-magician modular-magician removed the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 16, 2026
@modular-magician

modular-magician commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 464bc26:

Diff report

Your PR generated the following diffs in downstream repositories:

Repository Diff Link Changes
google provider View Diff 2 files changed, 225 insertions(+)
google-beta provider View Diff 5 files changed, 1046 insertions(+)
terraform-google-conversion View Diff 2 files changed, 127 insertions(+)

Missing service labels

The following new resources do not have corresponding service labels:

  • google_vertex_ai_monitored_agent

If you believe this detection to be incorrect please raise the concern with your reviewer. Googlers: This error is safe to ignore once you've completed go/fix-missing-service-labels.
An override-missing-service-label label can be added to allow merging.

Test report

Analytics

Total Tests Passed Skipped Affected
6789 6075 702 12
Affected Service Packages
  • All service packages are affected

Learn how VCR tests work


Step 1: Replaying Mode

Action taken

Found 12 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit.

Click here to see the affected tests
  • TestAccComputeInstanceFromMachineImage_diffProject
  • TestAccComputeInstanceFromTemplate_confidentialInstanceConfigMain
  • TestAccComputeReservation_reservationSharingPolicyExample
  • TestAccComputeRouterPeer_UpdateMd5AuthenticationKey
  • TestAccContainerCluster_regionalWithNodePool
  • TestAccContainerNodePool_withHostMaintenancePolicy
  • TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
  • TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
  • TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
  • TestAccProjectIamMemberRemove_memberInMultipleBindings
  • TestAccPubsubSubscription_pubsubSubscriptionTagsExample
  • TestAccVertexAIMonitoredAgent_vertexAiMonitoredAgentBasicExample

View the replaying VCR build log


Step 2: Recording Mode

Recording Mode Replaying Rerun Test Name
✅ Log TestAccComputeInstanceFromTemplate_confidentialInstanceConfigMain
✅ Log TestAccComputeReservation_reservationSharingPolicyExample
✅ Log TestAccComputeRouterPeer_UpdateMd5AuthenticationKey
✅ Log TestAccProjectIamMemberRemove_memberInMultipleBindings
❌ Error · Log - TestAccComputeInstanceFromMachineImage_diffProject
❌ Error · Log - TestAccContainerCluster_regionalWithNodePool
❌ Error · Log - TestAccContainerNodePool_withHostMaintenancePolicy
❌ Error · Log - TestAccDataprocMetastoreService_dataprocMetastoreServicePrivateServiceConnectExample
❌ Error · Log - TestAccDiscoveryEngineDataStore_discoveryengineDatastoreKmsKeyNameExample
❌ Error · Log - TestAccManagedKafkaConnector_managedkafkaConnectorBasicExample
❌ Error · Log - TestAccPubsubSubscription_pubsubSubscriptionTagsExample
❌ Error · Log - TestAccVertexAIMonitoredAgent_vertexAiMonitoredAgentBasicExample

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 recording VCR build log or the debug logs folder for detailed results.

@jiany18-qd, @slevenick VCR tests complete for 464bc26!

@jiany18-qd
jiany18-qd force-pushed the aad-monitored-agent branch from 464bc26 to 122ebf1 Compare July 18, 2026 00:03
@modular-magician modular-magician added the awaiting-approval Pull requests that need reviewer's approval to run presubmit tests label Jul 18, 2026
@jiany18-qd

Copy link
Copy Markdown
Author

/gcbrun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-approval Pull requests that need reviewer's approval to run presubmit tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants