microsoft / symphony

CI/CD for IaC on multiple orchestrators
MIT License
176 stars 20 forks source link

Provisioning symphony resources in Azure (for terraform and github) #268

Open amyhuan opened 4 months ago

amyhuan commented 4 months ago

I am using a personal Azure subscription with using a Visual Studio Enterprise subscription that gives me $150/mo credits.

After running the commands specified in the getting started guide

 az login
 az account set --subscription <TargetSubscriptionId>
 source setup.sh
 symphony provision

the repository and some of the azure resources are created successfully, but not all. Notably, the service principals are not created (both owner and reader). I can't find either in my Entra ID app registrations. One of the resource groups in my Azure subscription has a container registry, keyvault and 2 storage accounts, but the other is empty.

Here are some of the key logs I noticed in the output, including the errors that I saw.


Creating Storage Account: savjpcunqh111
Creating Events Storage Account Table: events for Storage Account:savjpcunqh111
Saving Events Storage Account (savjpcunqh111) to Key Vault secret 'eventsStorageAccount'.
Saving Storage Account Events Table(events) to Key Vault secret 'eventsTableName'.
Creating Storage Account Container: tfstate for Storage Account:savjpcunqh111
Push test mocked state files to state SA: tfstate for Storage Account:savjpcunqh111

[Errno 2] No such file or directory: './../../IAC/Terraform/test/terraform/mocked_deployment.tfstate'

Creating Backup Storage Account: sastatebkupvjpcunqh111
Creating Backup Storage Account Container: tfstate for Storage Account:sastatebkupvjpcunqh111
Saving State Storage Account (savjpcunqh111) to Key Vault secret 'stateStorageAccount'.
Saving State Backup Storage Account (sastatebkupvjpcunqh111) to Key Vault secret 'stateStorageAccountBackup'.
Saving Storage Account State Container(tfstate) to Key Vault secret 'stateContainer'.
Saving state Resource Group Name (rg-vjpcunqh-111) to Key Vault secret 'stateRg'.
Creating Owner Service Principal: sp-owner-vjpcunqh-111

Saving Owner Service Principal (sp-owner-vjpcunqh-111) to Key Vault secret 'clientId'.
incorrect usage: [Required] --value VALUE | --file PATH
Saving Owner Service Principal (sp-owner-vjpcunqh-111) to Key Vault secret 'clientSecret'.
incorrect usage: [Required] --value VALUE | --file PATH
Saving Owner Service Principal (sp-owner-vjpcunqh-111) to Key Vault secret 'subscriptionId'.

Saving Owner Service Principal (sp-owner-vjpcunqh-111) to Key Vault secret 'tenantId'.
incorrect usage: [Required] --value VALUE | --file PATH
Creating Reader Service Principal: sp-reader-vjpcunqh-111

Saving Reader Service Principal (sp-reader-vjpcunqh-111) to Key Vault secret 'readerClientId'.
incorrect usage: [Required] --value VALUE | --file PATH
Assign access policies for Reader Service Principal (sp-reader-vjpcunqh-111) to Key Vault kv-vjpcunqh-111
specify exactly one: --object-id, --spn, --upn
Saving Reader Service Principal (sp-reader-vjpcunqh-111) to Key Vault secret 'readerClientSecret'.
incorrect usage: [Required] --value VALUE | --file PATH
Saving Reader Service Principal (sp-reader-vjpcunqh-111) to Key Vault secret 'readerSubscriptionId'.

Saving Reader Service Principal (sp-reader-vjpcunqh-111) to Key Vault secret 'readerTenantId'.
incorrect usage: [Required] --value VALUE | --file PATH````