Skip to content

Add google_compute_zone_vm_extension_policy and google_compute_global_vm_extension_policy Resources #27928

Description

@XuechunHou

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to a user, that user is claiming responsibility for the issue.
  • Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.

Description

Please add support for managing Compute Engine VM Extension Policies natively via Terraform. This will allow users to deploy and configure VM extension policies (such as automatic Ops Agent deployment) declaratively instead of wrapping gcloud commands.
This corresponds to the following gcloud CLI command sets:

New or Affected Resource(s)

  • google_compute_zone_vm_extension_policy
  • google_compute_global_vm_extension_policy

Potential Terraform Configuration

resource "google_compute_zone_vm_extension_policy" "zonal_ops_agent" {
  name        = "zonal-ops-agent-policy"
  zone        = "us-central1-a"
  description = "Zonal VM extension policy for Ops Agent"

  extension_policies = {
    ops-agent = {
      pinned_version = "2.40.0"
      string_config  = "..." # Configuration details for the agent
    }
  }

  instance_selectors = [
    {
      label_selector = {
        inclusion_labels = {
          env = "prod"
        }
      }
    }
  ]
}

References

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions