From 89b1eaf5308929e01e92d7c74e7df9796548decf Mon Sep 17 00:00:00 2001 From: Fred Gohsman <102371320+fredgohsman@users.noreply.github.com> Date: Thu, 29 Dec 2022 09:19:38 -0500 Subject: [PATCH 1/3] move linked template to storage account --- AzureTemplates/azuredeploy.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/AzureTemplates/azuredeploy.json b/AzureTemplates/azuredeploy.json index b162e32..2bc9358 100644 --- a/AzureTemplates/azuredeploy.json +++ b/AzureTemplates/azuredeploy.json @@ -19,6 +19,13 @@ "planName": { "type": "string" }, + // "sasToken": { + // "type": "string", + // "defaultValue": "", + // "metadata": { + // "description": "A SAS token that allows access to the Storage Account storing the linked ARM template." + // } + // }, "webAppName": { "type": "string" } @@ -33,7 +40,9 @@ "properties": { "mode": "incremental", "templateLink": { - "uri": "https://raw.githubusercontent.com/msfred/AzureResourceManagerLinkedTemplates/main/AzureTemplates/arm-appserviceplan.json", + // "uri": "https://raw.githubusercontent.com/msfred/AzureResourceManagerLinkedTemplates/main/AzureTemplates/arm-appserviceplan.json", + // "uri": "[concat('https://saesripoc.blob.core.windows.net/azuretemplates/arm-appserviceplan.json', parameters('sasToken'))]", + "uri": "https://saesripoc.blob.core.windows.net/public/arm-appserviceplan.json", "contentVersion": "1.0.0.0" }, "parameters": { From af374671269938b1fca1fee37af3d5d120dc4912 Mon Sep 17 00:00:00 2001 From: Fred Gohsman <102371320+fredgohsman@users.noreply.github.com> Date: Thu, 29 Dec 2022 09:30:15 -0500 Subject: [PATCH 2/3] add sas token --- .github/workflows/continuous-delivery.yml | 2 +- AzureTemplates/azuredeploy.json | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/continuous-delivery.yml b/.github/workflows/continuous-delivery.yml index c7e0a6a..4776e64 100644 --- a/.github/workflows/continuous-delivery.yml +++ b/.github/workflows/continuous-delivery.yml @@ -42,4 +42,4 @@ jobs: subscriptionId: ${{ secrets.AZURE_SUBSCRIPTION_ID }} resourceGroupName: ${{ env.resourceGroup }} template: ./AzureTemplates/azuredeploy.json - parameters: ./AzureTemplates/parameters.json + parameters: ./AzureTemplates/parameters.json sasToken=${{ secrets.STORAGE_ACCOUNT_TOKEN }} diff --git a/AzureTemplates/azuredeploy.json b/AzureTemplates/azuredeploy.json index 2bc9358..fe27dcf 100644 --- a/AzureTemplates/azuredeploy.json +++ b/AzureTemplates/azuredeploy.json @@ -19,13 +19,13 @@ "planName": { "type": "string" }, - // "sasToken": { - // "type": "string", - // "defaultValue": "", - // "metadata": { - // "description": "A SAS token that allows access to the Storage Account storing the linked ARM template." - // } - // }, + "sasToken": { + "type": "string", + "defaultValue": "", + "metadata": { + "description": "A SAS token that allows access to the Storage Account storing the linked ARM template." + } + }, "webAppName": { "type": "string" } @@ -41,8 +41,8 @@ "mode": "incremental", "templateLink": { // "uri": "https://raw.githubusercontent.com/msfred/AzureResourceManagerLinkedTemplates/main/AzureTemplates/arm-appserviceplan.json", - // "uri": "[concat('https://saesripoc.blob.core.windows.net/azuretemplates/arm-appserviceplan.json', parameters('sasToken'))]", - "uri": "https://saesripoc.blob.core.windows.net/public/arm-appserviceplan.json", + "uri": "[concat('https://saesripoc.blob.core.windows.net/private/arm-appserviceplan.json', parameters('sasToken'))]", + //"uri": "https://saesripoc.blob.core.windows.net/public/arm-appserviceplan.json", "contentVersion": "1.0.0.0" }, "parameters": { From 73e7c416abddc014785bd0b184a1d9961c8309c1 Mon Sep 17 00:00:00 2001 From: Fred Gohsman <102371320+fredgohsman@users.noreply.github.com> Date: Thu, 29 Dec 2022 09:31:35 -0500 Subject: [PATCH 3/3] add sas token --- AzureTemplates/azuredeploy.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AzureTemplates/azuredeploy.json b/AzureTemplates/azuredeploy.json index fe27dcf..c93c528 100644 --- a/AzureTemplates/azuredeploy.json +++ b/AzureTemplates/azuredeploy.json @@ -41,7 +41,7 @@ "mode": "incremental", "templateLink": { // "uri": "https://raw.githubusercontent.com/msfred/AzureResourceManagerLinkedTemplates/main/AzureTemplates/arm-appserviceplan.json", - "uri": "[concat('https://saesripoc.blob.core.windows.net/private/arm-appserviceplan.json', parameters('sasToken'))]", + "uri": "[concat('https://saesripoc.blob.core.windows.net/private/arm-appserviceplan.json?', parameters('sasToken'))]", //"uri": "https://saesripoc.blob.core.windows.net/public/arm-appserviceplan.json", "contentVersion": "1.0.0.0" },