Skip to content

Commit a131f37

Browse files
Cherrypick AGW (GA) (#26139)
Signed-off-by: Modular Magician <magic-modules@google.com> Co-authored-by: Modular Magician <magic-modules@google.com>
1 parent 55c6c34 commit a131f37

File tree

2 files changed

+286
-0
lines changed

2 files changed

+286
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: MPL-2.0
3+
// ----------------------------------------------------------------------------
4+
//
5+
// *** AUTO GENERATED CODE *** Type: Handwritten ***
6+
//
7+
// ----------------------------------------------------------------------------
8+
//
9+
// This code is generated by Magic Modules using the following:
10+
//
11+
// Source file: https://github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/third_party/terraform/services/networkservices/resource_network_services_agent_gateway_test.go.tmpl
12+
//
13+
// DO NOT EDIT this file directly. Any changes made to this file will be
14+
// overwritten during the next generation cycle.
15+
//
16+
// ----------------------------------------------------------------------------
17+
package networkservices_test
Lines changed: 269 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
---
2+
# ----------------------------------------------------------------------------
3+
#
4+
# *** AUTO GENERATED CODE *** Type: MMv1 ***
5+
#
6+
# ----------------------------------------------------------------------------
7+
#
8+
# This code is generated by Magic Modules using the following:
9+
#
10+
# Configuration: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/products/networkservices/AgentGateway.yaml
11+
# Template: https:#github.com/GoogleCloudPlatform/magic-modules/tree/main/mmv1/templates/terraform/resource.html.markdown.tmpl
12+
#
13+
# DO NOT EDIT this file directly. Any changes made to this file will be
14+
# overwritten during the next generation cycle.
15+
#
16+
# ----------------------------------------------------------------------------
17+
subcategory: "Network Services"
18+
description: |-
19+
AgentGateway represents the agent gateway resource.
20+
---
21+
22+
# google_network_services_agent_gateway
23+
24+
AgentGateway represents the agent gateway resource.
25+
26+
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
27+
See [Provider Versions](../guides/provider_versions.html.markdown) for more details on beta resources.
28+
29+
To get more information about AgentGateway, see:
30+
31+
* [API documentation](https://cloud.google.com/network-services/docs/reference/network-services/rest/v1beta1/projects.locations.agentGateways)
32+
33+
## Example Usage - Network Services Agent Gateway Full
34+
35+
36+
```hcl
37+
resource "google_network_services_agent_gateway" "default" {
38+
name = "my-full-agent-gateway"
39+
location = "us-central1"
40+
description = "A full configuration for Agent Gateway"
41+
labels = {
42+
env = "test"
43+
tier = "gold"
44+
}
45+
46+
protocols = ["MCP"]
47+
google_managed {
48+
governed_access_path = "AGENT_TO_ANYWHERE"
49+
}
50+
51+
registries = [
52+
"//agentregistry.googleapis.com/projects/my-project-name/locations/us-central1"
53+
]
54+
55+
network_config {
56+
egress {
57+
network_attachment = "projects/my-project-name/regions/us-central1/networkAttachments/my-network-attachment"
58+
}
59+
}
60+
}
61+
```
62+
## Example Usage - Network Services Agent Gateway Client To Agent
63+
64+
65+
```hcl
66+
resource "google_network_services_agent_gateway" "default" {
67+
name = "my-client-to-agent-gateway"
68+
location = "us-central1"
69+
70+
protocols = ["MCP"]
71+
72+
google_managed {
73+
governed_access_path = "CLIENT_TO_AGENT"
74+
}
75+
76+
registries = [
77+
"//agentregistry.googleapis.com/projects/my-project-name/locations/us-central1"
78+
]
79+
}
80+
```
81+
## Example Usage - Network Services Agent Gateway Self Managed
82+
83+
84+
```hcl
85+
resource "google_network_services_agent_gateway" "default" {
86+
name = "my-self-managed-agent-gateway"
87+
location = "us-central1"
88+
89+
protocols = ["MCP"]
90+
91+
self_managed {
92+
resource_uri = "projects/my-project-name/locations/us-central1/gateways/my-gateway"
93+
}
94+
95+
registries = [
96+
"//agentregistry.googleapis.com/projects/my-project-name/locations/us-central1"
97+
]
98+
}
99+
```
100+
101+
## Argument Reference
102+
103+
The following arguments are supported:
104+
105+
106+
* `protocols` -
107+
(Required)
108+
List of protocols supported by an Agent Gateway.
109+
Each value may be one of: `MCP`.
110+
111+
* `name` -
112+
(Required)
113+
Name of the AgentGateway resource.
114+
115+
* `location` -
116+
(Required)
117+
The location of the agent gateway.
118+
119+
120+
* `labels` -
121+
(Optional)
122+
Set of label tags associated with the AgentGateway resource.
123+
124+
**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
125+
Please refer to the field `effective_labels` for all of the labels present on the resource.
126+
127+
* `description` -
128+
(Optional)
129+
A free-text description of the resource. Max length 1024 characters.
130+
131+
* `google_managed` -
132+
(Optional)
133+
Configuration for Google Managed deployment mode.
134+
Proxy is orchestrated and managed by GoogleCloud in a tenant project.
135+
Structure is [documented below](#nested_google_managed).
136+
137+
* `self_managed` -
138+
(Optional)
139+
Configuration for Self Managed deployment mode.
140+
Attach to existing Application Load Balancers or Secure Web Proxies.
141+
Structure is [documented below](#nested_self_managed).
142+
143+
* `registries` -
144+
(Optional)
145+
A list of Agent registries containing the agents, MCP servers and tools governed by the Agent Gateway.
146+
Note: Currently limited to project-scoped registries Must be of format
147+
`//agentregistry.googleapis.com/{version}/projects/{{project}}/locations/{{location}}`
148+
149+
* `network_config` -
150+
(Optional)
151+
Network configuration for the AgentGateway.
152+
Structure is [documented below](#nested_network_config).
153+
154+
* `project` - (Optional) The ID of the project in which the resource belongs.
155+
If it is not provided, the provider project is used.
156+
157+
158+
159+
<a name="nested_google_managed"></a>The `google_managed` block supports:
160+
161+
* `governed_access_path` -
162+
(Required)
163+
Operating Mode of Agent Gateway.
164+
Possible values are: `AGENT_TO_ANYWHERE`, `CLIENT_TO_AGENT`.
165+
166+
<a name="nested_self_managed"></a>The `self_managed` block supports:
167+
168+
* `resource_uri` -
169+
(Required)
170+
A supported Google Cloud networking proxy in the Project and Location.
171+
172+
<a name="nested_network_config"></a>The `network_config` block supports:
173+
174+
* `egress` -
175+
(Required)
176+
Optional PSC-Interface network attachment for connectivity to your
177+
private VPCs network.
178+
Structure is [documented below](#nested_network_config_egress).
179+
180+
181+
<a name="nested_network_config_egress"></a>The `egress` block supports:
182+
183+
* `network_attachment` -
184+
(Required)
185+
The URI of the Network Attachment resource.
186+
187+
## Attributes Reference
188+
189+
In addition to the arguments listed above, the following computed attributes are exported:
190+
191+
* `id` - an identifier for the resource with format `projects/{{project}}/locations/{{location}}/agentGateways/{{name}}`
192+
193+
* `create_time` -
194+
The timestamp when the resource was created.
195+
196+
* `update_time` -
197+
The timestamp when the resource was updated.
198+
199+
* `etag` -
200+
Etag of the resource.
201+
If this is provided, it must match the server's etag. If the provided etag
202+
does not match the server's etag, the request will fail with a 409 ABORTED
203+
error.
204+
205+
* `agent_gateway_card` -
206+
AgentGatewayOutputCard contains informational output-only fields.
207+
Structure is [documented below](#nested_agent_gateway_card).
208+
209+
* `terraform_labels` -
210+
The combination of labels configured directly on the resource
211+
and default labels configured on the provider.
212+
213+
* `effective_labels` -
214+
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
215+
216+
217+
<a name="nested_agent_gateway_card"></a>The `agent_gateway_card` block contains:
218+
219+
* `mtls_endpoint` -
220+
(Output)
221+
mTLS Endpoint associated with this AgentGateway.
222+
223+
* `root_certificates` -
224+
(Output)
225+
Root Certificates for Agents to validate this AgentGateway.
226+
227+
* `service_extensions_service_account` -
228+
(Output)
229+
Service Account used by Service Extensions to operate.
230+
231+
## Timeouts
232+
233+
This resource provides the following
234+
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
235+
236+
- `create` - Default is 30 minutes.
237+
- `update` - Default is 30 minutes.
238+
- `delete` - Default is 30 minutes.
239+
240+
## Import
241+
242+
243+
AgentGateway can be imported using any of these accepted formats:
244+
245+
* `projects/{{project}}/locations/{{location}}/agentGateways/{{name}}`
246+
* `{{project}}/{{location}}/{{name}}`
247+
* `{{location}}/{{name}}`
248+
249+
250+
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import AgentGateway using one of the formats above. For example:
251+
252+
```tf
253+
import {
254+
id = "projects/{{project}}/locations/{{location}}/agentGateways/{{name}}"
255+
to = google_network_services_agent_gateway.default
256+
}
257+
```
258+
259+
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), AgentGateway can be imported using one of the formats above. For example:
260+
261+
```
262+
$ terraform import google_network_services_agent_gateway.default projects/{{project}}/locations/{{location}}/agentGateways/{{name}}
263+
$ terraform import google_network_services_agent_gateway.default {{project}}/{{location}}/{{name}}
264+
$ terraform import google_network_services_agent_gateway.default {{location}}/{{name}}
265+
```
266+
267+
## User Project Overrides
268+
269+
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).

0 commit comments

Comments
 (0)