Skip to content

Commit 5512fbf

Browse files
MarkAnthFarrMarkFarr-MSckittel
authored
Added Customer Usage Attribute - Cleaned up unneeded files, updated ReadMe with opt out instructions. (#39)
* Added Customer Usage Attribution * Clean up of files - ReadMe update * Delete infra-as-code/bicep/customerUsageAttribution/README.md File not needed * Update README.md Co-authored-by: Chad Kittel <chad.kittel@gmail.com> * Update infra-as-code/bicep/customerUsageAttribution/cuaIdResourceGroup.bicep Co-authored-by: Chad Kittel <chad.kittel@gmail.com> * Update infra-as-code/bicep/main.bicep Co-authored-by: Chad Kittel <chad.kittel@gmail.com> * Update infra-as-code/bicep/main.bicep Co-authored-by: Chad Kittel <chad.kittel@gmail.com> * Update infra-as-code/bicep/main.bicep Co-authored-by: Chad Kittel <chad.kittel@gmail.com> * Update infra-as-code/bicep/main.bicep Co-authored-by: Chad Kittel <chad.kittel@gmail.com> --------- Co-authored-by: Mark Farrugia <markfarr@microsoft.com> Co-authored-by: Chad Kittel <chad.kittel@gmail.com>
1 parent 7e3aeb2 commit 5512fbf

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ The following steps are required to deploy the infrastructure from the command l
9797

9898
1. Create a resource group and deploy the infrastructure.
9999

100+
*There is an optional tracking ID on this deployment. To opt out of its use, add the following parameter to the deployment code below: `-p telemetryOptOut true`.*
101+
100102
```bash
101103
RESOURCE_GROUP=rg-chat-basic-${LOCATION}
102104
az group create -l $LOCATION -n $RESOURCE_GROUP
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
targetScope = 'resourceGroup'
2+
3+
// This is an empty deployment by design
4+
// Reference: https://learn.microsoft.com/partner-center/marketplace-offers/azure-partner-customer-usage-attribution

infra-as-code/bicep/main.bicep

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@ param baseName string
1111
@maxLength(36)
1212
param yourPrincipalId string
1313

14+
@description('Set to true to opt-out of deployment telemetry.')
15+
param telemetryOptOut bool = false
16+
17+
// Customer Usage Attribution Id
18+
var varCuaid = '6aa4564a-a8b7-4ced-8e57-1043a41f4747'
19+
1420
// ---- Log Analytics workspace ----
1521
resource logWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' = {
1622
name: 'log-${baseName}'
@@ -104,3 +110,10 @@ module webappModule 'webapp.bicep' = {
104110
aiStudio
105111
]
106112
}
113+
114+
// Optional Deployment for Customer Usage Attribution
115+
module customerUsageAttributionModule 'customerUsageAttribution/cuaIdResourceGroup.bicep' = if (!telemetryOptOut) {
116+
#disable-next-line no-loc-expr-outside-params // Only to ensure telemetry data is stored in same location as deployment. See https://github.com/Azure/ALZ-Bicep/wiki/FAQ#why-are-some-linter-rules-disabled-via-the-disable-next-line-bicep-function for more information
117+
name: 'pid-${varCuaid}-${uniqueString(resourceGroup().location)}'
118+
params: {}
119+
}

0 commit comments

Comments
 (0)