mixpanel_heat_maps (Data Source)¶
Lists all Mixpanel Heat Maps in a project. Use this data source to enumerate every heat map, for example to import them in bulk.
Example Usage¶
The ids attribute contains raw server IDs. The import_ids attribute contains composite <project_id>:<id> identifiers ready for bulk import. See the bulk import guide for usage patterns.
See also: mixpanel_heat_map data source, mixpanel_heat_map resource.
Bulk import with for_each¶
Adopt every heat map in the project in one pass: the list data source's import_ids
feed a for_each import block, and -generate-config-out
scaffolds each resource body for review before you apply.
data "mixpanel_heat_maps" "all" {}
# One import per heat map. Both for_each iterate import_ids, so the import block
# and the resource address share the same instance key.
import {
for_each = toset(data.mixpanel_heat_maps.all.import_ids)
to = mixpanel_heat_map.this[each.key]
id = each.value
}
resource "mixpanel_heat_map" "this" {
for_each = toset(data.mixpanel_heat_maps.all.import_ids)
# Body scaffolded by `terraform plan -generate-config-out=generated.tf`,
# then reviewed and edited before apply.
}
Run terraform plan -generate-config-out=generated.tf, review the generated
configuration, then terraform apply to import every heat map. Set project_id
on the data source to target a non-default project. See the
import guide for gotchas (write-only fields, normalization drift).
Schema¶
Optional¶
project_id(String) Project id. Falls back to the provider default project.
Read-Only¶
ids(List of String) Raw ids of every heat_map in the project.import_ids(List of String)<project_id>:<id>composite import ids for every heat_map.