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

URL is not correct when running terraform state show resource_type.resource_id #464

Open
bran1501 opened this issue Feb 20, 2024 · 0 comments
Labels

Comments

@bran1501
Copy link

bran1501 commented Feb 20, 2024

Hi Team,

I've been adding some resources to my environment and I've configured the provider info correctly, check this out

terraform {
  required_providers {
    signalfx = {
      source = "splunk-terraform/signalfx"
      version = "9.0.1"
    }
  }
}
provider "signalfx" {
  auth_token = var.access_token
  api_url    = "https://api.${var.realm}.signalfx.com"
}

variable "access_token" {
  description = "Splunk Access Token"
  default = "xxxxxx"
}

variable "realm" {
  description = "Splunk Realm"
  default     = "us1"
}

This is my resource

resource "signalfx_heatmap_chart" "tfchart_08" {
    name = "CB_TF_p99Latency"
    description = "99th percentile of latency by each service"
    program_text = <<-EOF
        A = data("dem_latency").percentile(99, by=['dem_service']).publish(label="latency")
    EOF
  color_scale {
    gte   = 100
    color = "red"
  }
  color_scale {
    lt   = 30
    color = "green"
  }
  color_scale {
    lt    = 100
    gte   = 30
    color = "yellow"
  }
}

When I run terraform state show signalfx_heatmap_chart.tfchart_08

bran1501@localhost terraform_labs % terraform state show signalfx_heatmap_chart.tfchart_08
\# signalfx_heatmap_chart.tfchart_08:
resource "signalfx_heatmap_chart" "tfchart_08" {
    description      = "99th percentile of latency by each service"
    disable_sampling = false
    group_by         = []
    hide_timestamp   = false
    id               = "GGypvwdA4AA"
    name             = "CB_TF_p99Latency"
    program_text     = <<-EOT
        A = data("dem_latency").percentile(99, by=['dem_service']).publish(label="latency")
    EOT
    timezone         = "UTC"
    unit_prefix      = "Metric"
    url              = "https://app.signalfx.com/#/chart/GGypvwdA4AA"
    color_scale {
        color = "green"
        gt    = 340282346638528860000000000000000000000
        gte   = 340282346638528860000000000000000000000
        lt    = 30
        lte   = 340282346638528860000000000000000000000
    }
    color_scale {
        color = "red"
        gt    = 340282346638528860000000000000000000000
        gte   = 100
        lt    = 340282346638528860000000000000000000000
        lte   = 340282346638528860000000000000000000000
    }
    color_scale {
        color = "yellow"
        gt    = 340282346638528860000000000000000000000
        gte   = 30
        lt    = 100
        lte   = 340282346638528860000000000000000000000
    }
}

As you can see, the value url is not correct, it's missing the realm.

Hope this helps :)

@atoulme atoulme added the bug label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants