azure - ARM template - depending on resources from the outside of resource group -


here's have on azure:

resource group: 'microservice-1' app service: 'app-service-1' database: 'database-1'  resource group: 'microservice-2' app service: 'app-service-2' database: 'database-2'  resource group: 'shared-infrastructure' database: 'shared-database-1' 

both microservices use shared-database-1. every microservice contain arm template script create/update resource group used when microservice deployed. in arm scripts can define dependencies (dependson) resources updated proper order work within resource group.

here's scenario want run:
there's nothing in azure , want release microservice-1. there mechanism in azure / arm can use, shared-infrastructure release (arm template) run prior microservice-1?

no, unless include in arm template. dependon check if resource there, won't magically create you.

but include in template , if exists, won't anything, unless specify deploymentmode = complete.

so create 3 templates,: microservice-1, microservice-2 , shared-infrastructure. in templates microservices include deployment create shared infrastructure , won't if in place

edited based on comments:

you can link resources in same subscription after deployment. there's no way arm, powershell + arm that, search existing instances of shared resource , if not there - create arm template , after invoke arm template deploy actual service.


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -