https://pulumi.com logo
#azure
Title
# azure
c

cuddly-napkin-89521

06/01/2023, 6:54 AM
Hello Team, I am asking for some ideas how to resolve some task We are using Azure subscription for every env, DEV, QA, PROD... our DNS zone is configured for example in QA, and every A record for respected env is there PROD A www.domain.com 10.0.0.1 QA A www-qa.domain.com 10.10.0.1 DEV A www-dev.domain.com 10.50.0.1 As I want to configure CICD pipeline which will change A record for prod from real ip address of our prod k8s to static website/storage account address for cases when we upgrading our prod cluster. I don't know how to handle in pulumi resources for eg, if I start my pipeline in PROD env, but I want to change in resources in DEV env, like I said our DNS zone configuration is in DEV subscription, as per team member I need to create a new pulumi provider for this, but I am not able to find any examples or some ideas. Thank you in advance :)
d

damp-honey-93158

06/02/2023, 10:11 PM
may I ask why your production config has anything to do with a dev environment at all? perhaps you might think about splitting the shared resources into a stack that both dev and production then reference.
given that pulumi stacks are responsible for their underlying resources, this would be a good fit for you. (we do this in our apps too). then in the “shared” stack, you can have some kind of ‘state flag’ that indicates what you want pulumi to do to any of these resources .
c

cuddly-napkin-89521

06/03/2023, 6:52 AM
Hello @damp-honey-93158, thank you for reply. Our DNS zone is configured in Dev subscription, as it is not possble to have same dns zones in different subscriptions, at least I think is not possible, and by my company rules, zone is configured manually, just added in Azure portal, and we are creating subdomains via Pulumi
d

damp-honey-93158

06/03/2023, 9:35 AM
You can cross subscriptions - but I don’t believe you can go across tenants. And yep - they are going to need to be unique. You can use pulumi to reference resources across tenants, but in this case you will need to instantiate your own Azure provider, that uses appropriate AZURE/ARM_CLIENT_ID, AZURE/ARM_TENANT_ID, AZURE/ARM_SUBSCRIPTION_ID (and so on)
c

cuddly-napkin-89521

06/03/2023, 9:39 AM
@damp-honey-93158 thank you, I will try to find some information regarding this solution.