Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dependsOn - Nics and Public IPs #17

Open
sergiopenteado opened this issue Jun 17, 2019 · 0 comments
Open

dependsOn - Nics and Public IPs #17

sergiopenteado opened this issue Jun 17, 2019 · 0 comments

Comments

@sergiopenteado
Copy link

Please update as follows:

    {
        "condition": "[equals(parameters('publicIPNewOrExisting'), 'new')]",
        "type": "Microsoft.Network/publicIPAddresses",
        "apiVersion": "2017-09-01",
        "tags": {
            "provider": "[toUpper(parameters('FortinetTags').provider)]"
        },
        "name": "[parameters('publicIPAddressName')]",
        "location": "[parameters('location')]",
        "dependsOn": [
            "[variables('network_NIC_fg11_Name')]"
        ],
        "sku": {
            "name": "Standard"
        },
        "properties": {
            "publicIPAllocationMethod": "[parameters('publicIPAddressType')]"
        }
    },
    {
        "condition": "[equals(parameters('publicIP2NewOrExisting'), 'new')]",
        "type": "Microsoft.Network/publicIPAddresses",
        "apiVersion": "2017-09-01",
        "tags": {
            "provider": "[toUpper(parameters('FortinetTags').provider)]"
        },
        "name": "[parameters('publicIPAddress2Name')]",
        "location": "[parameters('location')]",
        "dependsOn": [
            "[variables('network_NIC_fg14_Name')]"
        ],
        "sku": {
            "name": "Standard"
        },
        "properties": {
            "publicIPAllocationMethod": "[parameters('publicIPAddressType')]"
        }
    },
    {
        "condition": "[equals(parameters('publicIP3NewOrExisting'), 'new')]",
        "type": "Microsoft.Network/publicIPAddresses",
        "apiVersion": "2017-09-01",
        "tags": {
            "provider": "[toUpper(parameters('FortinetTags').provider)]"
        },
        "name": "[parameters('publicIPAddress3Name')]",
        "location": "[parameters('location')]",
        "dependsOn": [
            "[variables('network_NIC_fg24_Name')]"
        ],
        "sku": {
            "name": "Standard"
        },
        "properties": {
            "publicIPAllocationMethod": "[parameters('publicIPAddressType')]"
        }
    },

##############################################
{
"type": "Microsoft.Resources/deployments",
"name": "UpdateNIC11",
"apiVersion": "2015-01-01",
"dependsOn": [
"[variables('network_NIC_fg11_Name')]",
"[variables('publicIPID')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('updateIPURI')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"nicName": {
"value": "[variables('network_NIC_fg11_Name')]"
},
"SubnetRef": {
"value": "[variables('subnet1Ref')]"
},
"privateIp": {
"value": "[reference(concat('Microsoft.Network/networkInterfaces/', variables('network_NIC_fg11_Name'))).ipConfigurations[0].properties.privateIPAddress]"
},
"publicIp": {
"value": "[variables('publicIPID')]"
},
"FortinetTags": {
"value": "[parameters('FortinetTags')]"
},
"NSGName": {
"value": "[variables('NSGName')]"
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"name": "UpdateNIC14",
"apiVersion": "2015-01-01",
"dependsOn": [
"[variables('network_NIC_fg14_Name')]",
"[variables('publicIP2ID')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('updateIPURI')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"nicName": {
"value": "[variables('network_NIC_fg14_Name')]"
},
"SubnetRef": {
"value": "[variables('subnet4Ref')]"
},
"privateIp": {
"value": "[reference(concat('Microsoft.Network/networkInterfaces/', variables('network_NIC_fg14_Name'))).ipConfigurations[0].properties.privateIPAddress]"
},
"publicIp": {
"value": "[variables('publicIP2ID')]"
},
"FortinetTags": {
"value": "[parameters('FortinetTags')]"
},
"NSGName": {
"value": "[variables('NSGName')]"
}
}
}
},
{
"type": "Microsoft.Resources/deployments",
"name": "UpdateNIC24",
"apiVersion": "2015-01-01",
"dependsOn": [
"[variables('network_NIC_fg24_Name')]",
"[variables('publicIP3ID')]"
],
"properties": {
"mode": "Incremental",
"templateLink": {
"uri": "[variables('updateIPURI')]",
"contentVersion": "1.0.0.0"
},
"parameters": {
"nicName": {
"value": "[variables('network_NIC_fg24_Name')]"
},
"SubnetRef": {
"value": "[variables('subnet4Ref')]"
},
"privateIp": {
"value": "[reference(concat('Microsoft.Network/networkInterfaces/', variables('network_NIC_fg24_Name'))).ipConfigurations[0].properties.privateIPAddress]"
},
"publicIp": {
"value": "[variables('publicIP3ID')]"
},
"FortinetTags": {
"value": "[parameters('FortinetTags')]"
},
"NSGName": {
"value": "[variables('NSGName')]"
}
}
}
},

###################################################

After this update the resource group of the public IP's will be required, no matter if they are new or existing.

Thanks,
-SP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant