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 answers
Related Questions in AZURE
- How to update to the latest external Git in Azure Web App?
- I need an azure product that executes my intensive ffmpeg command then dies, and i only get charged for the delta. Any Tips?
- Inject AsyncCollector into a service
- mutual tls authentication between app service and function app
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Application settings for production deployment slot in Azure App Services
- Encountered an error (ServiceUnavailable) from host runtime on Azure Function App
- Implementing Incremental consent when using both application and delegated permissions
- Invalid format for email address in WordPress on Azure app service
- Producer Batching Service Bus Vs Kafka
- Integrating Angular External IP with ClusterIP of .NET microservices on AKS
- Difficulty creating a data pipeline with Fabric Datafactory using REST
- Azure Batch for Excel VBA
- How to authenticate only Local and Guest users in Azure AD B2C and add custom claims in token?
- Azure Scale Sets and Parallel Jobs
Related Questions in AZURE-RESOURCE-MANAGER
- Error: The template deployment 'template' is not valid according to the validation procedure
- Enabling minimum apiVersion to 2021-08-01 in Azure API Management causing saving issues or deployment errors for existing logic apps
- Failed to create ISE, as i want to use this enable netorking in Logic app
- Get Input Asset or Output Asset from JobId or SmoothStreamingUrl - Azure Media Services
- Why is "Export Template" button not clickable
- Azure bicep set role assignment on storage account in a different subscription/resource group
- Issue with bicep template for subnet
- PowerShell Output Property Formatting
- Access output values from azure devops bicep deployment
- Powershell 7: Issue with Where-Object and tags
- Microsoft.Insights/scheduledQueryRules can't update Scope
- Get list of assigned users in an Azure Virtual Desktop host pool using Powershell
- Azure machine learning templates in ARM templates
- Fetching owner details in Azure resources created an year ago
- resourceId function find resource in different resource group
Related Questions in AZURE-RM-TEMPLATE
- Parameterise ADF Activity timeout in ARM template parameters definiton file?
- self service approach for creating AzureCosmos DB collection and indexes using AzureBicepse or ARM template
- Cloning resources group into another
- How do I specify in an ARM template that my storage account should have `Public network access` set to `Disabled`?
- Add list of configs in app_settings configuration block
- Can't configure a value for "network_interface": its value will be decided │ automatically based on the result of applying this configuration
- How to deploy a "Logic App Standard" with multiple workflows via arm template
- Unable to create vnet peering on azure using terraform and csv data
- Azure DevOps Pipeline Failure : Validate and Generate ARM template error message
- How to return only one pipeline using template-parameters-definition.json synapse
- How to manage VMs created through azure test drive
- dacpac SQL database deploy task devops not updating tables
- Network Watcher ARM Template Fails to Deploy
- Validate and generate ARM template with "npm run build validate" throws validation error in CI/CD pipeline
- Is it possible to iterate effects in azure policy
Related Questions in AZURE-SUBSCRIPTION
- Where to run Terraform in a new Cloud tenancy
- Questions around Entra External ID and deploying resources
- Manage Azure Subscriptions (Customer tenant)
- How to List clusters by subscription ID using .NET?
- How to update Azure subscription tags with Terraform?
- VS Code is not listing all my Azure Subscriptions
- Azure programmatically deploy subscription to specified MG
- How can I have conditional parameter value in Azure Workbook?
- Unable to see Azure Subscriptions in the Azure DevOps Service Connection
- Reader role assignment to registered application via powershell at subscription scope
- The Microsoft.Eventhub Resource provider in my subscription has a perpetual status of registering
- Couldn't create subscription. Your account has reached its subscription limit. To create more subscriptions, contact Azure support
- What happens when my Azure subscription is assigned to a different AAD?
- Azure Container Registry - SubscriptionNotFound error when pushing Docker image
- In Azure, I cannot see subscription to which I am assigned the Owner role, but I can choose the subscription when creating a VM
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?
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)
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 .