bicep
bicep copied to clipboard
Azure Bicep support to target single module to deploy? || Is there an az/bicep equivalent to terraform apply -target=module.my_app.module.something
How to target particular azure bicep module using azure devops pipeline
param nsgname string = 'test-nsg'
param location string = resourceGroup().location
param VnetName string = 'test-vnet'
param VMsubnet string = 'test-subnet'
param vnetaddressPrefixes string = '10.0.0.0/16'
param subnetaddressPrefixes string = '10.0.1.0/24'
//
module nsg1 'modules/nsg.bicep' = {
name: 'test-nsg-dep1'
params: {
networkSecurityGroupName: nsgname
location:location
networkSecurityGroupSecurityRules: [
{
name: 'AllowPortERFInbound'
properties: {
description: 'AllowPortERFInbound'
protocol: '*'
access: 'Allow'
priority: 2000
direction: 'Inbound'
sourcePortRange: '*'
sourcePortRanges: []
sourceAddressPrefix:''
sourceAddressPrefixes:['10.12.13.14']
sourceApplicationSecurityGroups:[]
destinationPortRange: ''
destinationPortRanges: ['3389']
destinationAddressPrefix: 'VirtualNetwork'
destinationAddressPrefixes: []
destinationApplicationSecurityGroups: []
}
}
]
}
}
module vnet1 'vnet.bicep' = {
name: 'VnetName-dep1'
params: {
location: location
VMsubnet: VMsubnet
VnetName: VnetName
subnetnetaddressPrefixes:subnetaddressPrefixes
vnetaddressPrefixes: vnetaddressPrefixes
}
}
What specific scenario are you trying to accomplish with targeting a single module to deploy vs deploying the whole file itself?
Hi @Satishlucky, this issue has been marked as stale because it was labeled as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 3 days of this comment. Thanks for contributing to bicep! :smile: :mechanical_arm: