terraform-provider-sentry icon indicating copy to clipboard operation
terraform-provider-sentry copied to clipboard

Changed sentry_key DSNs

Open foggypete opened this issue 1 year ago • 0 comments

After we updated from version 0.11.2 to 0.12.2 we noticed a change to the DSNs of our sentry keys. The domain in the DSNs had changed from .ingest.sentry.io to .ingest.us.sentry.io. We are managing our own sentry keys and have set default_key = false on our projects as a result.

resource "sentry_project" "_" {
  for_each = local.sentry_projects

  organization  = sentry_organization._.slug
  teams         = [sentry_team._.slug]
  name          = each.value.sentry.name
  slug          = each.value.sentry.name
  platform      = "python"
  resolve_age   = 7 * 24
  default_key   = false
  default_rules = false
}

resource "sentry_key" "_" {
  for_each = sentry_project._

  organization = sentry_organization._.slug
  project      = each.value.slug
  name         = each.value.slug
}

We subsequently set a SENTRY_DSN env var on our ECS tasks using the created sentry keys,

data "sentry_key" "_" {
  organization = "xxx"
  project      = "xxx"
  name         = "xxx"
}

SENTRY_DSN = data.sentry_key._.dsn_public

The relevant plan output is:

~ {
    name  = "SENTRY_DSN"
    ~ value = "https://[email protected]/xxxxx" -> "https://[email protected]/xxxxx"
},

Is this intended behaviour or should the DSNs on our sentry keys not have changed? The keys were created prior to the upgrade to version 012.2 of the provider.

foggypete avatar Mar 20 '24 00:03 foggypete