I want to update rewriteRuleSets for existing app gate way. How to update an existing resource via bicep
I’m a beginer in this field so If possible, please give me an example
resource appGateWay 'Microsoft.Network/applicationGateways@2024-01-01' existing = {
name: 'existing-agw'
scope: resourceGroup('preac_RG')
}
resource updatedAppGateWay 'Microsoft.Network/applicationGateways@2024-01-01' = {
name: 'existing-agw'
location: 'West Europe'
properties: {
rewriteRuleSets: [
{
// id: ''
name: 'cors-test'
properties: {
rewriteRules: [
{
actionSet: {
requestHeaderConfigurations: [
{
headerName: 'Access-Control-Request-Headers'
headerValue: '*'
}
]
responseHeaderConfigurations: [
{
headerName: 'Access-Control-Allow-Origin'
headerValue: '*'
}
]
}
conditions: [{
}]
name: 'test'
ruleSequence: 5
}
]
}
}
]
}
}
I want to add new rewriterule