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

feat: avm/res/app/container-app #833

Merged
merged 51 commits into from
Jan 29, 2024
Merged
Show file tree
Hide file tree
Changes from 27 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
0e62948
Initial copy from CARML
oZakari Dec 12, 2023
7575352
Initial workflow for AVM container app
oZakari Dec 12, 2023
7a7d6fa
Fix container app references
oZakari Dec 12, 2023
fcf14f6
Changed [[namePrefix]] to #_namePrefix_# to avoid Bicep compilation i…
oZakari Dec 13, 2023
64d686b
Align serviceShort param with AVM
oZakari Dec 13, 2023
400e1c0
Add diagnostic settings to containr app
oZakari Dec 14, 2023
a79d00f
Update api versions to latest
oZakari Dec 14, 2023
325e804
Merge branch 'main' of https://github.com/Azure/bicep-registry-module…
oZakari Dec 14, 2023
0d6fd9d
Update api version of rg
oZakari Jan 2, 2024
69fecc8
Merge branch 'main' of https://github.com/Azure/bicep-registry-module…
oZakari Jan 2, 2024
c89464e
Updating various api versions
oZakari Jan 2, 2024
9930503
Update readme.md and main.json
oZakari Jan 3, 2024
b043a0e
Change enableDefaultTelemetry to enableTelemetry
oZakari Jan 3, 2024
6b3e060
Fix serviceShort name for default test
oZakari Jan 3, 2024
4ab3582
Fix telemetry resource
oZakari Jan 3, 2024
d3127de
Fix telemetry resource
oZakari Jan 3, 2024
7ef9191
Merge branch 'container-apps' of https://github.com/oZakari/bicep-reg…
oZakari Jan 3, 2024
2cfc7d6
Merge branch 'main' of https://github.com/Azure/bicep-registry-module…
oZakari Jan 19, 2024
f7ed1a0
Update avm/res/app/container-app/version.json
oZakari Jan 19, 2024
ed2565a
Merge branch 'main' of https://github.com/Azure/bicep-registry-module…
oZakari Jan 19, 2024
fd518ab
Merge branch 'container-apps' of https://github.com/oZakari/bicep-reg…
oZakari Jan 19, 2024
dae8768
Update avm/res/app/container-app/main.bicep
oZakari Jan 19, 2024
908a432
Update avm/res/app/container-app/main.bicep
oZakari Jan 19, 2024
8a1af0d
Update avm/res/app/container-app/main.bicep
oZakari Jan 19, 2024
30dcf00
Undo unintentional change to batch account
oZakari Jan 19, 2024
6443274
Update avm/res/app/container-app/tests/e2e/defaults/main.test.bicep
oZakari Jan 19, 2024
a28f0e5
Update avm/res/app/container-app/tests/e2e/defaults/main.test.bicep
oZakari Jan 19, 2024
b2d8ded
Update avm/res/app/container-app/tests/e2e/max/main.test.bicep
oZakari Jan 19, 2024
ce170d9
Update avm/res/app/container-app/tests/e2e/max/main.test.bicep
oZakari Jan 19, 2024
d2aed9d
Update avm/res/app/container-app/tests/e2e/max/dependencies.bicep
oZakari Jan 19, 2024
cf49b4f
Update avm/res/app/container-app/tests/e2e/waf-aligned/main.test.bicep
oZakari Jan 19, 2024
908c939
Update avm/res/app/container-app/tests/e2e/waf-aligned/main.test.bicep
oZakari Jan 19, 2024
a6b19d5
Update avm/res/app/container-app/main.bicep
oZakari Jan 19, 2024
fd46424
Uncommented line for container-app within codeowners
oZakari Jan 19, 2024
dad0ff2
Merge branch 'container-apps' of https://github.com/oZakari/bicep-reg…
oZakari Jan 19, 2024
eda69e5
Switch pipeline agent to support latest ubuntu version
oZakari Jan 19, 2024
255d96c
Update readme and main.json
oZakari Jan 19, 2024
b78cba8
Update readme.md
oZakari Jan 19, 2024
e446ad5
Add additional WAF poperties for test
oZakari Jan 19, 2024
0ed8732
Update readme.md for waf additions
oZakari Jan 19, 2024
96817eb
Removed secrets as not applicable for WAF
oZakari Jan 19, 2024
1357cdf
Fix telemetry resource
oZakari Jan 19, 2024
d477e0e
Fixed role assignment udt
oZakari Jan 19, 2024
c4ede3e
Merge branch 'main' of https://github.com/Azure/bicep-registry-module…
oZakari Jan 22, 2024
000f11a
Attempt to fix readme.md
oZakari Jan 22, 2024
11f4509
Remove extra line
oZakari Jan 23, 2024
0fa64f0
Adjust allLogs capitalization
oZakari Jan 23, 2024
6113d9a
Remove diagnostic settings
oZakari Jan 23, 2024
094f24c
Update readme and main.json
oZakari Jan 23, 2024
a25aabe
Fix readme.md
oZakari Jan 23, 2024
4270fec
Merge branch 'main' into container-apps
oZakari Jan 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#/avm/res/aad/domain-service/ @Azure/avm-res-aad-domainservice-module-owners-bicep
/avm/res/analysis-services/server/ @Azure/avm-res-analysisservices-server-module-owners-bicep @Azure/avm-core-team-technical-bicep
/avm/res/api-management/service/ @Azure/avm-res-apimanagement-service-module-owners-bicep @Azure/avm-core-team-technical-bicep
#/avm/res/app/container-app/ @Azure/avm-res-app-containerapp-module-owners-bicep @Azure/avm-core-team-technical-bicep
/avm/res/app/container-app/ @Azure/avm-res-app-containerapp-module-owners-bicep @Azure/avm-core-team-technical-bicep
AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
/avm/res/app/managed-environment/ @Azure/avm-res-app-managedenvironment-module-owners-bicep @Azure/avm-core-team-technical-bicep
#/avm/res/app-configuration/configuration-store/ @Azure/avm-res-appconfiguration-configurationstore-module-owners-bicep @Azure/avm-core-team-technical-bicep
#/avm/res/authorization/lock/ @Azure/avm-res-authorization-lock-module-owners-bicep @Azure/avm-core-team-technical-bicep
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/avm.res.app.container-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
# Initialize pipeline #
###########################
job_initialize_pipeline:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
name: "Initialize pipeline"
steps:
- name: "Checkout"
Expand Down
129 changes: 60 additions & 69 deletions avm/res/app/container-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ This module deploys a Container App.
- [Parameters](#Parameters)
- [Outputs](#Outputs)
- [Cross-referenced modules](#Cross-referenced-modules)
- [Data Collection](#Data-Collection)

## Resource Types

Expand All @@ -25,7 +26,7 @@ The following section provides usage examples for the module, which were used to

>**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.

>**Note**: To reference the module, please use the following syntax `br:bicep/modules/app.container-app:1.0.0`.
>**Note**: To reference the module, please use the following syntax `br/public:avm/res/app/container-app:<version>`.

- [Using only defaults](#example-1-using-only-defaults)
- [Using large parameter set](#example-2-using-large-parameter-set)
Expand All @@ -41,7 +42,7 @@ This instance deploys the module with the minimum set of required parameters.
<summary>via Bicep module</summary>

```bicep
module containerApp 'br:public:avm/res/app/container-app:<version>' = {
module containerApp 'br/public:avm/res/app/container-app:<version>' = {
name: '${uniqueString(deployment().name, location)}-test-acamin'
params: {
// Required parameters
Expand All @@ -58,20 +59,7 @@ module containerApp 'br:public:avm/res/app/container-app:<version>' = {
environmentId: '<environmentId>'
name: 'acamin001'
// Non-required parameters
diagnosticSettings: [
{
eventHubAuthorizationRuleResourceId: '<eventHubAuthorizationRuleResourceId>'
eventHubName: '<eventHubName>'
storageAccountResourceId: '<storageAccountResourceId>'
workspaceResourceId: '<workspaceResourceId>'
}
]
enableTelemetry: '<enableTelemetry>'
location: '<location>'
tags: {
Env: 'test'
'hidden-title': 'This is visible in the resource name'
}
}
}
```
Expand Down Expand Up @@ -108,27 +96,8 @@ module containerApp 'br:public:avm/res/app/container-app:<version>' = {
"value": "acamin001"
},
// Non-required parameters
"diagnosticSettings": {
"value": [
{
"eventHubAuthorizationRuleResourceId": "<eventHubAuthorizationRuleResourceId>",
"eventHubName": "<eventHubName>",
"storageAccountResourceId": "<storageAccountResourceId>",
"workspaceResourceId": "<workspaceResourceId>"
}
]
},
"enableTelemetry": {
"value": "<enableTelemetry>"
},
"location": {
"value": "<location>"
},
"tags": {
"value": {
"Env": "test",
"hidden-title": "This is visible in the resource name"
}
}
}
}
Expand All @@ -147,7 +116,7 @@ This instance deploys the module with most of its features enabled.
<summary>via Bicep module</summary>

```bicep
module containerApp 'br:public:avm/res/app/container-app:<version>' = {
module containerApp 'br/public:avm/res/app/container-app:<version>' = {
name: '${uniqueString(deployment().name, location)}-test-acamax'
params: {
// Required parameters
Expand Down Expand Up @@ -189,7 +158,6 @@ module containerApp 'br:public:avm/res/app/container-app:<version>' = {
workspaceResourceId: '<workspaceResourceId>'
}
]
enableTelemetry: '<enableTelemetry>'
location: '<location>'
lock: {
kind: 'CanNotDelete'
Expand All @@ -200,6 +168,23 @@ module containerApp 'br:public:avm/res/app/container-app:<version>' = {
'<managedIdentityResourceId>'
]
}
roleAssignments: [
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: 'Owner'
}
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: 'b24988ac-6180-42a0-ab88-20f7382dd24c'
}
{
principalId: '<principalId>'
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: '<roleDefinitionIdOrName>'
}
]
secrets: {
secureList: [
{
Expand Down Expand Up @@ -275,9 +260,6 @@ module containerApp 'br:public:avm/res/app/container-app:<version>' = {
}
]
},
"enableTelemetry": {
"value": "<enableTelemetry>"
},
"location": {
"value": "<location>"
},
Expand All @@ -294,6 +276,25 @@ module containerApp 'br:public:avm/res/app/container-app:<version>' = {
]
}
},
"roleAssignments": {
"value": [
{
"principalId": "<principalId>",
"principalType": "ServicePrincipal",
"roleDefinitionIdOrName": "Owner"
},
{
"principalId": "<principalId>",
"principalType": "ServicePrincipal",
"roleDefinitionIdOrName": "b24988ac-6180-42a0-ab88-20f7382dd24c"
},
{
"principalId": "<principalId>",
"principalType": "ServicePrincipal",
"roleDefinitionIdOrName": "<roleDefinitionIdOrName>"
}
]
},
"secrets": {
"value": {
"secureList": [
Expand Down Expand Up @@ -327,7 +328,7 @@ This instance deploys the module in alignment with the best-practices of the Azu
<summary>via Bicep module</summary>

```bicep
module containerApp 'br/public:AVM/bicep-registry-modules:<version>' = {
module containerApp 'br/public:avm/res/app/container-app:<version>' = {
name: '${uniqueString(deployment().name, location)}-test-acawaf'
params: {
// Required parameters
Expand Down Expand Up @@ -369,7 +370,8 @@ module containerApp 'br/public:AVM/bicep-registry-modules:<version>' = {
workspaceResourceId: '<workspaceResourceId>'
}
]
enableTelemetry: '<enableTelemetry>'
ingressAllowInsecure: false
ingressExternal: false
location: '<location>'
lock: {
kind: 'CanNotDelete'
Expand All @@ -380,14 +382,6 @@ module containerApp 'br/public:AVM/bicep-registry-modules:<version>' = {
'<managedIdentityResourceId>'
]
}
secrets: {
secureList: [
{
name: 'customtest'
value: '<value>'
}
]
}
tags: {
Env: 'test'
'hidden-title': 'This is visible in the resource name'
Expand Down Expand Up @@ -455,8 +449,11 @@ module containerApp 'br/public:AVM/bicep-registry-modules:<version>' = {
}
]
},
"enableTelemetry": {
"value": "<enableTelemetry>"
"ingressAllowInsecure": {
"value": false
},
"ingressExternal": {
"value": false
},
"location": {
"value": "<location>"
Expand All @@ -474,16 +471,6 @@ module containerApp 'br/public:AVM/bicep-registry-modules:<version>' = {
]
}
},
"secrets": {
"value": {
"secureList": [
{
"name": "customtest",
"value": "<value>"
}
]
}
},
"tags": {
"value": {
"Env": "test",
Expand Down Expand Up @@ -516,7 +503,7 @@ module containerApp 'br/public:AVM/bicep-registry-modules:<version>' = {
| [`customDomains`](#parameter-customdomains) | array | Custom domain bindings for Container App hostnames. |
| [`dapr`](#parameter-dapr) | object | Dapr configuration for the Container App. |
| [`diagnosticSettings`](#parameter-diagnosticsettings) | array | The diagnostic settings of the service. |
| [`enableTelemetry`](#parameter-enableTelemetry) | bool | Enable telemetry via a Globally Unique Identifier (GUID). |
| [`enableTelemetry`](#parameter-enabletelemetry) | bool | Enable/Disable usage telemetry for module. |
| [`exposedPort`](#parameter-exposedport) | int | Exposed Port in containers for TCP traffic from ingress. |
| [`ingressAllowInsecure`](#parameter-ingressallowinsecure) | bool | Bool indicating if HTTP connections to is allowed. If set to false HTTP connections are automatically redirected to HTTPS connections. |
| [`ingressExternal`](#parameter-ingressexternal) | bool | Bool indicating if app exposes an external http endpoint. |
Expand All @@ -530,7 +517,7 @@ module containerApp 'br/public:AVM/bicep-registry-modules:<version>' = {
| [`maxInactiveRevisions`](#parameter-maxinactiverevisions) | int | Max inactive revisions a Container App can have. |
| [`registries`](#parameter-registries) | array | Collection of private container registry credentials for containers used by the Container app. |
| [`revisionSuffix`](#parameter-revisionsuffix) | string | User friendly suffix that is appended to the revision name. |
| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute. |
| [`roleAssignments`](#parameter-roleassignments) | array | Array of role assignments to create. |
| [`scaleMaxReplicas`](#parameter-scalemaxreplicas) | int | Maximum number of container replicas. Defaults to 10 if not set. |
| [`scaleMinReplicas`](#parameter-scaleminreplicas) | int | Minimum number of container replicas. |
| [`scaleRules`](#parameter-scalerules) | array | Scaling rules. |
Expand Down Expand Up @@ -611,7 +598,7 @@ The diagnostic settings of the service.
| [`logAnalyticsDestinationType`](#parameter-diagnosticsettingsloganalyticsdestinationtype) | string | A string indicating whether the export to Log Analytics should use the default destination type, i.e. AzureDiagnostics, or use a destination type. |
| [`logCategoriesAndGroups`](#parameter-diagnosticsettingslogcategoriesandgroups) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
| [`marketplacePartnerResourceId`](#parameter-diagnosticsettingsmarketplacepartnerresourceid) | string | The full ARM resource ID of the Marketplace resource to which you would like to send Diagnostic Logs. |
| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection. |
| [`metricCategories`](#parameter-diagnosticsettingsmetriccategories) | array | The name of metrics that will be streamed. "allMetrics" includes all possible metrics for the resource. Set to '' to disable metric collection. |
| [`name`](#parameter-diagnosticsettingsname) | string | The name of diagnostic setting. |
| [`storageAccountResourceId`](#parameter-diagnosticsettingsstorageaccountresourceid) | string | Resource ID of the diagnostic storage account. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
| [`workspaceResourceId`](#parameter-diagnosticsettingsworkspaceresourceid) | string | Resource ID of the diagnostic log analytics workspace. For security reasons, it is recommended to set diagnostic settings to send data to either storage account, log analytics workspace or event hub. |
Expand Down Expand Up @@ -660,7 +647,7 @@ The full ARM resource ID of the Marketplace resource to which you would like to

### Parameter: `diagnosticSettings.metricCategories`

The name of logs that will be streamed. "allLogs" includes all possible logs for the resource. Set to '' to disable log collection.
The name of metrics that will be streamed. "allMetrics" includes all possible metrics for the resource. Set to '' to disable metric collection.

- Required: No
- Type: array
Expand Down Expand Up @@ -688,7 +675,7 @@ Resource ID of the diagnostic log analytics workspace. For security reasons, it

### Parameter: `enableTelemetry`

Enable telemetry via a Globally Unique Identifier (GUID).
Enable/Disable usage telemetry for module.

- Required: No
- Type: bool
Expand Down Expand Up @@ -857,7 +844,7 @@ User friendly suffix that is appended to the revision name.

### Parameter: `roleAssignments`

Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute.
Array of role assignments to create.

- Required: No
- Type: array
Expand All @@ -873,7 +860,7 @@ Array of role assignment objects that contain the 'roleDefinitionIdOrName' and '

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container" |
| [`condition`](#parameter-roleassignmentscondition) | string | The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container". |
| [`conditionVersion`](#parameter-roleassignmentsconditionversion) | string | Version of the condition. |
| [`delegatedManagedIdentityResourceId`](#parameter-roleassignmentsdelegatedmanagedidentityresourceid) | string | The Resource Id of the delegated managed identity resource. |
| [`description`](#parameter-roleassignmentsdescription) | string | The description of the role assignment. |
Expand All @@ -895,7 +882,7 @@ The role to assign. You can provide either the display name of the role definiti

### Parameter: `roleAssignments.condition`

The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container"
The conditions on the role assignment. This limits the resources it can be assigned to. e.g.: @Resource[Microsoft.Storage/storageAccounts/blobServices/containers:ContainerName] StringEqualsIgnoreCase "foo_storage_container".

- Required: No
- Type: string
Expand Down Expand Up @@ -1045,3 +1032,7 @@ Workload profile name to pin for container app execution.
## Cross-referenced modules

_None_

## Data Collection

The software may collect information about you and your use of the software and send it to Microsoft. Microsoft may use this information to provide services and improve our products and services. You may turn off the telemetry as described in the [repository](https://aka.ms/avm/telemetry). There are also some features in the software that may enable you and Microsoft to collect data from users of your applications. If you use these features, you must comply with applicable law, including providing appropriate notices to users of your applications together with a copy of Microsoft’s privacy statement. Our privacy statement is located at <https://go.microsoft.com/fwlink/?LinkID=824704>. You can learn more about data collection and use in the help documentation and our privacy statement. Your use of the software operates as your consent to these practices.
Loading