diff --git a/.changelog/6811.txt b/.changelog/6811.txt new file mode 100644 index 00000000000..c2a50741193 --- /dev/null +++ b/.changelog/6811.txt @@ -0,0 +1,3 @@ +```release-note:enhancement +gkehub: added `mesh` field and `management` subfield to resource `feature_membership` +``` diff --git a/website/docs/r/gke_hub_feature_membership.html.markdown b/website/docs/r/gke_hub_feature_membership.html.markdown index 9dc6104ec70..55e3accf3bf 100644 --- a/website/docs/r/gke_hub_feature_membership.html.markdown +++ b/website/docs/r/gke_hub_feature_membership.html.markdown @@ -72,6 +72,44 @@ resource "google_gke_hub_feature" "feature" { } ``` +## Example Usage - Serivce Mesh + +```hcl +resource "google_container_cluster" "cluster" { + name = "my-cluster" + location = "us-central1-a" + initial_node_count = 1 + provider = google-beta +} + +resource "google_gke_hub_membership" "membership" { + membership_id = "my-membership" + endpoint { + gke_cluster { + resource_link = "//container.googleapis.com/${google_container_cluster.cluster.id}" + } + } + provider = google-beta +} + +resource "google_gke_hub_feature" "feature" { + name = "servicemesh" + location = "global" + + provider = google-beta +} + +resource "google_gke_hub_feature_membership" "feature_member" { + location = "global" + feature = google_gke_hub_feature.feature.name + membership = google_gke_hub_membership.membership.membership_id + mesh { + management = "MANAGEMENT_AUTOMATIC" + } + provider = google-beta +} +``` + ## Argument Reference The following arguments are supported: @@ -81,6 +119,10 @@ The following arguments are supported: * `configmanagement` - (Optional) Config Management-specific spec. Structure is [documented below](#nested_configmanagement). + +* `mesh` - + (Optional) + Service mesh specific spec. Structure is [documented below](#nested_mesh). * `feature` - (Optional) @@ -223,6 +265,11 @@ The following arguments are supported: (Optional) Specifies the backends Policy Controller should export metrics to. For example, to specify metrics should be exported to Cloud Monitoring and Prometheus, specify backends: [\"cloudmonitoring\", \"prometheus\"]. Default: [\"cloudmonitoring\", \"prometheus\"] +The `mesh` block supports: + +* `management` - + (Optional) + Whether to automatically manage Service Mesh. Can either be `MANAGEMENT_AUTOMATIC` or `MANAGEMENT_MANUAL`. ## Attributes Reference