microsoft / power-platform-terraform-quickstarts

Examples for using the Power Platform Terraform Provider
https://github.com/microsoft/terraform-provider-power-platform
MIT License
12 stars 0 forks source link

QuickStart: Power Pipelines #27

Open leighatami opened 10 months ago

leighatami commented 10 months ago

As a Terraform user, I want to be able to write a single terraform module that can configure Power Pipelines to manage Power Platform resources the same using tooling/processes that I use to manage Azure resources.


resource "powerplatform_environment" "pipelines_env" {

}

resource "powerplatform_application_package" "pipelines_app" {
  environment_id = pipelines_env.id
  package_name= "Power Pipelines"
}

resource "powerplatform_environment" "dev_env" {
  managed = true
}
resource "powerplatform_environment" "uat_env" {
  managed = true
}
resource "powerplatform_environment" "production_env" {
  managed = true
}

optional datasources for environment application packages

### Tasks
- [x] Create Demo Tenant
- [x] Create 3 Managed Environments
- [ ] Install the pipelines app using microsoft/terraform-provider-power-platform#103
- [x] Create Pipeline
  - [ ] Add security role to user(s)
- [ ] Documentation
- [ ] Examples: terraform files must create Power Platform resources
- [ ] Advanced pipelines and stages
  - [ ] Previous deployment stage required
  - [ ] Pre-deployment step required
- [ ] Test with a sample solution to deploy through pipelines
coatsy commented 9 months ago

Created Tenant CRM597124.onmicrosoft.com See @coatsy for creds

coatsy commented 9 months ago

Managed Environments Docs: https://learn.microsoft.com/en-us/power-platform/admin/managed-environment-overview Includes PowerShell for enable Managed Environment https://learn.microsoft.com/en-us/power-platform/admin/managed-environment-enable#copy-managed-environment-settings-using-powershell Can also

coatsy commented 9 months ago

Added 3 environments and enabled Managed Environments:

Environments Name Environment URL EnvironmentID OrgID
Hack-Dev https://org4bfeba3b.crm.dynamics.com/ 56007ae9-5a41-ebf0-bfaa-f4ad8caace00 872ee4f7-b850-ee11-94d0-6045bd003909
Hack-Prod https://org451f2a10.crm.dynamics.com/ df8881d4-a5a8-ef39-a878-83e52ac48a05 7de989a9-b750-ee11-94d2-002248282d26
Hack-Pipelines https://orga5935abc.crm.dynamics.com/ 9def7db0-52d0-ed5a-a7c7-8f2d294c391b 34c43275-ba50-ee11-94d0-0022481e2807
coatsy commented 9 months ago

Docs to setup pipelines in PP Environments: https://learn.microsoft.com/en-us/power-platform/alm/set-up-pipelines

coatsy commented 9 months ago
coatsy commented 9 months ago
coatsy commented 9 months ago

Tried to create a deployment of Hack-Solution from Hack-Dev to Hack-Prod - image image image

coatsy commented 9 months ago

Created an empty solution in the Hack-Dev environment - Hack-Solution-Simple Successfully created a deployment from Hack-Dev to Hack-Prod image

eduardodfmex commented 7 months ago

Power Pipelines need managed environment microsoft/terraform-provider-power-platform#104 and the environment application microsoft/terraform-provider-power-platform#101 , currently we are working on both resources.

With that we can create the TF script.

mattdot commented 1 month ago

Currently blocked on needing https://github.com/microsoft/terraform-provider-power-platform/issues/278 and https://github.com/microsoft/terraform-provider-power-platform/issues/45