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: #1785 output hostnames + feat: #2672 add the output hostname, endpointName, endpointId, uri in CDN Profile Module #2675

Merged
merged 8 commits into from
Jul 10, 2024
3 changes: 3 additions & 0 deletions avm/res/cdn/profile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -849,11 +849,14 @@ Endpoint tags.

| Output | Type | Description |
| :-- | :-- | :-- |
| `endpointId` | string | The resource ID of the CDN profile endpoint. |
| `endpointName` | string | The name of the CDN profile endpoint. |
| `location` | string | The location the resource was deployed into. |
| `name` | string | The name of the CDN profile. |
| `profileType` | string | The type of the CDN profile. |
| `resourceGroupName` | string | The resource group where the CDN profile is deployed. |
| `resourceId` | string | The resource ID of the CDN profile. |
| `uri` | string | The uri of the CDN profile endpoint. |

## Cross-referenced modules

Expand Down
1 change: 1 addition & 0 deletions avm/res/cdn/profile/afdEndpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ The tags of the AFD Endpoint.
| `name` | string | The name of the AFD Endpoint. |
| `resourceGroupName` | string | The name of the resource group the endpoint was created in. |
| `resourceId` | string | The resource id of the AFD Endpoint. |
| `routes` | array | The list of routes assigned to the AFD endpoint. |

## Cross-referenced modules

Expand Down
3 changes: 3 additions & 0 deletions avm/res/cdn/profile/afdEndpoint/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,6 @@ output resourceGroupName string = resourceGroup().name

@description('The location the resource was deployed into.')
output location string = afdEndpoint.location

@description('The list of routes assigned to the AFD endpoint.')
output routes array = routes ?? []
17 changes: 12 additions & 5 deletions avm/res/cdn/profile/afdEndpoint/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "1139997023996590437"
"version": "0.28.1.47646",
"templateHash": "12134994933996412108"
},
"name": "CDN Profiles AFD Endpoints",
"description": "This module deploys a CDN Profile AFD Endpoint.",
Expand Down Expand Up @@ -156,8 +156,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "5770374289363120600"
"version": "0.28.1.47646",
"templateHash": "4116565038484106851"
},
"name": "CDN Profiles AFD Endpoint Route",
"description": "This module deploys a CDN Profile AFD Endpoint route.",
Expand Down Expand Up @@ -431,6 +431,13 @@
"description": "The location the resource was deployed into."
},
"value": "[reference('afdEndpoint', '2023-05-01', 'full').location]"
},
"routes": {
"type": "array",
"metadata": {
"description": "The list of routes assigned to the AFD endpoint."
},
"value": "[coalesce(parameters('routes'), createArray())]"
}
}
}
}
6 changes: 3 additions & 3 deletions avm/res/cdn/profile/afdEndpoint/route/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "5770374289363120600"
"version": "0.28.1.47646",
"templateHash": "4116565038484106851"
},
"name": "CDN Profiles AFD Endpoint Route",
"description": "This module deploys a CDN Profile AFD Endpoint route.",
Expand Down Expand Up @@ -244,4 +244,4 @@
"value": "[resourceGroup().name]"
}
}
}
}
6 changes: 3 additions & 3 deletions avm/res/cdn/profile/customdomain/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "15721665305636481516"
"version": "0.28.1.47646",
"templateHash": "16920601274318465194"
},
"name": "CDN Profiles Custom Domains",
"description": "This module deploys a CDN Profile Custom Domains.",
Expand Down Expand Up @@ -121,4 +121,4 @@
"value": "[resourceGroup().name]"
}
}
}
}
1 change: 1 addition & 0 deletions avm/res/cdn/profile/endpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ Endpoint tags.
| `name` | string | The name of the endpoint. |
| `resourceGroupName` | string | The name of the resource group the endpoint was created in. |
| `resourceId` | string | The resource ID of the endpoint. |
| `uri` | string | The uri of the endpoint. |

## Cross-referenced modules

Expand Down
3 changes: 3 additions & 0 deletions avm/res/cdn/profile/endpoint/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,6 @@ output location string = endpoint.location

@description('The properties of the endpoint.')
output endpointProperties object = endpoint.properties

@description('The uri of the endpoint.')
output uri string = 'https://${endpoint.properties.hostName}'
17 changes: 12 additions & 5 deletions avm/res/cdn/profile/endpoint/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "2906172435071993445"
"version": "0.28.1.47646",
"templateHash": "265552218697992746"
},
"name": "CDN Profiles Endpoints",
"description": "This module deploys a CDN Profile Endpoint.",
Expand Down Expand Up @@ -125,8 +125,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "3665403791951260301"
"version": "0.28.1.47646",
"templateHash": "3976201598135370414"
},
"name": "CDN Profiles Endpoints Origins",
"description": "This module deploys a CDN Profile Endpoint Origin.",
Expand Down Expand Up @@ -321,6 +321,13 @@
"description": "The properties of the endpoint."
},
"value": "[reference('endpoint')]"
},
"uri": {
"type": "string",
"metadata": {
"description": "The uri of the endpoint."
},
"value": "[format('https://{0}', reference('endpoint').hostName)]"
}
}
}
}
6 changes: 3 additions & 3 deletions avm/res/cdn/profile/endpoint/origin/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "3665403791951260301"
"version": "0.28.1.47646",
"templateHash": "3976201598135370414"
},
"name": "CDN Profiles Endpoints Origins",
"description": "This module deploys a CDN Profile Endpoint Origin.",
Expand Down Expand Up @@ -158,4 +158,4 @@
"value": "[reference('endpoint', '2021-06-01', 'full').location]"
}
}
}
}
9 changes: 9 additions & 0 deletions avm/res/cdn/profile/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,15 @@ output profileType string = profile.type
@description('The location the resource was deployed into.')
output location string = profile.location

