From 1813c254ec13a074f3d032b08ce9ed69606c3d77 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Fri, 10 Jan 2025 15:04:45 +0100 Subject: [PATCH 1/6] Delete .github/workflows/azure-static-web-apps-yellow-meadow-0b9b21603.yml --- ...tatic-web-apps-yellow-meadow-0b9b21603.yml | 45 ------------------- 1 file changed, 45 deletions(-) delete mode 100644 .github/workflows/azure-static-web-apps-yellow-meadow-0b9b21603.yml diff --git a/.github/workflows/azure-static-web-apps-yellow-meadow-0b9b21603.yml b/.github/workflows/azure-static-web-apps-yellow-meadow-0b9b21603.yml deleted file mode 100644 index bfcf63688e20..000000000000 --- a/.github/workflows/azure-static-web-apps-yellow-meadow-0b9b21603.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Azure Static Web Apps CI/CD - -on: - push: - branches: - - interface-rewrite - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - interface-rewrite - -jobs: - build_and_deploy_job: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') - runs-on: ubuntu-latest - name: Build and Deploy Job - steps: - - uses: actions/checkout@v3 - with: - submodules: true - lfs: false - - name: Build And Deploy - id: builddeploy - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_YELLOW_MEADOW_0B9B21603 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) - action: "upload" - app_location: "/" # App source code path - api_location: "" # Api source code path - optional - output_location: "out" # Built app content directory - optional - env: # Add environment variables here - IS_STATIC_EXPORT: true - - close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - steps: - - name: Close Pull Request - id: closepullrequest - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_YELLOW_MEADOW_0B9B21603 }} - action: "close" From 9bc082bd3b6adb944f9fe0f4aa5c8b47cb6a023e Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:53:39 +0100 Subject: [PATCH 2/6] Add files via upload --- deployment/AzureDeploymentTemplate.json | 247 +++++++++++++ ...AzureDeploymentTemplate_regionoptions.json | 247 +++++++++++++ deployment/DevAzureDeploymentTemplate.json | 334 ++++++++++++++++++ ...AzureDeploymentTemplate_regionoptions.json | 334 ++++++++++++++++++ 4 files changed, 1162 insertions(+) create mode 100644 deployment/AzureDeploymentTemplate.json create mode 100644 deployment/AzureDeploymentTemplate_regionoptions.json create mode 100644 deployment/DevAzureDeploymentTemplate.json create mode 100644 deployment/DevAzureDeploymentTemplate_regionoptions.json diff --git a/deployment/AzureDeploymentTemplate.json b/deployment/AzureDeploymentTemplate.json new file mode 100644 index 000000000000..aa445e3fd6c8 --- /dev/null +++ b/deployment/AzureDeploymentTemplate.json @@ -0,0 +1,247 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "defaultValue": "CIPP", + "type": "string", + "metadata": { + "description": "Name use as base-template to named the resources deployed in Azure." + } + }, + "GithubRepository": { + "defaultValue": "https://github.com/KelvinTegelaar/CIPP", + "type": "string", + "metadata": { + "description": "URL to your Github Frontend fork." + } + }, + "GithubToken": { + "defaultValue": "GeneratedPassword", + "type": "string", + "metadata": { + "description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token" + } + } + }, + "variables": { + "suffix": "[substring(toLower(uniqueString(resourceGroup().id, resourceGroup().location)),0,5)]", + "funcAppName": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "funcStorageName": "[tolower(concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),16)), 'stg', variables('suffix')))]", + "serverFarmName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), '-srv-', variables('suffix'))]", + "uniqueResourceNameBase": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "swaName": "[toLower(concat(parameters('baseName'), '-swa-', variables('suffix')))]" + }, + "resources": [ + { + "type": "Microsoft.KeyVault/vaults", + "name": "[variables('uniqueResourceNameBase')]", + "apiVersion": "2016-10-01", + "location": "[resourceGroup().location]", + "properties": { + "sku": { + "family": "A", + "name": "standard" + }, + "tenantId": "[subscription().tenantid]", + "accessPolicies": [ + { + "tenantId": "[subscription().tenantid]", + "objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]", + "permissions": { + "keys": [], + "secrets": [ "all" ], + "certificates": [] + } + } + ], + "enabledForDeployment": true, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": true + }, + "resources": [ + { + "type": "secrets", + "name": "applicationid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "LongApplicationId" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "applicationsecret", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "AppSecret" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "refreshtoken", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "RefreshToken" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "tenantid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "tenantId" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + } + ], + "dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" ] + }, + { + "apiVersion": "2015-08-01", + "type": "Microsoft.Web/sites", + "identity": { + "type": "SystemAssigned" + }, + "name": "[variables('funcAppName')]", + "location": "[resourceGroup().location]", + "kind": "functionapp", + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms',variables('serverFarmName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('funcStorageName'))]" + ], + "properties": { + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]", + "siteConfig": { + "Use32BitWorkerProcess": false, + "powerShellVersion": "7.4", + "appSettings": [ + { + "name": "AzureWebJobsStorage", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTSHARE", + "value": "[variables('funcAppName')]" + }, + { + "name": "FUNCTIONS_EXTENSION_VERSION", + "value": "~4" + }, + { + "name": "WEBSITE_RUN_FROM_PACKAGE", + "value": "1" + }, + { + "name": "FUNCTIONS_WORKER_RUNTIME", + "value": "powershell" + } + ] + } + } + }, + { + "name": "[concat(variables('funcAppName'), '/ZipDeploy')]", + "type": "Microsoft.Web/sites/extensions", + "apiVersion": "2021-02-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" + ], + "properties": { + "packageUri": "https://cippreleases.blob.core.windows.net/cipp-api/latest.zip" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-07-01", + "name": "[variables('funcStorageName')]", + "location": "[resourceGroup().location]", + "tags": { + "displayName": "funcStorageName" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage" + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2018-02-01", + "name": "[variables('serverFarmName')]", + "location": "[resourceGroup().location]", + "sku": { + "name": "Y1", + "tier": "Dynamic", + "size": "Y1", + "family": "Y", + "capacity": 0 + }, + "properties": { + "perSiteScaling": false, + "maximumElasticWorkerCount": 1, + "isSpot": false, + "reserved": false, + "isXenon": false, + "hyperV": false, + "targetWorkerCount": 0, + "targetWorkerSizeId": 0, + "name": "[variables('serverFarmName')]", + "computeMode": "Dynamic" + } + }, + { + "type": "Microsoft.Web/staticSites", + "apiVersion": "2021-01-15", + "name": "[variables('swaName')]", + "location": "[resourceGroup().location]", + "properties": { + "repositoryUrl": "[parameters('GithubRepository')]", + "branch": "main", + "repositoryToken": "[parameters('GithubToken')]", + "buildProperties": { + "appLocation": "/", + "apiLocation": "", + "appArtifactLocation": "" + } + }, + "sku": { + "name": "Standard", + "tier": "Standard" + } + }, + { + "type": "Microsoft.Web/staticSites/userProvidedFunctionApps", + "apiVersion": "2020-12-01", + "name": "[concat(variables('swaName'), '/', variables('swaName'))]", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Web/staticSites', variables('swaName'))]", + "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]" + ], + "properties": { + "functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]", + "functionAppRegion": "[resourceGroup().location]" + } + } + ], + "outputs": {} +} diff --git a/deployment/AzureDeploymentTemplate_regionoptions.json b/deployment/AzureDeploymentTemplate_regionoptions.json new file mode 100644 index 000000000000..1abff7bcc162 --- /dev/null +++ b/deployment/AzureDeploymentTemplate_regionoptions.json @@ -0,0 +1,247 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "defaultValue": "CIPP", + "type": "string", + "metadata": { + "description": "Name used as base-template to name the resources deployed in Azure." + } + }, + "GithubRepository": { + "defaultValue": "https://github.com/KelvinTegelaar/CIPP", + "type": "string", + "metadata": { + "description": "URL to your Github Frontend fork." + } + }, + "GithubToken": { + "defaultValue": "GeneratedPassword", + "type": "string", + "metadata": { + "description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token)" + } + } + }, + "variables": { + "suffix": "[substring(toLower(uniqueString(resourceGroup().id, resourceGroup().location)),0,5)]", + "funcAppName": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "funcStorageName": "[tolower(concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),16)), 'stg', variables('suffix')))]", + "serverFarmName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), '-srv-', variables('suffix'))]", + "uniqueResourceNameBase": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "swaName": "[toLower(concat(parameters('baseName'), '-swa-', variables('suffix')))]" + }, + "resources": [ + { + "type": "Microsoft.KeyVault/vaults", + "name": "[variables('uniqueResourceNameBase')]", + "apiVersion": "2016-10-01", + "location": "[resourceGroup().location]", + "properties": { + "sku": { + "family": "A", + "name": "standard" + }, + "tenantId": "[subscription().tenantid]", + "accessPolicies": [ + { + "tenantId": "[subscription().tenantid]", + "objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]", + "permissions": { + "keys": [], + "secrets": [ "all" ], + "certificates": [] + } + } + ], + "enabledForDeployment": true, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": true + }, + "resources": [ + { + "type": "secrets", + "name": "applicationid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "LongApplicationId" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "applicationsecret", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "AppSecret" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "refreshtoken", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "RefreshToken" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "tenantid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "tenantId" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + } + ], + "dependsOn": [ "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" ] + }, + { + "apiVersion": "2015-08-01", + "type": "Microsoft.Web/sites", + "identity": { + "type": "SystemAssigned" + }, + "name": "[variables('funcAppName')]", + "location": "[resourceGroup().location]", + "kind": "functionapp", + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms',variables('serverFarmName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('funcStorageName'))]" + ], + "properties": { + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]", + "siteConfig": { + "Use32BitWorkerProcess": false, + "powerShellVersion": "7.4", + "appSettings": [ + { + "name": "AzureWebJobsStorage", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTSHARE", + "value": "[variables('funcAppName')]" + }, + { + "name": "FUNCTIONS_EXTENSION_VERSION", + "value": "~4" + }, + { + "name": "WEBSITE_RUN_FROM_PACKAGE", + "value": "1" + }, + { + "name": "FUNCTIONS_WORKER_RUNTIME", + "value": "powershell" + } + ] + } + } + }, + { + "name": "[concat(variables('funcAppName'), '/ZipDeploy')]", + "type": "Microsoft.Web/sites/extensions", + "apiVersion": "2021-02-01", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Web/sites', variables('funcAppName'))]" + ], + "properties": { + "packageUri": "https://cippreleases.blob.core.windows.net/cipp-api/latest.zip" + } + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-07-01", + "name": "[variables('funcStorageName')]", + "location": "[resourceGroup().location]", + "tags": { + "displayName": "funcStorageName" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage" + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2018-02-01", + "name": "[variables('serverFarmName')]", + "location": "[resourceGroup().location]", + "sku": { + "name": "Y1", + "tier": "Dynamic", + "size": "Y1", + "family": "Y", + "capacity": 0 + }, + "properties": { + "perSiteScaling": false, + "maximumElasticWorkerCount": 1, + "isSpot": false, + "reserved": false, + "isXenon": false, + "hyperV": false, + "targetWorkerCount": 0, + "targetWorkerSizeId": 0, + "name": "[variables('serverFarmName')]", + "computeMode": "Dynamic" + } + }, + { + "type": "Microsoft.Web/staticSites", + "apiVersion": "2021-01-15", + "name": "[variables('swaName')]", + "location": "centralus", + "properties": { + "repositoryUrl": "[parameters('GithubRepository')]", + "branch": "main", + "repositoryToken": "[parameters('GithubToken')]", + "buildProperties": { + "appLocation": "/", + "apiLocation": "", + "appArtifactLocation": "" + } + }, + "sku": { + "name": "Standard", + "tier": "Standard" + } + }, + { + "type": "Microsoft.Web/staticSites/userProvidedFunctionApps", + "apiVersion": "2020-12-01", + "name": "[concat(variables('swaName'), '/', variables('swaName'))]", + "location": "centralus", + "dependsOn": [ + "[resourceId('Microsoft.Web/staticSites', variables('swaName'))]", + "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]" + ], + "properties": { + "functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]", + "functionAppRegion": "[resourceGroup().location]" + } + } + ], + "outputs": {} +} diff --git a/deployment/DevAzureDeploymentTemplate.json b/deployment/DevAzureDeploymentTemplate.json new file mode 100644 index 000000000000..5e6077beab41 --- /dev/null +++ b/deployment/DevAzureDeploymentTemplate.json @@ -0,0 +1,334 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "defaultValue": "CIPPDev", + "type": "string", + "metadata": { + "description": "Name used as base-template to name the resources deployed in Azure." + } + }, + "TenantID": { + "defaultValue": "YourTenant.onmicrosoft.com", + "type": "string", + "metadata": { + "description": "Your tenant ID" + } + }, + "ApplicationID": { + "defaultValue": "LongApplicationID", + "type": "string", + "metadata": { + "description": "The Application ID for your Secure Application Model" + } + }, + "ApplicationSecret": { + "defaultValue": "LongApplicationSecret", + "type": "string", + "metadata": { + "description": "The Application Secret for your Secure Application Model." + } + }, + "Refreshtoken": { + "defaultValue": "LongRefreshtoken", + "type": "string", + "metadata": { + "description": "The Refresh token for your Secure Application Model." + } + }, + "GithubRepository": { + "defaultValue": "https://github.com/KelvinTegelaar/CIPP", + "type": "string", + "metadata": { + "description": "URL to your Github Frontend fork." + } + }, + "GithubToken": { + "defaultValue": "GeneratedPassword", + "type": "string", + "metadata": { + "description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token)" + } + }, + "GithubAPIRepository": { + "defaultValue": "https://github.com/KelvinTegelaar/CIPP-API", + "type": "string", + "metadata": { + "description": "URL to your Github backend fork." + } + } + }, + "variables": { + "suffix": "[substring(toLower(uniqueString(resourceGroup().id, resourceGroup().location)),0,5)]", + "funcAppName": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "funcStorageName": "[tolower(concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),16)), 'stg', variables('suffix')))]", + "serverFarmName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), '-srv-', variables('suffix'))]", + "uniqueResourceNameBase": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "swaName": "[toLower(concat(parameters('baseName'), '-swa-', variables('suffix')))]" + }, + "resources": [ + { + "type": "Microsoft.KeyVault/vaults", + "name": "[variables('uniqueResourceNameBase')]", + "apiVersion": "2016-10-01", + "location": "[resourceGroup().location]", + "properties": { + "sku": { + "family": "A", + "name": "standard" + }, + "tenantId": "[subscription().tenantid]", + "accessPolicies": [ + { + "tenantId": "[subscription().tenantid]", + "objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]", + "permissions": { + "keys": [], + "secrets": ["all"], + "certificates": [] + } + } + ], + "enabledForDeployment": true, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": true + }, + "resources": [ + { + "type": "secrets", + "name": "applicationid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('ApplicationID')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "applicationsecret", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('Applicationsecret')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "refreshtoken", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('refreshtoken')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "tenantid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('tenantid')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + } + ], + "dependsOn": ["[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"] + }, + { + "apiVersion": "2015-08-01", + "type": "Microsoft.Web/sites", + "identity": { + "type": "SystemAssigned" + }, + "name": "[variables('funcAppName')]", + "location": "[resourceGroup().location]", + "kind": "functionapp", + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms',variables('serverFarmName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('funcStorageName'))]" + ], + "properties": { + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]", + "siteConfig": { + "Use32BitWorkerProcess": false, + "powerShellVersion": "7.2", + "appSettings": [ + { + "name": "AzureWebJobsStorage", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTSHARE", + "value": "[variables('funcAppName')]" + }, + { + "name": "FUNCTIONS_EXTENSION_VERSION", + "value": "~4" + }, + { + "name": "ApplicationID", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationId)')]" + }, + { + "name": "ApplicationSecret", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationSecret)')]" + }, + { + "name": "RefreshToken", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/RefreshToken)')]" + }, + { + "name": "TenantID", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/tenantid)')]" + }, + { + "name": "FUNCTIONS_WORKER_RUNTIME", + "value": "powershell" + }, + { + "name": "WEBSITE_RUN_FROM_PACKAGE", + "value": "1" + } + ] + } + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "web", + "type": "sourcecontrols", + "dependsOn": ["[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"], + "properties": { + "RepoUrl": "[parameters('GithubAPIRepository')]", + "repositoryToken": "[parameters('GithubToken')]", + "branch": "master", + "publishRunbook": true, + "gitHubActionConfiguration": { + "codeConfiguration": null, + "containerConfiguration": null, + "isLinux": false, + "generateWorkflowFile": true, + "workflowSettings": { + "appType": "functionapp", + "publishType": "code", + "os": "windows", + "variables": { + "runtimeVersion": "7.2", + "sitename": "[variables('funcAppName')]", + "slotname": "Production", + "publishingprofilesecretname": "[variables('funcAppName')]", + "branch": "master" + }, + "runtimeStack": "powershell", + "workflowApiVersion": "2020-12-01", + "useCanaryFusionServer": false + } + } + } + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-07-01", + "name": "[variables('funcStorageName')]", + "location": "[resourceGroup().location]", + "tags": { + "displayName": "funcStorageName" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage" + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2018-02-01", + "name": "[variables('serverFarmName')]", + "location": "[resourceGroup().location]", + "sku": { + "name": "Y1", + "tier": "Dynamic", + "size": "Y1", + "family": "Y", + "capacity": 0 + }, + "properties": { + "perSiteScaling": false, + "maximumElasticWorkerCount": 1, + "isSpot": false, + "reserved": false, + "isXenon": false, + "hyperV": false, + "targetWorkerCount": 0, + "targetWorkerSizeId": 0, + "name": "[variables('serverFarmName')]", + "computeMode": "Dynamic" + } + }, + { + "type": "Microsoft.Web/staticSites", + "apiVersion": "2021-01-15", + "name": "[variables('swaName')]", + "location": "[resourceGroup().location]", + "properties": { + "repositoryUrl": "[parameters('GithubRepository')]", + "branch": "dev", + "repositoryToken": "[parameters('GithubToken')]", + "buildProperties": { + "appLocation": "/", + "apiLocation": "", + "appArtifactLocation": "" + } + }, + "sku": { + "name": "Standard", + "tier": "Standard" + } + }, + { + "type": "Microsoft.Web/staticSites/userProvidedFunctionApps", + "apiVersion": "2020-12-01", + "name": "[concat(variables('swaName'), '/', variables('swaName'))]", + "location": "[resourceGroup().location]", + "dependsOn": [ + "[resourceId('Microsoft.Web/staticSites', variables('swaName'))]", + "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]" + ], + "properties": { + "functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]", + "functionAppRegion": "[resourceGroup().location]" + } + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2018-09-01-preview", + "name": "[guid(variables('funcAppName'))]", + "dependsOn": [ + "[resourceId('Microsoft.Web/staticSites', variables('swaName'))]", + "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]" + ], + "properties": { + "roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", + "principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]" + } + } + ], + "outputs": {} +} diff --git a/deployment/DevAzureDeploymentTemplate_regionoptions.json b/deployment/DevAzureDeploymentTemplate_regionoptions.json new file mode 100644 index 000000000000..f41e669076e5 --- /dev/null +++ b/deployment/DevAzureDeploymentTemplate_regionoptions.json @@ -0,0 +1,334 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "baseName": { + "defaultValue": "CIPP", + "type": "string", + "metadata": { + "description": "Name used as base-template to name the resources deployed in Azure." + } + }, + "TenantID": { + "defaultValue": "YourTenant.onmicrosoft.com", + "type": "string", + "metadata": { + "description": "Your tenant ID" + } + }, + "ApplicationID": { + "defaultValue": "LongApplicationID", + "type": "string", + "metadata": { + "description": "The Application ID for your Secure Application Model" + } + }, + "ApplicationSecret": { + "defaultValue": "LongApplicationSecret", + "type": "string", + "metadata": { + "description": "The Application Secret for your Secure Application Model." + } + }, + "Refreshtoken": { + "defaultValue": "LongRefreshtoken", + "type": "string", + "metadata": { + "description": "The Refresh token for your Secure Application Model." + } + }, + "GithubRepository": { + "defaultValue": "https://github.com/KelvinTegelaar/CIPP", + "type": "string", + "metadata": { + "description": "URL to your Github Frontend fork." + } + }, + "GithubToken": { + "defaultValue": "GeneratedPassword", + "type": "string", + "metadata": { + "description": "Your Github Repository token (see https://docs.microsoft.com/en-us/azure/static-web-apps/publish-azure-resource-manager?tabs=azure-cli#create-a-github-personal-access-token)" + } + }, + "GithubAPIRepository": { + "defaultValue": "https://github.com/KelvinTegelaar/CIPP-API", + "type": "string", + "metadata": { + "description": "URL to your Github backend fork." + } + } + }, + "variables": { + "suffix": "[substring(toLower(uniqueString(resourceGroup().id, resourceGroup().location)),0,5)]", + "funcAppName": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "funcStorageName": "[tolower(concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),16)), 'stg', variables('suffix')))]", + "serverFarmName": "[concat(substring(parameters('baseName'), 0, min(length(parameters('baseName')),14)), '-srv-', variables('suffix'))]", + "uniqueResourceNameBase": "[toLower(concat(parameters('baseName'), variables('suffix')))]", + "swaName": "[toLower(concat(parameters('baseName'), '-swa-', variables('suffix')))]" + }, + "resources": [ + { + "type": "Microsoft.KeyVault/vaults", + "name": "[variables('uniqueResourceNameBase')]", + "apiVersion": "2016-10-01", + "location": "[resourceGroup().location]", + "properties": { + "sku": { + "family": "A", + "name": "standard" + }, + "tenantId": "[subscription().tenantid]", + "accessPolicies": [ + { + "tenantId": "[subscription().tenantid]", + "objectId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]", + "permissions": { + "keys": [], + "secrets": ["all"], + "certificates": [] + } + } + ], + "enabledForDeployment": true, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": true + }, + "resources": [ + { + "type": "secrets", + "name": "applicationid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('ApplicationID')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "applicationsecret", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('Applicationsecret')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "refreshtoken", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('refreshtoken')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + }, + { + "type": "secrets", + "name": "tenantid", + "apiVersion": "2015-06-01", + "properties": { + "contentType": "text/plain", + "value": "[parameters('tenantid')]" + }, + "dependsOn": [ + "[resourceId('Microsoft.KeyVault/vaults', variables('uniqueResourceNameBase'))]" + ] + } + ], + "dependsOn": ["[resourceId('Microsoft.Web/sites', variables('funcAppName'))]"] + }, + { + "apiVersion": "2015-08-01", + "type": "Microsoft.Web/sites", + "identity": { + "type": "SystemAssigned" + }, + "name": "[variables('funcAppName')]", + "location": "[resourceGroup().location]", + "kind": "functionapp", + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms',variables('serverFarmName'))]", + "[resourceId('Microsoft.Storage/storageAccounts', variables('funcStorageName'))]" + ], + "properties": { + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('serverFarmName'))]", + "siteConfig": { + "Use32BitWorkerProcess": false, + "powerShellVersion": "7.2", + "appSettings": [ + { + "name": "AzureWebJobsStorage", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTAZUREFILECONNECTIONSTRING", + "value": "[concat('DefaultEndpointsProtocol=https;AccountName=', variables('funcStorageName'), ';AccountKey=', listKeys(variables('funcStorageName'),'2015-05-01-preview').key1)]" + }, + { + "name": "WEBSITE_CONTENTSHARE", + "value": "[variables('funcAppName')]" + }, + { + "name": "FUNCTIONS_EXTENSION_VERSION", + "value": "~4" + }, + { + "name": "ApplicationID", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationId)')]" + }, + { + "name": "ApplicationSecret", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/ApplicationSecret)')]" + }, + { + "name": "RefreshToken", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/RefreshToken)')]" + }, + { + "name": "TenantID", + "value": "[concat('@Microsoft.KeyVault(SecretUri=https://',variables('uniqueResourceNameBase'), '.vault.azure.net/secrets/tenantid)')]" + }, + { + "name": "FUNCTIONS_WORKER_RUNTIME", + "value": "powershell" + }, + { + "name": "WEBSITE_RUN_FROM_PACKAGE", + "value": "1" + } + ] + } + }, + "resources": [ + { + "apiVersion": "2015-08-01", + "name": "web", + "type": "sourcecontrols", + "dependsOn": ["[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]"], + "properties": { + "RepoUrl": "[parameters('GithubAPIRepository')]", + "repositoryToken": "[parameters('GithubToken')]", + "branch": "master", + "publishRunbook": true, + "gitHubActionConfiguration": { + "codeConfiguration": null, + "containerConfiguration": null, + "isLinux": false, + "generateWorkflowFile": true, + "workflowSettings": { + "appType": "functionapp", + "publishType": "code", + "os": "windows", + "variables": { + "runtimeVersion": "7.2", + "sitename": "[variables('funcAppName')]", + "slotname": "Production", + "publishingprofilesecretname": "[variables('funcAppName')]", + "branch": "master" + }, + "runtimeStack": "powershell", + "workflowApiVersion": "2020-12-01", + "useCanaryFusionServer": false + } + } + } + } + ] + }, + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2018-07-01", + "name": "[variables('funcStorageName')]", + "location": "[resourceGroup().location]", + "tags": { + "displayName": "funStorageName" + }, + "sku": { + "name": "Standard_LRS" + }, + "kind": "Storage" + }, + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2018-02-01", + "name": "[variables('serverFarmName')]", + "location": "[resourceGroup().location]", + "sku": { + "name": "Y1", + "tier": "Dynamic", + "size": "Y1", + "family": "Y", + "capacity": 0 + }, + "properties": { + "perSiteScaling": false, + "maximumElasticWorkerCount": 1, + "isSpot": false, + "reserved": false, + "isXenon": false, + "hyperV": false, + "targetWorkerCount": 0, + "targetWorkerSizeId": 0, + "name": "[variables('serverFarmName')]", + "computeMode": "Dynamic" + } + }, + { + "type": "Microsoft.Web/staticSites", + "apiVersion": "2021-01-15", + "name": "[variables('swaName')]", + "location": "centralus", + "properties": { + "repositoryUrl": "[parameters('GithubRepository')]", + "branch": "dev", + "repositoryToken": "[parameters('GithubToken')]", + "buildProperties": { + "appLocation": "/", + "apiLocation": "", + "appArtifactLocation": "" + } + }, + "sku": { + "name": "Standard", + "tier": "Standard" + } + }, + { + "type": "Microsoft.Web/staticSites/userProvidedFunctionApps", + "apiVersion": "2020-12-01", + "name": "[concat(variables('swaName'), '/', variables('swaName'))]", + "location": "centralus", + "dependsOn": [ + "[resourceId('Microsoft.Web/staticSites', variables('swaName'))]", + "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]" + ], + "properties": { + "functionAppResourceId": "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]", + "functionAppRegion": "[resourceGroup().location]" + } + }, + { + "type": "Microsoft.Authorization/roleAssignments", + "apiVersion": "2018-09-01-preview", + "name": "[guid(variables('funcAppName'))]", + "dependsOn": [ + "[resourceId('Microsoft.Web/staticSites', variables('swaName'))]", + "[resourceId('Microsoft.Web/sites/', variables('funcAppName'))]" + ], + "properties": { + "roleDefinitionId": "[concat('/subscriptions/', subscription().subscriptionId, '/providers/Microsoft.Authorization/roleDefinitions/', 'acdd72a7-3385-48ef-bd42-f606fba81ae7')]", + "principalId": "[reference(resourceId('Microsoft.Web/sites', variables('funcAppName')),'2019-08-01', 'full').identity.principalId]" + } + } + ], + "outputs": {} +} From 81ee51ffa0576b02dc60ee5600a44cec3cde3e97 Mon Sep 17 00:00:00 2001 From: John Duprey Date: Fri, 10 Jan 2025 13:40:30 -0500 Subject: [PATCH 3/6] update ARM templates --- deployment/AzureDeploymentTemplate.json | 2 +- deployment/DevAzureDeploymentTemplate_regionoptions.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deployment/AzureDeploymentTemplate.json b/deployment/AzureDeploymentTemplate.json index aa445e3fd6c8..91ce52c678a7 100644 --- a/deployment/AzureDeploymentTemplate.json +++ b/deployment/AzureDeploymentTemplate.json @@ -220,7 +220,7 @@ "buildProperties": { "appLocation": "/", "apiLocation": "", - "appArtifactLocation": "" + "outputLocation": "/out" } }, "sku": { diff --git a/deployment/DevAzureDeploymentTemplate_regionoptions.json b/deployment/DevAzureDeploymentTemplate_regionoptions.json index f41e669076e5..6b84d7bfea84 100644 --- a/deployment/DevAzureDeploymentTemplate_regionoptions.json +++ b/deployment/DevAzureDeploymentTemplate_regionoptions.json @@ -294,7 +294,7 @@ "buildProperties": { "appLocation": "/", "apiLocation": "", - "appArtifactLocation": "" + "outputLocation": "/out" } }, "sku": { From fb776d75502b56f6f7d8791dbd0a3132310be273 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Sat, 11 Jan 2025 02:42:49 +0100 Subject: [PATCH 4/6] Update AzureDeploymentTemplate_regionoptions.json --- deployment/AzureDeploymentTemplate_regionoptions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deployment/AzureDeploymentTemplate_regionoptions.json b/deployment/AzureDeploymentTemplate_regionoptions.json index 1abff7bcc162..7e23726404c2 100644 --- a/deployment/AzureDeploymentTemplate_regionoptions.json +++ b/deployment/AzureDeploymentTemplate_regionoptions.json @@ -220,7 +220,7 @@ "buildProperties": { "appLocation": "/", "apiLocation": "", - "appArtifactLocation": "" + "outputLocation": "/out" } }, "sku": { From ec2f1df1afb6acd1501620171c74a8d92dd819af Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Sat, 11 Jan 2025 02:45:56 +0100 Subject: [PATCH 5/6] ci: add Azure Static Web Apps workflow file on-behalf-of: @Azure opensource@microsoft.com --- ...-static-web-apps-mango-field-04aac4710.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/azure-static-web-apps-mango-field-04aac4710.yml diff --git a/.github/workflows/azure-static-web-apps-mango-field-04aac4710.yml b/.github/workflows/azure-static-web-apps-mango-field-04aac4710.yml new file mode 100644 index 000000000000..5fe495a2155d --- /dev/null +++ b/.github/workflows/azure-static-web-apps-mango-field-04aac4710.yml @@ -0,0 +1,46 @@ +name: Azure Static Web Apps CI/CD + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened, closed] + branches: + - main + +jobs: + build_and_deploy_job: + if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') + runs-on: ubuntu-latest + name: Build and Deploy Job + steps: + - uses: actions/checkout@v3 + with: + submodules: true + lfs: false + - name: Build And Deploy + id: builddeploy + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_FIELD_04AAC4710 }} + repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) + action: "upload" + ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### + # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig + app_location: "/" # App source code path + api_location: "" # Api source code path - optional + output_location: "/out" # Built app content directory - optional + ###### End of Repository/Build Configurations ###### + + close_pull_request_job: + if: github.event_name == 'pull_request' && github.event.action == 'closed' + runs-on: ubuntu-latest + name: Close Pull Request Job + steps: + - name: Close Pull Request + id: closepullrequest + uses: Azure/static-web-apps-deploy@v1 + with: + azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_FIELD_04AAC4710 }} + action: "close" From f31b1e8d539fea77cbc70a036af2f4020f9f5615 Mon Sep 17 00:00:00 2001 From: KelvinTegelaar <49186168+KelvinTegelaar@users.noreply.github.com> Date: Sat, 11 Jan 2025 19:24:34 +0100 Subject: [PATCH 6/6] Delete .github/workflows/azure-static-web-apps-mango-field-04aac4710.yml --- ...-static-web-apps-mango-field-04aac4710.yml | 46 ------------------- 1 file changed, 46 deletions(-) delete mode 100644 .github/workflows/azure-static-web-apps-mango-field-04aac4710.yml diff --git a/.github/workflows/azure-static-web-apps-mango-field-04aac4710.yml b/.github/workflows/azure-static-web-apps-mango-field-04aac4710.yml deleted file mode 100644 index 5fe495a2155d..000000000000 --- a/.github/workflows/azure-static-web-apps-mango-field-04aac4710.yml +++ /dev/null @@ -1,46 +0,0 @@ -name: Azure Static Web Apps CI/CD - -on: - push: - branches: - - main - pull_request: - types: [opened, synchronize, reopened, closed] - branches: - - main - -jobs: - build_and_deploy_job: - if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed') - runs-on: ubuntu-latest - name: Build and Deploy Job - steps: - - uses: actions/checkout@v3 - with: - submodules: true - lfs: false - - name: Build And Deploy - id: builddeploy - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_FIELD_04AAC4710 }} - repo_token: ${{ secrets.GITHUB_TOKEN }} # Used for Github integrations (i.e. PR comments) - action: "upload" - ###### Repository/Build Configurations - These values can be configured to match your app requirements. ###### - # For more information regarding Static Web App workflow configurations, please visit: https://aka.ms/swaworkflowconfig - app_location: "/" # App source code path - api_location: "" # Api source code path - optional - output_location: "/out" # Built app content directory - optional - ###### End of Repository/Build Configurations ###### - - close_pull_request_job: - if: github.event_name == 'pull_request' && github.event.action == 'closed' - runs-on: ubuntu-latest - name: Close Pull Request Job - steps: - - name: Close Pull Request - id: closepullrequest - uses: Azure/static-web-apps-deploy@v1 - with: - azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN_MANGO_FIELD_04AAC4710 }} - action: "close"