Skip to content

Commit aac82e0

Browse files
modular-magicianMadhura Phadnis
and
Madhura Phadnis
authored
Configuration for traffic director Mesh resource. (#7509) (#14139)
Signed-off-by: Modular Magician <[email protected]> Co-authored-by: Madhura Phadnis <[email protected]>
1 parent d771c02 commit aac82e0

File tree

3 files changed

+147
-0
lines changed

3 files changed

+147
-0
lines changed

.changelog/7509.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:new-resource
2+
`google_networkservices_mesh`
3+
```
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package google
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
---
2+
# ----------------------------------------------------------------------------
3+
#
4+
# *** AUTO GENERATED CODE *** Type: MMv1 ***
5+
#
6+
# ----------------------------------------------------------------------------
7+
#
8+
# This file is automatically generated by Magic Modules and manual
9+
# changes will be clobbered when the file is regenerated.
10+
#
11+
# Please read more about how to change this file in
12+
# .github/CONTRIBUTING.md.
13+
#
14+
# ----------------------------------------------------------------------------
15+
subcategory: "Network services"
16+
description: |-
17+
Mesh represents a logical configuration grouping for workload to workload communication within a
18+
service mesh.
19+
---
20+
21+
# google\_network\_services\_mesh
22+
23+
Mesh represents a logical configuration grouping for workload to workload communication within a
24+
service mesh. Routes that point to mesh dictate how requests are routed within this logical
25+
mesh boundary.
26+
27+
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
28+
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.
29+
30+
To get more information about Mesh, see:
31+
32+
* [API documentation](https://cloud.google.com/traffic-director/docs/reference/network-services/rest/v1beta1/projects.locations.meshes)
33+
34+
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
35+
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.jpy.wang%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=network_services_mesh_basic&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
36+
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
37+
</a>
38+
</div>
39+
## Example Usage - Network Services Mesh Basic
40+
41+
42+
```hcl
43+
resource "google_network_services_mesh" "default" {
44+
provider = google-beta
45+
name = "my-mesh"
46+
labels = {
47+
foo = "bar"
48+
}
49+
description = "my description"
50+
interception_port = 443
51+
}
52+
```
53+
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
54+
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.jpy.wang%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=network_services_mesh_no_port&cloudshell_image=gcr.io%2Fgraphite-cloud-shell-images%2Fterraform%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
55+
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
56+
</a>
57+
</div>
58+
## Example Usage - Network Services Mesh No Port
59+
60+
61+
```hcl
62+
resource "google_network_services_mesh" "default" {
63+
provider = google-beta
64+
name = "my-mesh-noport"
65+
labels = {
66+
foo = "bar"
67+
}
68+
description = "my description"
69+
}
70+
```
71+
72+
## Argument Reference
73+
74+
The following arguments are supported:
75+
76+
77+
* `name` -
78+
(Required)
79+
Short name of the Mesh resource to be created.
80+
81+
82+
- - -
83+
84+
85+
* `labels` -
86+
(Optional)
87+
Set of label tags associated with the Mesh resource.
88+
89+
* `description` -
90+
(Optional)
91+
A free-text description of the resource. Max length 1024 characters.
92+
93+
* `interception_port` -
94+
(Optional)
95+
Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the
96+
specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to
97+
be redirected to this port regardless of its actual ip:port destination. If unset, a port
98+
'15001' is used as the interception port. This will is applicable only for sidecar proxy
99+
deployments.
100+
101+
* `project` - (Optional) The ID of the project in which the resource belongs.
102+
If it is not provided, the provider project is used.
103+
104+
105+
## Attributes Reference
106+
107+
In addition to the arguments listed above, the following computed attributes are exported:
108+
109+
* `id` - an identifier for the resource with format `projects/{{project}}/locations/global/meshes/{{name}}`
110+
111+
* `self_link` -
112+
Server-defined URL of this resource.
113+
114+
* `create_time` -
115+
Time the Mesh was created in UTC.
116+
117+
* `update_time` -
118+
Time the Mesh was updated in UTC.
119+
120+
121+
## Timeouts
122+
123+
This resource provides the following
124+
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
125+
126+
- `create` - Default is 30 minutes.
127+
- `update` - Default is 30 minutes.
128+
- `delete` - Default is 30 minutes.
129+
130+
## Import
131+
132+
133+
Mesh can be imported using any of these accepted formats:
134+
135+
```
136+
$ terraform import google_network_services_mesh.default projects/{{project}}/locations/global/meshes/{{name}}
137+
$ terraform import google_network_services_mesh.default {{project}}/{{name}}
138+
$ terraform import google_network_services_mesh.default {{name}}
139+
```
140+
141+
## User Project Overrides
142+
143+
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)