Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using ops-agent-policy module does not set APT GPG key in OS policy created #108

Closed
alexjmoore opened this issue Jul 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@alexjmoore
Copy link

TL;DR

Using the ops-agent-policy to install Ops Agent on VMs does not appear to correctly set APT GPG Key, this means the apt update fails and so agent installation fails.

Expected behavior

Install the agent

Observed behavior

Policy fails enforcement step and agent does not install. Error seen by apt:

W: GPG error: https://packages.cloud.google.com/apt google-cloud-ops-agent-noble-all InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY C0BA5CE6DC6315A3

Terraform Configuration

module "install_ops_agent" {
  source          = "terraform-google-modules/cloud-operations/google//modules/ops-agent-policy"
  project         = google_project.this-project.project_id
  assignment_id   = "ops-agent-policy-all-in-${var.zone}"
  zone            = var.zone
  instance_filter = { all = true }
}

Terraform Version

Terraform v1.9.2
on linux_amd64
+ provider registry.terraform.io/hashicorp/google v5.37.0
+ provider registry.terraform.io/hashicorp/google-beta v5.37.0
+ provider registry.terraform.io/hashicorp/http v3.4.3
+ provider registry.terraform.io/hashicorp/random v3.6.2

Additional information

No response

@hsmatulisgoogle
Copy link
Contributor

Thanks for the bug request! I created PR #109 which should fix the fact that the gpg are not being set

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants