Skip to content

Commit

Permalink
fix: Container-App-Stack - Trigger publish (Azure#3497)
Browse files Browse the repository at this point in the history
## Description

- Just a small change to ensure the module is published as a previous
merge did not do the trick
- Also added missing passthru of `enableTelemetry` parameter to this and
the insights-dashboard module
  • Loading branch information
AlexanderSehr authored Oct 10, 2024
1 parent ac577d4 commit d0cbe01
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 11 deletions.
4 changes: 2 additions & 2 deletions avm/ptn/azd/container-apps-stack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ param zoneRedundant = true
| :-- | :-- | :-- |
| [`dockerBridgeCidr`](#parameter-dockerbridgecidr) | string | CIDR notation IP range assigned to the Docker bridge, network. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. Required if zoneRedundant is set to true to make the resource WAF compliant. |
| [`infrastructureSubnetResourceId`](#parameter-infrastructuresubnetresourceid) | string | Resource ID of a subnet for infrastructure components. This is used to deploy the environment into a virtual network. Must not overlap with any other provided IP ranges. Required if "internal" is set to true. Required if zoneRedundant is set to true to make the resource WAF compliant. |
| [`internal`](#parameter-internal) | bool | Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided. Required if zoneRedundant is set to true to make the resource WAF compliant. |
| [`internal`](#parameter-internal) | bool | Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided. Required if 'zoneRedundant' is set to true to make the resource WAF compliant. |
| [`platformReservedCidr`](#parameter-platformreservedcidr) | string | IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. Required if zoneRedundant is set to true to make the resource WAF compliant. |
| [`platformReservedDnsIP`](#parameter-platformreserveddnsip) | string | An IP address from the IP range defined by "platformReservedCidr" that will be reserved for the internal DNS server. It must not be the first address in the range and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. Required if zoneRedundant is set to true to make the resource WAF compliant. |
| [`workloadProfiles`](#parameter-workloadprofiles) | array | Workload profiles configured for the Managed Environment. Required if zoneRedundant is set to true to make the resource WAF compliant. |
Expand Down Expand Up @@ -256,7 +256,7 @@ Resource ID of a subnet for infrastructure components. This is used to deploy th

### Parameter: `internal`

Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided. Required if zoneRedundant is set to true to make the resource WAF compliant.
Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided. Required if 'zoneRedundant' is set to true to make the resource WAF compliant.

- Required: No
- Type: bool
Expand Down
4 changes: 3 additions & 1 deletion avm/ptn/azd/container-apps-stack/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ param dockerBridgeCidr string = ''
@description('Conditional. Resource ID of a subnet for infrastructure components. This is used to deploy the environment into a virtual network. Must not overlap with any other provided IP ranges. Required if "internal" is set to true. Required if zoneRedundant is set to true to make the resource WAF compliant.')
param infrastructureSubnetResourceId string = ''

@description('Conditional. Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided. Required if zoneRedundant is set to true to make the resource WAF compliant.')
@description('Conditional. Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then "infrastructureSubnetId" must be provided. Required if \'zoneRedundant\' is set to true to make the resource WAF compliant.')
param internal bool = false

@description('Conditional. IP range in CIDR notation that can be reserved for environment infrastructure IP addresses. It must not overlap with any other provided IP ranges and can only be used when the environment is deployed into a virtual network. If not provided, it will be set with a default value by the platform. Required if zoneRedundant is set to true to make the resource WAF compliant.')
Expand Down Expand Up @@ -104,6 +104,7 @@ module containerAppsEnvironment 'br/public:avm/res/app/managed-environment:0.7.0
dockerBridgeCidr: dockerBridgeCidr
platformReservedCidr: platformReservedCidr
platformReservedDnsIP: platformReservedDnsIP
enableTelemetry: enableTelemetry
}
}

Expand All @@ -118,6 +119,7 @@ module containerRegistry 'br/public:avm/res/container-registry/registry:0.4.0' =
acrAdminUserEnabled: acrAdminUserEnabled
tags: tags
acrSku: acrSku
enableTelemetry: enableTelemetry
}
}

Expand Down
6 changes: 3 additions & 3 deletions avm/ptn/azd/container-apps-stack/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "332940780345983600"
"version": "0.30.23.60470",
"templateHash": "2135275469617068705"
},
"name": "avm/ptn/azd/container-apps-stack",
"description": "Creates an Azure Container Registry and an Azure Container Apps environment.\n\n**Note:** This module is not intended for broad, generic use, as it was designed to cater for the requirements of the AZD CLI product. Feature requests and bug fix requests are welcome if they support the development of the AZD CLI but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case",
Expand Down Expand Up @@ -117,7 +117,7 @@
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Conditional. Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then \"infrastructureSubnetId\" must be provided. Required if zoneRedundant is set to true to make the resource WAF compliant."
"description": "Conditional. Boolean indicating the environment only has an internal load balancer. These environments do not have a public static IP resource. If set to true, then \"infrastructureSubnetId\" must be provided. Required if 'zoneRedundant' is set to true to make the resource WAF compliant."
}
},
"platformReservedCidr": {
Expand Down
6 changes: 5 additions & 1 deletion avm/ptn/azd/insights-dashboard/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ module applicationInsights 'br/public:avm/res/insights/component:0.4.1' = {
kind: kind
applicationType: applicationType
workspaceResourceId: logAnalyticsWorkspaceResourceId
enableTelemetry: enableTelemetry
}
}

Expand All @@ -82,6 +83,7 @@ module applicationInsightsDashboard 'modules/applicationinsights-dashboard.bicep
location: location
applicationInsightsName: applicationInsights.outputs.name
applicationInsightsResourceId: applicationInsights.outputs.resourceId
enableTelemetry: enableTelemetry
}
}

