I am trying to organize configuration values in stack settings file (Pulumi.dev.yaml
) from top to bottom sequentially i.e. first Resource Group, then Storage Account, then Virtual Network, AKS and so on as following:
secretsprovider: xxx
encryptedkey: xxx
config:
azure-native:location: japaneast
#
# Resource Group
#
ns:MainResourceGroupArgs:
ResourceGroupName: xxx
Tags:
TestTag: xxx
#
# Storage Account
#
ns:MainStorageAccountArgs:
AccountKind: StorageV2
AccountName: xxxsa
AccountSku: Standard_LRS
Tags:
TestTag: xxx
#
# Spoke VNet
#
ns:SpokeVirtualNetworkArgs:
AddressPrefixes:
- 10.10.0.0/18
Subnets:
# ... ... ...
#
# Hub VNet
#
# ... ... ...
#
# AKS
#
# ... ... ...
But every time a Pulumi command is executed (i.e. pulumi preview -s dev
or pulumi up -s dev
) followings are happening:
- configuration values are being shuffled, for example before executing command Resource Group was at top but after executing command Resource Group is at bottom. This is very annoying and bad when we have huge number of configurations
- yaml comments are being removed
How to solve this issue?
I want to keep yaml comments in stack settings file and prevent Pulumi cli from shuffling configuration values.
Info: Pulumi cli v3.17.1