@description('The name of the CDN profile endpoint.')
output endpointName string = !empty(endpointProperties) : profile_endpoint.outputs.name : ''

@description('The resource ID of the CDN profile endpoint.')
output endpointId string = !empty(endpointProperties) : profile_endpoint.outputs.resourceId : ''

@description('The uri of the CDN profile endpoint.')
output uri string = !empty(endpointProperties) : profile_endpoint.outputs.uri : ''

// =============== //
// Definitions //
// =============== //
Expand Down
41 changes: 38 additions & 3 deletions avm/res/cdn/profile/main.json
AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "1004296684432790978"
"templateHash": "11204605235685505373"
},
"name": "CDN Profiles",
"description": "This module deploys a CDN Profile.",
Expand Down Expand Up @@ -337,7 +337,7 @@
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "646975231992417020"
"templateHash": "265552218697992746"
},
"name": "CDN Profiles Endpoints",
"description": "This module deploys a CDN Profile Endpoint.",
Expand Down Expand Up @@ -652,6 +652,13 @@
"description": "The properties of the endpoint."
},
"value": "[reference('endpoint')]"
},
"uri": {
"type": "string",
"metadata": {
"description": "The uri of the endpoint."
},
"value": "[format('https://{0}', reference('endpoint').hostName)]"
}
}
}
Expand Down Expand Up @@ -1656,7 +1663,7 @@
"_generator": {
"name": "bicep",
"version": "0.28.1.47646",
"templateHash": "2563478312676565785"
"templateHash": "12134994933996412108"
},
"name": "CDN Profiles AFD Endpoints",
"description": "This module deploys a CDN Profile AFD Endpoint.",
Expand Down Expand Up @@ -2081,6 +2088,13 @@
"description": "The location the resource was deployed into."
},
"value": "[reference('afdEndpoint', '2023-05-01', 'full').location]"
},
"routes": {
"type": "array",
"metadata": {
"description": "The list of routes assigned to the AFD endpoint."
},
"value": "[coalesce(parameters('routes'), createArray())]"
}
}
}
Expand Down Expand Up @@ -2128,6 +2142,27 @@
"description": "The location the resource was deployed into."
},
"value": "[reference('profile', '2023-05-01', 'full').location]"
},
"endpointName": {
"type": "string",
"metadata": {
"description": "The name of the CDN profile endpoint."
},
"value": "[if(empty(parameters('endpointProperties')), '', reference('profile_endpoint').outputs.name.value)]"
},
"endpointId": {
"type": "string",
"metadata": {
"description": "The resource ID of the CDN profile endpoint."
},
"value": "[if(empty(parameters('endpointProperties')), '', reference('profile_endpoint').outputs.resourceId.value)]"
},
"uri": {
"type": "string",
"metadata": {
"description": "The uri of the CDN profile endpoint."
},
"value": "[if(empty(parameters('endpointProperties')), '', reference('profile_endpoint').outputs.uri.value)]"
}
}
}
10 changes: 5 additions & 5 deletions avm/res/cdn/profile/origingroup/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "12438540618132459307"
"version": "0.28.1.47646",
"templateHash": "767830983281905975"
},
"name": "CDN Profiles Origin Group",
"description": "This module deploys a CDN Profile Origin Group.",
Expand Down Expand Up @@ -142,8 +142,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "8566106020570825253"
"version": "0.28.1.47646",
"templateHash": "16416786424096977239"
},
"name": "CDN Profiles Origin",
"description": "This module deploys a CDN Profile Origin.",
Expand Down Expand Up @@ -331,4 +331,4 @@
"value": "[reference('profile', '2023-05-01', 'full').location]"
}
}
}
}
6 changes: 3 additions & 3 deletions avm/res/cdn/profile/origingroup/origin/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "8566106020570825253"
"version": "0.28.1.47646",
"templateHash": "16416786424096977239"
},
"name": "CDN Profiles Origin",
"description": "This module deploys a CDN Profile Origin.",
Expand Down Expand Up @@ -157,4 +157,4 @@
"value": "[resourceGroup().name]"
}
}
}
}
10 changes: 5 additions & 5 deletions avm/res/cdn/profile/ruleset/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "5891069247146856543"
"version": "0.28.1.47646",
"templateHash": "6477030276001558789"
},
"name": "CDN Profiles Rule Sets",
"description": "This module deploys a CDN Profile rule set.",
Expand Down Expand Up @@ -91,8 +91,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "4690708071413750601"
"version": "0.28.1.47646",
"templateHash": "13457744126513087238"
},
"name": "CDN Profiles Rules",
"description": "This module deploys a CDN Profile rule.",
Expand Down Expand Up @@ -230,4 +230,4 @@
"value": "[resourceGroup().name]"
}
}
}
}
6 changes: 3 additions & 3 deletions avm/res/cdn/profile/ruleset/rule/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "4690708071413750601"
"version": "0.28.1.47646",
"templateHash": "13457744126513087238"
},
"name": "CDN Profiles Rules",
"description": "This module deploys a CDN Profile rule.",
Expand Down Expand Up @@ -117,4 +117,4 @@
"value": "[resourceGroup().name]"
}
}
}
}
6 changes: 3 additions & 3 deletions avm/res/cdn/profile/secret/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.26.170.59819",
"templateHash": "364931243138434002"
"version": "0.28.1.47646",
"templateHash": "11180937853362920611"
},
"name": "CDN Profiles Secret",
"description": "This module deploys a CDN Profile Secret.",
Expand Down Expand Up @@ -99,4 +99,4 @@
"value": "[resourceGroup().name]"
}
}
}
}