terraform-provider-power-platform icon indicating copy to clipboard operation
terraform-provider-power-platform copied to clipboard

Enhancement: Allow Azure Region to be specified when creating an environment

Open mattdot opened this issue 1 year ago • 1 comments

Description

Allow Azure Region to be specified when creating an environment. This becomes important when trying to align to Fabric / Synapse region.

Resource

  • Resource Name: powerplatform_environment
  • API documentation: Similar to ability to specify Azure Region using powershell https://learn.microsoft.com/en-us/powershell/module/microsoft.powerapps.administration.powershell/new-adminpowerappenvironment?view=pa-ps-latest#-regionname
  • Estimated complexity/effort: easy
  • Related resources/data sources:
    • data source: powerplatform_locations

Potential Terraform Configuration

# Sample Terraform config that describes how the new resource might look.

resource "powerplatform_environment" "example" {
  name = "example"
  azure_region = "westus"
  location = "unitedstates"
...
}

Details

BAPI api supports an azureRegion property

{
  "location" : "unitedstates"
  "properties" : {
    "azureRegion" : "westus"
   }
}

mattdot avatar Apr 25 '24 02:04 mattdot

Update: the locations data source already returns the allowed azure regions. Don't need another data source

mattdot avatar Apr 29 '24 17:04 mattdot