blob: f6c89383140d743281b195279ba39d5bbc8ff185 [file] [log] [blame]
---
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** Type: MMv1 ***
#
# ----------------------------------------------------------------------------
#
# This file is automatically generated by Magic Modules and manual
# changes will be clobbered when the file is regenerated.
#
# Please read more about how to change this file in
# .github/CONTRIBUTING.md.
#
# ----------------------------------------------------------------------------
subcategory: "Network services"
description: |-
Mesh represents a logical configuration grouping for workload to workload communication within a
service mesh.
---
# google\_network\_services\_mesh
Mesh represents a logical configuration grouping for workload to workload communication within a
service mesh. Routes that point to mesh dictate how requests are routed within this logical
mesh boundary.
~> **Warning:** This resource is in beta, and should be used with the terraform-provider-google-beta provider.
See [Provider Versions](https://terraform.io/docs/providers/google/guides/provider_versions.html) for more details on beta resources.
To get more information about Mesh, see:
* [API documentation](https://cloud.google.com/traffic-director/docs/reference/network-services/rest/v1beta1/projects.locations.meshes)
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=network_services_mesh_basic&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Network Services Mesh Basic
```hcl
resource "google_network_services_mesh" "default" {
provider = google-beta
name = "my-mesh"
labels = {
foo = "bar"
}
description = "my description"
interception_port = 443
}
```
<div class = "oics-button" style="float: right; margin: 0 0 -15px">
<a href="https://console.cloud.google.com/cloudshell/open?cloudshell_git_repo=https%3A%2F%2Fgithub.com%2Fterraform-google-modules%2Fdocs-examples.git&cloudshell_working_dir=network_services_mesh_no_port&cloudshell_image=gcr.io%2Fcloudshell-images%2Fcloudshell%3Alatest&open_in_editor=main.tf&cloudshell_print=.%2Fmotd&cloudshell_tutorial=.%2Ftutorial.md" target="_blank">
<img alt="Open in Cloud Shell" src="//gstatic.com/cloudssh/images/open-btn.svg" style="max-height: 44px; margin: 32px auto; max-width: 100%;">
</a>
</div>
## Example Usage - Network Services Mesh No Port
```hcl
resource "google_network_services_mesh" "default" {
provider = google-beta
name = "my-mesh-noport"
labels = {
foo = "bar"
}
description = "my description"
}
```
## Argument Reference
The following arguments are supported:
* `name` -
(Required)
Short name of the Mesh resource to be created.
- - -
* `labels` -
(Optional)
Set of label tags associated with the Mesh resource.
**Note**: This field is non-authoritative, and will only manage the labels present in your configuration.
Please refer to the field `effective_labels` for all of the labels present on the resource.
* `description` -
(Optional)
A free-text description of the resource. Max length 1024 characters.
* `interception_port` -
(Optional)
Optional. If set to a valid TCP port (1-65535), instructs the SIDECAR proxy to listen on the
specified port of localhost (127.0.0.1) address. The SIDECAR proxy will expect all traffic to
be redirected to this port regardless of its actual ip:port destination. If unset, a port
'15001' is used as the interception port. This will is applicable only for sidecar proxy
deployments.
* `project` - (Optional) The ID of the project in which the resource belongs.
If it is not provided, the provider project is used.
## Attributes Reference
In addition to the arguments listed above, the following computed attributes are exported:
* `id` - an identifier for the resource with format `projects/{{project}}/locations/global/meshes/{{name}}`
* `self_link` -
Server-defined URL of this resource.
* `create_time` -
Time the Mesh was created in UTC.
* `update_time` -
Time the Mesh was updated in UTC.
* `terraform_labels` -
The combination of labels configured directly on the resource
and default labels configured on the provider.
* `effective_labels` -
All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Terraform, other clients and services.
## Timeouts
This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:
- `create` - Default is 30 minutes.
- `update` - Default is 30 minutes.
- `delete` - Default is 30 minutes.
## Import
Mesh can be imported using any of these accepted formats:
* `projects/{{project}}/locations/global/meshes/{{name}}`
* `{{project}}/{{name}}`
* `{{name}}`
In Terraform v1.5.0 and later, use an [`import` block](https://developer.hashicorp.com/terraform/language/import) to import Mesh using one of the formats above. For example:
```tf
import {
id = "projects/{{project}}/locations/global/meshes/{{name}}"
to = google_network_services_mesh.default
}
```
When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), Mesh can be imported using one of the formats above. For example:
```
$ terraform import google_network_services_mesh.default projects/{{project}}/locations/global/meshes/{{name}}
$ terraform import google_network_services_mesh.default {{project}}/{{name}}
$ terraform import google_network_services_mesh.default {{name}}
```
## User Project Overrides
This resource supports [User Project Overrides](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference#user_project_override).