Expand All @@ -102,7 +104,9 @@ output dashboardName string = !empty(dashboardName) ? applicationInsightsDashboa
output applicationInsightsResourceId string = applicationInsights.outputs.resourceId

@description('The resource ID of the dashboard.')
output dashboardResourceId string = !empty(dashboardName) ? applicationInsightsDashboard.outputs.dashboardResourceId : ''
output dashboardResourceId string = !empty(dashboardName)
? applicationInsightsDashboard.outputs.dashboardResourceId
: ''

@description('The connection string of the application insights.')
output applicationInsightsConnectionString string = applicationInsights.outputs.connectionString
Expand Down
24 changes: 20 additions & 4 deletions avm/ptn/azd/insights-dashboard/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "16185324363882257699"
"version": "0.30.23.60470",
"templateHash": "15067669928476640283"
},
"name": "Application Insights Components",
"description": "Creates an Application Insights instance based on an existing Log Analytics workspace.\n\n**Note:** This module is not intended for broad, generic use, as it was designed to cater for the requirements of the AZD CLI product. Feature requests and bug fix requests are welcome if they support the development of the AZD CLI but may not be incorporated if they aim to make this module more generic than what it needs to be for its primary use case.",
Expand Down Expand Up @@ -121,6 +121,9 @@
},
"workspaceResourceId": {
"value": "[parameters('logAnalyticsWorkspaceResourceId')]"
},
"enableTelemetry": {
"value": "[parameters('enableTelemetry')]"
}
},
"template": {
Expand Down Expand Up @@ -758,6 +761,9 @@
},
"applicationInsightsResourceId": {
"value": "[reference('applicationInsights').outputs.resourceId.value]"
},
"enableTelemetry": {
"value": "[parameters('enableTelemetry')]"
}
},
"template": {
Expand All @@ -767,8 +773,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "12382758204242351890"
"version": "0.30.23.60470",
"templateHash": "10844955132300564569"
},
"name": "Azure Portal Dashboard",
"description": "Creates a dashboard for an Application Insights instance.",
Expand Down Expand Up @@ -800,6 +806,13 @@
"description": "Optional. Location for all Resources."
}
},
"enableTelemetry": {
"type": "bool",
"defaultValue": true,
"metadata": {
"description": "Optional. Enable/Disable usage telemetry for module."
}
},
"tags": {
"type": "object",
"nullable": true,
Expand Down Expand Up @@ -829,6 +842,9 @@
"tags": {
"value": "[parameters('tags')]"
},
"enableTelemetry": {
"value": "[parameters('enableTelemetry')]"
},
"lenses": {
"value": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ param applicationInsightsResourceId string
@description('Optional. Location for all Resources.')
param location string = resourceGroup().location

@description('Optional. Enable/Disable usage telemetry for module.')
param enableTelemetry bool = true

@description('Optional. Tags of the resource.')
@metadata({
example: '''
Expand All @@ -35,6 +38,7 @@ module dashboard 'br/public:avm/res/portal/dashboard:0.1.0' = {
name: name
location: location
tags: tags
enableTelemetry: enableTelemetry
lenses: [
{
order: 0
Expand Down

0 comments on commit d0cbe01

Please sign in to comment.