From 605f607dc02850bc93bf9583ac9918e03f77a138 Mon Sep 17 00:00:00 2001 From: Francisco Valente <1435136+franciscovalentecastro@users.noreply.github.com> Date: Wed, 30 Oct 2024 19:12:31 +0000 Subject: [PATCH] docs: Add example for ops-agent-policy module README. --- modules/ops-agent-policy/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/modules/ops-agent-policy/README.md b/modules/ops-agent-policy/README.md index d98ab88..3903da1 100644 --- a/modules/ops-agent-policy/README.md +++ b/modules/ops-agent-policy/README.md @@ -4,6 +4,34 @@ This module is used to install/uninstall the ops agent in GCE. ## Usage +Basic usage of this module is as follows: + +Sample module to install [Ops Agent](https://cloud.google.com/stackdriver/docs/solutions/ops-agent) on all Debian 12 VMs with the label "goog-ops-agent-policy=enabled". +```hcl +module "ops_agent_policy" { + source = "github.com/terraform-google-modules/terraform-google-cloud-operations/modules/ops-agent-policy" + project = "" + zone = "" + assignment_id = "example-ops-agent-policy" + agents_rule = { + package_state = "installed" + version = "latest" + } + instance_filter = { + all = false + inventories = [{ + os_short_name = "debian" + os_version = "12" + }] + inclusion_labels = [{ + labels = { + goog-ops-agent-policy = "enabled" + } + }] + } +} +``` + Functional examples are included in the [examples](./../../examples) directory.