I am trying to do the vnet peering for existing vnets in different subscriptions(hub and spoke model). I want to give the subscription id dynamically (not hardcoded). I know we can use the susbcription().id for same subscription but what is the function for different subscription
Azure ARM template vnet peering different subscriptions
1.2k Views Asked by Anonymouus At
1
There are 1 best solutions below
Related Questions in AZURE
- Why does Azure Auto-Scale scale go lower then minimum amount of instances?
- Data execution plan ended with error on DB restore
- Why does Azure CloudConfigurationManager.GetSetting return null
- Do I need other roles than Worker Role for a web site and service layer in Azure?
- Azure Web App PATH Variable Modification
- Azure Data Factory: LinkedService for AzureSql in failed state
- How To Update a Web Application In Azure and Keep The App Up the whole time
- Using Azure MobileServices library with my own LAN WebApi
- ionCube loader error on Azure IIS
- App crash (if closed) after click on notification
- How to get sql data bases instances in azure using java api
- I want to create file in azure share using python PUT requests but getting error signature not correct including headers
- Enabling OPTIONS method on Azure Cloud Service (to enable CORS)
- Redirecting subdomain to directory on Azure
- Kaltura account settings error
Related Questions in AZURE-RESOURCE-MANAGER
- Azure Resource manager .Net API fails to get Resource group
- How to see health of instances in a load balancer?
- How can I use Azure-provided DNS for Resource Manager VMs?
- Azure manage compute API is failing with InvalidAPIVersion error
- Output admin URL string from azuredeploy / ARM script
- Azure ARM Templates
- How to capture Azure VM Image with "Specialized" VM creation type using power shell? or How to create a Specialized image of a RM VM?
- How to Copy Azure SQL Database using ARM Template
- Creating Azure VM from custom image
- How can I make my Azure logic app portable
- What is the best practice for updating an already existing web app deployment using ARM?
- Azure Container Services: Who patches, updates,... (Kubernetes)
- Powershell script can't execute Register-ScheduledJob as a Azure Resource Manager CustomScriptExtension
- Azure DSC Extension: What is "Module-qualified Name of Configuration"
- Azure Logic Apps - ARM template to deploy filesystem API connection
Related Questions in AZURE-RM-TEMPLATE
- Unable to upload SSL certificate to Azure with a Service Principal account
- Azure Arm template deployment of a web app zip package programmatically using build artifact
- Do custom script extensions specified in ARM templates run each time the VM is restarted?
- Azure Resource Template: language expression is not supported
- Azure ARM template for an insights alert
- Azure ARM Template for Dropdownn type Parameter
- Arm Template conditional output parameters
- Deploy two Azure App Services to the same App Service Plan using idempotent ARM TEMPLATE
- Create Batch Account and Key Vault in single ARM script
- ARM template automation
- Azure. How to deploy VM from managed image with ARM Template
- Azure Batch Linked Service Not Found in ADF Pipeline
- Multiple conditions in arm templates
- Heat to ARM template conversion via tool present on git hum :: exceptions and error
- How can I configure the password and username of a ClearDb MySQL database in an ARM template
Related Questions in AZURE-SUBSCRIPTION
- How to List clusters by subscription ID using .NET?
- How to monitor for newly created Azure Subscriptions?
- Not able to connect to azure from postman application - 403 forbidden error
- Issue on Creating Azure subscription using terraform with Github Actions
- Azure subscription not showing up for a new user added to the active directory
- How to connect Azure Account with multiple subscriptions via Powershell
- Can't link subscription to Azure B2C
- My org wants to setup Azure Files and connect about 100 employees to it via SMB
- Change Default Azure Subscription for Visual Studio
- Can the classic Account Administrator on an Azure Subscription be changed, when the original Account Owner no longer exsists?
- The Microsoft.Eventhub Resource provider in my subscription has a perpetual status of registering
- Reader role assignment to registered application via powershell at subscription scope
- Unable to see Azure Subscriptions in the Azure DevOps Service Connection
- How can I have conditional parameter value in Azure Workbook?
- How to create new Azure Subscription using Python?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
As mentioned in comments , there is no function to get the subscription B id when you are deploying the template in subscription A . You have to manually provide the Subscription B id as mentioned in this
Microsoft Document.Example:
You can use the below template for vnet peering of VNETS in different subscriptions:
Output:
Note: If you are deploying the above code to Subscription A then you can replace
"[parameters('subscriptionAID')]"tosubscription().idand similarly if you are deploying it to Subscription B then you can replace"[parameters('subscriptionBID')]"tosubscription().id. Assubscription().idtakes the value of only the current subscription i.e. where the template is being deployed to .