question

KoenG-1575 avatar image
0 Votes"
KoenG-1575 asked SaiKishor-MSFT commented

How to update sharedsecret of VPN Gatway connection via Bicep

Hi,

Not sure if this is the right location but I am trying to update the shared secret of an existing VPN gateway connection via Azure bicep.

Initially I tried to retrieve the updated secret from a keyvault however the secret was not updated. Therefore I tried to set the new shared secret via a hard-coded value also without success.

Below the bicep code. sharedKey is a parameter which is set with '123'.
I am running this bicep code via VS Code via the following az command:

az deployment create --name connectivity --template-file .\mainDeployment.bicep --location 'west europe' --parameters ..\deployment\parameters.prod.json

module vpnConnection 'Network/connections.bicep' = {
name: 'vpnConnectionS2SVpn'
params: {
name: s2sVPNname
location: location
sharedKey: sharedKey
localNetworkGatewayName: localNetworkGatewayName
virtualNetworkGatewayName: virtualNetworkGatewayName
}
dependsOn: [
localNetworkGateway
virtualNetworkGateway
]
}



azure-vpn-gateway
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @KoenG-1575
can you share the connections.bicep file

0 Votes 0 ·

@KoenG-1575 Any update? Please let us know if you still need further assistance. Thank you!

0 Votes 0 ·

0 Answers