-
Notifications
You must be signed in to change notification settings - Fork 437
[Modules] Multi additions to staticSites #1662
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
Merged
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
2ff601c
First commit
AlexanderSehr b7e221f
[Modules] Multi additions to staticSites (#1655)
itpropro 80d675c
Merge branch 'main' into users/itpropro/staticSites
AlexanderSehr 0c03a45
Merge branch 'users/itpropro/staticSites' of https://github.com/Azure…
AlexanderSehr 5d3133b
Update to latest
AlexanderSehr d42262e
Updated docs
AlexanderSehr d55c93b
Updated telemetry & docs
AlexanderSehr 4689ff9
Minor fix
AlexanderSehr c3639d8
Regenerated main readme
AlexanderSehr e8332fa
Another try
AlexanderSehr 4f3b7b8
Updated files on linux
7b74e78
Removed custom domain test as it is not operational
AlexanderSehr 0645038
Updated docs
AlexanderSehr d7fc4ff
Updated test
AlexanderSehr 75a055c
Merged latest main
AlexanderSehr 9556d97
Merged latest main
AlexanderSehr e2886a0
Update modules/Microsoft.Web/staticSites/config/deploy.bicep
AlexanderSehr b1f9bf2
Update modules/Microsoft.Web/staticSites/config/deploy.bicep
AlexanderSehr 5b5ac84
Merge branch 'main' into users/itpropro/staticSites
AlexanderSehr accab41
Updated param files & template
AlexanderSehr 7e6a1b9
Update to latest
AlexanderSehr 976bd48
Update to latest
AlexanderSehr d13fbca
Merge branch 'main' into users/itpropro/staticSites
AlexanderSehr 41cc52f
Updated ReadMe
AlexanderSehr ba5b202
Resolved conflict
AlexanderSehr caa3e86
Updated test
AlexanderSehr 372fd69
Updated readme
AlexanderSehr 052f854
Update modules/Microsoft.Web/staticSites/customDomains/deploy.bicep
AlexanderSehr 44e9795
Update modules/Microsoft.Web/staticSites/customDomains/deploy.bicep
AlexanderSehr e8c5b5f
Update modules/Microsoft.Web/staticSites/customDomains/deploy.bicep
AlexanderSehr 7a3b743
Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep
AlexanderSehr a923adf
Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep
AlexanderSehr 822dcaf
Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep
AlexanderSehr 5e89271
Update modules/Microsoft.Web/staticSites/linkedBackends/deploy.bicep
AlexanderSehr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| @allowed([ | ||
| 'appsettings' | ||
| 'functionappsettings' | ||
| ]) | ||
| @description('Required. Type of settings to apply.') | ||
| param kind string | ||
|
|
||
| @description('Required. App settings.') | ||
| param properties object | ||
|
|
||
| @description('Conditional. The name of the parent Static Web App. Required if the template is used in a standalone deployment.') | ||
| param staticSiteName string | ||
|
|
||
| @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') | ||
| param enableDefaultTelemetry bool = true | ||
|
|
||
| @description('Optional. Location for all resources.') | ||
| param location string = resourceGroup().location | ||
|
|
||
| resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { | ||
| name: staticSiteName | ||
| } | ||
|
|
||
| resource config 'Microsoft.Web/staticSites/config@2022-03-01' = { | ||
| #disable-next-line BCP225 // Disables incorrect error that `name` cannot be determined at compile time. | ||
| name: kind | ||
| parent: staticSite | ||
| properties: properties | ||
| } | ||
|
|
||
| resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { | ||
| name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' | ||
| properties: { | ||
| mode: 'Incremental' | ||
| template: { | ||
| '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' | ||
| contentVersion: '1.0.0.0' | ||
| resources: [] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @description('The name of the config.') | ||
| output name string = config.name | ||
|
|
||
| @description('The resource ID of the config.') | ||
| output resourceId string = config.id | ||
|
|
||
| @description('The name of the resource group the config was created in.') | ||
| output resourceGroupName string = resourceGroup().name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # Static Site Config `[Microsoft.Web/staticSites/config]` | ||
|
|
||
| This module deploys a Static Site Config. | ||
|
|
||
| ## Navigation | ||
|
|
||
| - [Resource Types](#Resource-Types) | ||
| - [Parameters](#Parameters) | ||
| - [Outputs](#Outputs) | ||
| - [Cross-referenced modules](#Cross-referenced-modules) | ||
|
|
||
| ## Resource Types | ||
|
|
||
| | Resource Type | API Version | | ||
| | :-- | :-- | | ||
| | `Microsoft.Web/staticSites/config` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/staticSites/config) | | ||
|
|
||
| ## Parameters | ||
|
|
||
| **Required parameters** | ||
|
|
||
| | Parameter Name | Type | Allowed Values | Description | | ||
| | :-- | :-- | :-- | :-- | | ||
| | `kind` | string | `[appsettings, functionappsettings]` | Type of settings to apply. | | ||
| | `properties` | object | | App settings. | | ||
|
|
||
| **Conditional parameters** | ||
|
|
||
| | Parameter Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | | ||
|
|
||
| **Optional parameters** | ||
|
|
||
| | Parameter Name | Type | Default Value | Description | | ||
| | :-- | :-- | :-- | :-- | | ||
| | `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | | ||
| | `location` | string | `[resourceGroup().location]` | Location for all resources. | | ||
|
|
||
|
|
||
| ## Outputs | ||
|
|
||
| | Output Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `name` | string | The name of the config. | | ||
| | `resourceGroupName` | string | The name of the resource group the config was created in. | | ||
| | `resourceId` | string | The resource ID of the config. | | ||
|
|
||
| ## Cross-referenced modules | ||
|
|
||
| _None_ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", | ||
| "version": "0.6" | ||
| } |
47 changes: 47 additions & 0 deletions
47
modules/Microsoft.Web/staticSites/customDomains/deploy.bicep
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| @description('Conditional. The custom domain name. Required if the template is used in a standalone deployment.') | ||
| param name string | ||
|
|
||
| @description('Conditional. The name of the parent Static Web App. Required if the template is used in a standalone deployment.') | ||
| param staticSiteName string | ||
|
|
||
| @description('Optional. Validation method for adding a custom domain.') | ||
| param validationMethod string = 'cname-delegation' | ||
|
|
||
| @description('Optional. Enable telemetry via the Customer Usage Attribution ID (GUID).') | ||
| param enableDefaultTelemetry bool = true | ||
|
|
||
| @description('Optional. Location for all resources.') | ||
| param location string = resourceGroup().location | ||
|
|
||
| resource staticSite 'Microsoft.Web/staticSites@2022-03-01' existing = { | ||
| name: staticSiteName | ||
| } | ||
|
|
||
| resource customDomain 'Microsoft.Web/staticSites/customDomains@2022-03-01' = { | ||
| name: name | ||
| parent: staticSite | ||
| properties: { | ||
| validationMethod: validationMethod | ||
| } | ||
| } | ||
|
|
||
| resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) { | ||
| name: 'pid-47ed15a6-730a-4827-bcb4-0fd963ffbd82-${uniqueString(deployment().name, location)}' | ||
| properties: { | ||
| mode: 'Incremental' | ||
| template: { | ||
| '$schema': 'https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#' | ||
| contentVersion: '1.0.0.0' | ||
| resources: [] | ||
| } | ||
| } | ||
| } | ||
|
|
||
| @description('The name of the static site custom domain.') | ||
| output name string = customDomain.name | ||
|
|
||
| @description('The resource ID of the static site custom domain.') | ||
| output resourceId string = customDomain.id | ||
|
|
||
| @description('The resource group the static site custom domain was deployed into.') | ||
| output resourceGroupName string = resourceGroup().name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Static Site Custom Domain `[Microsoft.Web/staticSites/customDomains]` | ||
|
|
||
| This module deploys a Custom Domain into a Static Site. | ||
|
|
||
| ## Navigation | ||
|
|
||
| - [Resource Types](#Resource-Types) | ||
| - [Parameters](#Parameters) | ||
| - [Outputs](#Outputs) | ||
| - [Cross-referenced modules](#Cross-referenced-modules) | ||
|
|
||
| ## Resource Types | ||
|
|
||
| | Resource Type | API Version | | ||
| | :-- | :-- | | ||
| | `Microsoft.Web/staticSites/customDomains` | [2022-03-01](https://docs.microsoft.com/en-us/azure/templates/Microsoft.Web/2022-03-01/staticSites/customDomains) | | ||
|
|
||
| ## Parameters | ||
|
|
||
| **Conditional parameters** | ||
|
|
||
| | Parameter Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `name` | string | The custom domain name. Required if the template is used in a standalone deployment. | | ||
| | `staticSiteName` | string | The name of the parent Static Web App. Required if the template is used in a standalone deployment. | | ||
|
|
||
| **Optional parameters** | ||
|
|
||
| | Parameter Name | Type | Default Value | Description | | ||
| | :-- | :-- | :-- | :-- | | ||
| | `enableDefaultTelemetry` | bool | `True` | Enable telemetry via the Customer Usage Attribution ID (GUID). | | ||
| | `location` | string | `[resourceGroup().location]` | Location for all resources. | | ||
| | `validationMethod` | string | `'cname-delegation'` | Validation method for adding a custom domain. | | ||
|
|
||
|
|
||
| ## Outputs | ||
|
|
||
| | Output Name | Type | Description | | ||
| | :-- | :-- | :-- | | ||
| | `name` | string | The name of the static site. | | ||
| | `resourceGroupName` | string | The resource group the static site was deployed into. | | ||
| | `resourceId` | string | The resource ID of the static site. | | ||
|
|
||
| ## Cross-referenced modules | ||
|
|
||
| _None_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| { | ||
| "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/master/src/NerdBank.GitVersioning/version.schema.json", | ||
| "version": "0.6" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.