Reputation: 131
Do we need multiple Azure API management instances? for DEV, UAT, PROD environment? If we do, then how do we source control the dev instance and release it to uat & prod programmatically. My findings on the net and own practice can be summarized as:-
Upvotes: 4
Views: 2315
Reputation: 16108
"do you need multiple instances"? Technically no, you can all do in one instance.
Would I advise you to seperate instances and have dedicated ones per env? Oh yes! (this btw, applies to basically to any component). To save on costs you can probably use Developer SKU for all but prod (depending on what you do on UAT, of course).
How to carry changes from dev to the other stages: This is a topic with many possible ways. What I have implemented in the past in the following:
Upvotes: 2
Reputation: 131
I've managed to solve this. Guide is below. Special thanks to silent for pointing to me to the right direction.
Glossary | Meaning |
---|---|
pt..5..apim01 | Development api management instance |
pt..4..apim01 | UAT api management instance |
https://pt..5..func01.azurewebsites.net/api | Development azure function endpoint |
https://pt..4..func01.azurewebsites.net/api | UAT azure function endpoint |
Note*: This az function backend was automatically created when linking the Azure Function and API Management within Azure Function API tab. This is not useful when we opt for custom front-end api endpoint.
Having this key here will prevent source control deployment. You will have error like these (will show deployment in later steps).
delete azure function key in named values
Named values is like global variables.
From this, pic 1
To this, pic 2
Directory: C:\..\repos\MY_APIM
pt..4..apim01.scm.azure-api.net
pt..5..apim01.scm.azure-api.net
Now copy the content of dev folder and paste/replace the contents in uat folder.
Git Push the changes to UAT apim master branch
Make sure same named values are created in UAT apim, with right values.
function-endpoint
variable we created)Upvotes: 2