Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enabling GCP Monitoring Extensions2.0 via Terraform


I am using Terraform to enable all GCP extensions 2.0 in my tenant.

Considering the following blocks:


# Get available extension 2.0 items from hub
data "dynatrace_hub_items" "extension2_0" {
  type = "EXTENSION2"
# Add each google extension
resource "dynatrace_hub_extension_active_version" "google_extensions" {
  for_each = { for item in data.dynatrace_hub_items.extension2_0.items : item.item_id => item["artifact_id"] if startswith(item.item_id, "google-") }
  name = each.value
  version = "1.0.5"


The resource dynatrace_hub_extension_active_version requires a specific version.
Is there a way to get the latest version for each extension & pass it ton the resource block?

I'm also interested in whether all GCP extensions are released with a common release number? E.g. will all extensions release 1.0.6 at the same time (if indeed that version was to be released)?


DynaMight Guru
DynaMight Guru

Hi @benjamin_johnso I don't see a direct approach for this, but I've been thinking and my best idea is to use the RSS News feed to get the version by script and to use it in your terraform script.

Hope it helps.




The true delight is in the finding out rather than in the knowing.

Thanks - I just created a python script that pulls the extensions from the hub API & gets the latest version.

This builds a yaml list & then the terraform resource iterates over the list.

Featured Posts