Skip to content

DTOSS-12586: Set up dev and preprod environments infrastructure and fix deployment pipeline - #77

Merged
josielsouzanordcloud merged 1 commit into
mainfrom
DTOSS-12586-preprod-environment-setup
Apr 10, 2026
Merged

DTOSS-12586: Set up dev and preprod environments infrastructure and fix deployment pipeline#77
josielsouzanordcloud merged 1 commit into
mainfrom
DTOSS-12586-preprod-environment-setup

Conversation

@josielsouzanordcloud

Copy link
Copy Markdown
Contributor

Summary

Deploys Arc infrastructure to dev and preprod environments for the first time, including Arc-enabled server RBAC, relay hybrid connections, Log Analytics workspace, Data Collection Rule, and Azure Monitor policy assignments with self-healing remediation. The gateway test VM is enabled for dev only.

This PR also fixes several issues discovered during the preprod setup:

  • Move Arc-enabled servers RG to Bicep (core.bicep) so it exists before Terraform runs, fixing for_each unknown value errors on new environment deployments
  • Fix tenant-specific GUIDs for resourcePolicyContributor role and Azure Monitor policy definitions (ama_install, dcr_association)
  • Fix role assignment GUID collisions in main.bicep by using the managed identity name instead of envConfig as the GUID seed
  • Add Monitoring Contributor role to the policy remediation identity, fixing DCR association failures (Microsoft.Insights/dataCollectionRuleAssociations/write)
  • Rename ADO service connection pattern from manbgw- to mbsgw- to match naming convention
  • Remove prod from app deployment targets (dev and preprod only for now)
  • Add docs/deployment/infrastructure/create-environment.md — step-by-step guide for bootstrapping new environments

Jira link

DTOSS-12586

Review notes

Review checklist

  • Check database queries are correctly scoped to current_provider

@josielsouzanordcloud
josielsouzanordcloud force-pushed the DTOSS-12586-preprod-environment-setup branch 2 times, most recently from db3a289 to e73daa1 Compare April 10, 2026 09:48

@saliceti saliceti left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

  - Extend infra pipeline deployment matrix to cover dev and preprod;
    remove prod from app deploy (not yet ready)
  - Rename ADO service connection references from manbgw-* to mbsgw-*
  - Move Arc-enabled servers RG from Terraform-managed resource to a
    data source — RG is now pre-created by Bicep to break the
    chicken-and-egg on first apply
  - Add Arc-enabled servers RG creation to core.bicep with new
    appShortName/envConfig/region params
  - Fix role assignment GUIDs in main.bicep to be unique per managed
    identity (prevents ARM conflict on re-deploy)
  - Fix resourcePolicyContributor role ID in core.bicep
  - Switch AMA install and DCR association policies to correct
    Windows Arc-specific built-in definition IDs
  - Add Monitoring Contributor role to Arc monitor policy identity
  - Add policy remediation resources for self-healing AMA/DCR setup
  - Default vnet_address_space to 10.131.0.0/16 (isolated, never peered)
  - Enable gateway test VM in dev environment (variables.tfvars)
  - Add create-environment runbook
  - Add hospital VM Arc onboarding runbook
  - Remove 16-Deploy-Script-Analysis.md (moved to analyses repo)
@josielsouzanordcloud
josielsouzanordcloud force-pushed the DTOSS-12586-preprod-environment-setup branch from e73daa1 to 2a5fee1 Compare April 10, 2026 11:20
@josielsouzanordcloud
josielsouzanordcloud merged commit 008ac6e into main Apr 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants