powerplatform_environments (Data Source)
Fetches the list of environments in a tenant. See Environments overview for more information.
Example Usage
terraform {
required_providers {
powerplatform = {
source = "microsoft/power-platform"
}
}
}
provider "powerplatform" {
use_cli = true
}
data "powerplatform_environments" "all_environments" {}
Schema
Optional
timeouts
(Attributes) (see below for nested schema)
Read-Only
environments
(Attributes List) List of environments (see below for nested schema)id
(Number) Id of the read operation
Nested Schema for timeouts
Optional:
read
(String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as "30s" or "2h45m". Valid time units are "s" (seconds), "m" (minutes), "h" (hours). Read operations occur during any refresh or planning operation when refresh is enabled.
Nested Schema for environments
Optional:
timeouts
(Attributes) (see below for nested schema)
Read-Only:
azure_region
(String) Azure region of the environment (westeurope, eastus etc.). Can be queried using thepowerplatform_locations
data source.billing_policy_id
(String) Billing policy id (guid) for pay-as-you-go environments using Azure subscription billingdataverse
(Attributes) Dataverse environment details (see below for nested schema)display_name
(String) Display nameenvironment_type
(String) Type of the environment (Sandbox, Production etc.)id
(String) Unique environment id (guid)location
(String) Location of the environment (europe, unitedstates etc.). Can be queried using thepowerplatform_locations
data source.
Nested Schema for environments.timeouts
Nested Schema for environments.dataverse
Read-Only:
currency_code
(String) Unique currency name (EUR, USE, GBP etc.)domain
(String) Domain name of the environmentlanguage_code
(Number) Unique language LCID (integer)linked_app_id
(String) Unique linked app id (guid)linked_app_type
(String) Type of the linked app (Internal, External etc.)linked_app_url
(String) URL of the linked D365 apporganization_id
(String) Unique organization id (guid)security_group_id
(String) Unique security group id (guid)template_metadata
(String) Additional D365 environment template metadata (if any)templates
(List of String) The selected instance provisioning template (if any)url
(String) Url of the environmentversion
(String) Version of the environment