Skip to content

Commit ce78bdf

Browse files
galiachengedburns
authored andcommitted
# This is a combination of 24 commits.
# This is the 1st commit message: single node: modify UI and template increase pom upgrade Microsoft.Resources/deployments API version add toolTip for tag control. fix artifact version # This is the commit message #2: admin offer: modify UI and templates # This is the commit message #3: guidance for tagging resource # This is the commit message oracle#4: fix function error in admin/mainTemplate.json # This is the commit message oracle#5: use aka link for maven download url # This is the commit message oracle#6: fix mavn installation path # This is the commit message oracle#7: use actions/upload-artifact: v4 # This is the commit message oracle#8: modify UI and templates in cluster offer # This is the commit message oracle#9: fix tag issue in _pswlessDbTemplate.json # This is the commit message oracle#10: use download-artifact@v4 # This is the commit message oracle#11: format mainTemplate.json in cluster offer # This is the commit message oracle#12: fix variable reference issue # This is the commit message oracle#13: fix template error in cluster offer # This is the commit message oracle#14: On branch tags-for-resources Include a little text about Tags. modified: resources/doc/guidance-for-tagging-resource.md Signed-off-by: Ed Burns <[email protected]> # This is the commit message oracle#15: On branch tags-for-resources Reference the PR. modified: resources/doc/guidance-for-tagging-resource.md Signed-off-by: Ed Burns <[email protected]> # This is the commit message oracle#16: On branch tags-for-resources Explain why only some occurrences of the resource type identifiers are filtered. modified: resources/azure-common.properties Signed-off-by: Ed Burns <[email protected]> # This is the commit message oracle#17: On branch tags-for-resources Comment copy/pasted behavior. modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/mainTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/mainTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls/src/main/arm/mainTemplate.json Signed-off-by: Ed Burns <[email protected]> # This is the commit message oracle#18: On branch tags-for-resources Fix DRY violation: define label in one place. modified: resources/azure-common.properties modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/mainTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/_dbTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/_dnszones/_createDNSZonesTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/_dnszones/_uamiAndRoleAssignment.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/_dnszones/_updateDNSZonesTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/_installJdbcLibsTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/_keyVaultNestedTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/_pswlessDbTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/aadNestedTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/adminTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/adminTemplateForCustomSSL.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/dbTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/dnszonesTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-admin/src/main/arm/nestedtemplates/elkNestedTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/mainTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_dbTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_dnszones/_createDNSZonesTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_dnszones/_uamiAndRoleAssignment.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_dnszones/_updateDNSZonesTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_installJdbcLibsTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_keyvault/_keyvaultWithExistingCertTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_keyvault/_keyvaultWithNewCertTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_keyvaultAdapterTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_keyvaultAppGatewayConnectorTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_keyvaultSSLConfigTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/_pswlessDbTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/aadNestedTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/appGatewayNestedTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/clusterCustomSSLTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/clusterTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/coherenceTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/dbTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/dnszonesTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls-cluster/arm-oraclelinux-wls-cluster/src/main/arm/nestedtemplates/elkNestedTemplate.json modified: weblogic-azure-vm/arm-oraclelinux-wls/src/main/arm/mainTemplate.json Signed-off-by: Ed Burns <[email protected]> # This is the commit message oracle#19: Support tagging resource in WLS AKS offer (oracle#328) * modify aks offer to support tag * debug template * specify download path * add identifier.workspaces * tag vm and vm extension that are created with cli * test bicep 0.26.54 * fix empty vm tags * fix file share name * apply tags to agent pool * Tag for Microsoft.Monitor/accounts * doc for aks tag * clean up source code for tagging resources in aks offer. * increase pom version * add comment for bicep user defined function. # This is the commit message oracle#20: modify ui definition to show the java option element (oracle#332) increase pom # This is the commit message oracle#21: On branch edburns-msft-dd-2321245-empty-resource-group apply the "allowExisting" property. modified: pom.xml modified: weblogic-azure-aks/src/main/arm/createUiDefinition.json Signed-off-by: Ed Burns <[email protected]> # This is the commit message oracle#22: use the properties Zhihao provided. # This is the commit message oracle#23: On branch edburns-msft-dd-2321245-empty-resource-group @backwind1233 pointed out the property was in the incorrect place. modified: pom.xml modified: weblogic-azure-aks/src/main/arm/createUiDefinition.json Signed-off-by: Ed Burns <[email protected]> # This is the commit message oracle#24: enable deployment to non-empty resource groups
1 parent 200bb5c commit ce78bdf

File tree

87 files changed

+1452
-164
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1452
-164
lines changed

.github/workflows/testWlsAksWithDependencyCreation.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,9 +226,10 @@ jobs:
226226
with:
227227
path: weblogic-azure
228228
- name: Download artifact for deployment
229-
uses: actions/download-artifact@v1
229+
uses: actions/download-artifact@v4
230230
with:
231231
name: ${{needs.preflight.outputs.artifactName}}
232+
path: ${{needs.preflight.outputs.artifactName}}
232233
- uses: azure/login@v1
233234
id: azure-login
234235
with:
@@ -289,9 +290,8 @@ jobs:
289290
uses: azure/CLI@v1
290291
with:
291292
azcliversion: ${{ env.azCliVersion }}
292-
inlineScript: |
293-
artifactName=${{ needs.preflight.outputs.artifactName }}
294-
293+
inlineScript: |
294+
artifactName=${{ needs.preflight.outputs.artifactName }}
295295
az deployment group create \
296296
--verbose \
297297
--resource-group ${{ env.resourceGroupForWlsAks }} \

.github/workflows/testWlsAksWithoutDependencyCreation.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
dbName:
2828
description: 'Name of the database. Get from another pipeline run'
2929
required: true
30+
vmSize:
31+
description: 'The VM size for the AKS pool'
32+
required: true
33+
default: Standard_D2s_v3
3034
# sample cURL
3135
# curl --verbose -X POST https://api.github.com/repos/<github_user>/weblogic-azure/dispatches -H 'Accept: application/vnd.github.everest-preview+json' -H 'Authorization: token <personal_access_token>' --data '<request_data>'
3236
# sample <request_data>
@@ -40,6 +44,7 @@ env:
4044
location: eastus
4145
dbAdminUser: weblogic
4246
dbPassword: ${{ secrets.DB_PASSWORD }}
47+
dbServerName: weblogicdb
4348
ocrSSOPSW: ${{ secrets.ORC_SSOPSW }}
4449
ocrSSOUser: ${{ secrets.ORC_SSOUSER }}
4550
wdtRuntimePassword: ${{ secrets.WDT_RUNTIMEPSW}}
@@ -189,9 +194,10 @@ jobs:
189194
with:
190195
path: weblogic-azure
191196
- name: Download artifact for deployment
192-
uses: actions/download-artifact@v1
197+
uses: actions/download-artifact@v4
193198
with:
194199
name: ${{needs.preflight.outputs.artifactName}}
200+
path: ${{needs.preflight.outputs.artifactName}}
195201
- uses: azure/login@v1
196202
id: azure-login
197203
with:
@@ -238,7 +244,7 @@ jobs:
238244
"${cargoTrackerBlobUrl}" \
239245
${dbPassword} \
240246
${dbAdminUser} \
241-
jdbc:postgresql:\/\/${{ needs.preflight.outputs.dbName }}.postgres.database.azure.com:5432\/postgres \
247+
jdbc:postgresql:\/\/${{ needs.preflight.outputs.dbName }}.postgres.database.azure.com:5432\/${{ env.dbServerName }} \
242248
${location} \
243249
${ocrSSOPSW} \
244250
${ocrSSOUser} \

.github/workflows/testWlsVmAdmin.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ jobs:
223223
repository: ${{env.repoOwner}}/${{env.repoName}}
224224
path: ${{env.repoName}}
225225
- name: Download artifact for deployment
226-
uses: actions/download-artifact@v1
226+
uses: actions/download-artifact@v4
227227
with:
228228
name: ${{ needs.preflight.outputs.artifactName }}
229229

.github/workflows/testWlsVmCluster.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ jobs:
256256
repository: ${{env.repoOwner}}/${{env.repoName}}
257257
path: ${{env.repoName}}
258258
- name: Download artifact for deployment
259-
uses: actions/download-artifact@v1
259+
uses: actions/download-artifact@v4
260260
with:
261261
name: ${{ needs.preflight.outputs.artifactName }}
262262
- uses: azure/login@v1
@@ -713,7 +713,7 @@ jobs:
713713
--template-file ${artifactName}/nestedtemplates/coherenceTemplate.json
714714
715715
- name: Download artifact for deployment
716-
uses: actions/download-artifact@v1
716+
uses: actions/download-artifact@v4
717717
with:
718718
name: ${{ needs.preflight.outputs.addnodeArtifactName }}
719719

@@ -761,7 +761,7 @@ jobs:
761761
fi
762762
763763
- name: Download artifact for deployment
764-
uses: actions/download-artifact@v1
764+
uses: actions/download-artifact@v4
765765
with:
766766
name: ${{ needs.preflight.outputs.addCoherenceNodeArtifactName }}
767767

@@ -809,7 +809,7 @@ jobs:
809809
fi
810810
811811
- name: Download artifact for deployment
812-
uses: actions/download-artifact@v1
812+
uses: actions/download-artifact@v4
813813
with:
814814
name: ${{ needs.preflight.outputs.deletenodeArtifactName }}
815815
- name: Delete nodes from existing cluster

.github/workflows/testWlsVmDynamicCluster.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ jobs:
234234
repository: ${{env.repoOwner}}/${{env.repoName}}
235235
path: ${{env.repoName}}
236236
- name: Download artifact for deployment
237-
uses: actions/download-artifact@v1
237+
uses: actions/download-artifact@v4
238238
with:
239239
name: ${{ needs.preflight.outputs.artifactName }}
240240
- uses: azure/login@v1
@@ -537,7 +537,7 @@ jobs:
537537
--template-file ${artifactName}/nestedtemplates/coherenceTemplate.json
538538
539539
- name: Download artifact for deployment
540-
uses: actions/download-artifact@v1
540+
uses: actions/download-artifact@v4
541541
with:
542542
name: ${{ needs.preflight.outputs.addnodeArtifactName }}
543543

@@ -588,7 +588,7 @@ jobs:
588588
fi
589589
590590
- name: Download artifact for deployment
591-
uses: actions/download-artifact@v1
591+
uses: actions/download-artifact@v4
592592
with:
593593
name: ${{ needs.preflight.outputs.addCoherenceNodeArtifactName }}
594594

@@ -636,7 +636,7 @@ jobs:
636636
fi
637637
638638
- name: Download artifact for deployment
639-
uses: actions/download-artifact@v1
639+
uses: actions/download-artifact@v4
640640
with:
641641
name: ${{ needs.preflight.outputs.deletenodeArtifactName }}
642642
- name: Delete nodes from existing cluster

pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,12 @@
4040
<properties>
4141
<!-- versions start -->
4242
<!-- weblogic azure aks versions -->
43-
<version.wls-on-aks-azure-marketplace>1.0.81</version.wls-on-aks-azure-marketplace>
43+
<version.wls-on-aks-azure-marketplace>1.0.85</version.wls-on-aks-azure-marketplace>
4444
<!-- weblogic azure vm versions -->
45-
<version.arm-oraclelinux-wls>1.0.28</version.arm-oraclelinux-wls>
46-
<version.arm-oraclelinux-wls-admin>1.0.53</version.arm-oraclelinux-wls-admin>
47-
<version.arm-oraclelinux-wls-cluster>1.0.690000</version.arm-oraclelinux-wls-cluster>
48-
<version.arm-oraclelinux-wls-dynamic-cluster>1.0.52</version.arm-oraclelinux-wls-dynamic-cluster>
45+
<version.arm-oraclelinux-wls>1.0.30</version.arm-oraclelinux-wls>
46+
<version.arm-oraclelinux-wls-admin>1.0.55</version.arm-oraclelinux-wls-admin>
47+
<version.arm-oraclelinux-wls-cluster>1.0.710000</version.arm-oraclelinux-wls-cluster>
48+
<version.arm-oraclelinux-wls-dynamic-cluster>1.0.53</version.arm-oraclelinux-wls-dynamic-cluster>
4949
<!-- node versions -->
5050
<version.arm-oraclelinux-wls-dynamic-cluster-addnode>1.0.7</version.arm-oraclelinux-wls-dynamic-cluster-addnode>
5151
<version.arm-oraclelinux-wls-dynamic-cluster-addnode-coherence>1.0.3</version.arm-oraclelinux-wls-dynamic-cluster-addnode-coherence>

resources/azure-common.properties

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,27 @@ azure.cli.version=2.53.0
5050
# AzurePowerShell version
5151
azure.powershell.version=11.5
5252

53+
# These filters are used to implement tags for resources. Other occurrences of these resource type identifiers
54+
# are intentionally not filtered because doing so would unnecessarily complicate the code.
55+
identifier.accounts=Microsoft.Monitor/accounts
56+
identifier.applicationGateways=Microsoft.Network/applicationGateways
57+
identifier.availabilitySets=Microsoft.Compute/availabilitySets
58+
identifier.dnszones=Microsoft.Network/dnszones
59+
identifier.managedClusters=Microsoft.ContainerService/managedClusters
60+
identifier.networkInterfaces=Microsoft.Network/networkInterfaces
61+
identifier.networkSecurityGroups=Microsoft.Network/networkSecurityGroups
62+
identifier.publicIPAddresses=Microsoft.Network/publicIPAddresses
63+
identifier.privateEndpoints=Microsoft.Network/privateEndpoints
64+
identifier.registries=Microsoft.ContainerRegistry/registries
65+
identifier.storageAccounts=Microsoft.Storage/storageAccounts
66+
identifier.vaults=Microsoft.KeyVault/vaults
67+
identifier.virtualNetworks=Microsoft.Network/virtualNetworks
68+
identifier.virtualMachines=Microsoft.Compute/virtualMachines
69+
identifier.virtualMachinesExtensions=Virtual machine extension
70+
identifier.workspaces=Microsoft.OperationalInsights/workspaces
71+
identifier.deploymentScripts=Microsoft.Resources/deploymentScripts
72+
identifier.userAssignedIdentities=Microsoft.ManagedIdentity/userAssignedIdentities
73+
identifier.resourcesDeployment=Microsoft resources deployment
74+
label.tagsLabel=Tags for the resources.
75+
5376
azure.armBased.vmSize.list="Standard_D2plds_v5","Standard_D4plds_v5","Standard_D8plds_v5","Standard_D16plds_v5","Standard_D32plds_v5","Standard_D48plds_v5","Standard_D64plds_v5","Standard_D2pls_v5","Standard_D4pls_v5","Standard_D8pls_v5","Standard_D16pls_v5","Standard_D32pls_v5","Standard_D48pls_v5","Standard_D64pls_v5","Standard_D2pds_v5","Standard_D4pds_v5","Standard_D8pds_v5","Standard_D16pds_v5","Standard_D32pds_v5","Standard_D48pds_v5","Standard_D64pds_v5","Standard_D2ps_v5","Standard_D4ps_v5","Standard_D8ps_v5","Standard_D16ps_v5","Standard_D32ps_v5","Standard_D48ps_v5","Standard_D64ps_v5","Standard_E2pds_v5","Standard_E4pds_v5","Standard_E8pds_v5","Standard_E16pds_v5","Standard_E20pds_v5","Standard_E32pds_v5","Standard_E2ps_v5","Standard_E4ps_v5","Standard_E8ps_v5","Standard_E16ps_v5","Standard_E20ps_v5","Standard_E32ps_v5","Standard_B2pls_v2","Standard_B2ps_v2","Standard_B2pts_v2","Standard_B4pls_v2","Standard_B4ps_v2","Standard_B8pls_v2","Standard_B8ps_v2","Standard_B16pls_v2","Standard_B16ps_v2"
Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
2+
# Guidance on Applying Tags in Solution Templates
3+
4+
## What are Tags in this context and why are they useful?
5+
6+
Tags are arbitrary name=value pairs that can be associated with most Azure resources. Azure features such as Azure Policy can use Tags to enforce cloud governance policies. For more about tags, see [Use tags to organize your Azure resources and management hierarchy](https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/tag-resources).
7+
8+
## Step 1: Audit Resources Created in the Offer
9+
10+
To determine the resources that will be created in your offer, use the following commands based on the template type:
11+
12+
### For ARM Templates:
13+
Use the command below to list resource types:
14+
15+
```bash
16+
# Navigate to the offer folder
17+
cd offer-folder
18+
grep -rh "\"type\": \"Microsoft" --exclude="createUiDefinition.json" | sort | uniq | sed 's/^[ \t]*//'
19+
```
20+
21+
### For Bicep Templates:
22+
Use the command below to list resource types and remove duplicates:
23+
24+
```bash
25+
# Navigate to the offer folder
26+
cd offer-folder
27+
grep -rh "^resource" | grep "Microsoft." | sort | uniq | sed 's/^[ \t]*//'
28+
```
29+
30+
Identify which resources support tags and which do not. For resources not listed below, consult the ARM definition at [Azure Resource Manager templates](https://learn.microsoft.com/en-us/azure/templates/) to determine if tagging is supported. If the definition does not include a tags property, the resource does not support tags and tagging is not required for deployments.
31+
32+
### Resources that Support Tags:
33+
34+
The top-level resources will be listed in the Tag UI control. Sub-resources will inherit the same tags as their parent resources.
35+
36+
For example, in the UI definition, customers can specify tags for `Microsoft.KeyVault/vaults`, but not for `Microsoft.KeyVault/vaults/secrets`. For the deployment of `Microsoft.KeyVault/vaults/secrets`, the same tags applied to `Microsoft.KeyVault/vaults` will be used. This approach ensures a consistent tagging experience with Key Vault deployments in the Azure portal.
37+
38+
- Microsoft.Network/dnszones
39+
- Microsoft.Network/networkInterfaces
40+
- Microsoft.Network/networkSecurityGroups
41+
- Microsoft.Network/publicIPAddresses
42+
- Microsoft.Network/privateEndpoints
43+
- Microsoft.Storage/storageAccounts
44+
- Microsoft.KeyVault/vaults
45+
- Microsoft.KeyVault/vaults/secrets
46+
- Microsoft.Network/virtualNetworks
47+
- Microsoft.Compute/virtualMachines
48+
- Microsoft.Compute/virtualMachines/extensions
49+
- Microsoft.Resources/deploymentScripts
50+
- Microsoft.ManagedIdentity/userAssignedIdentities
51+
- Microsoft.Resources/deployments
52+
- Microsoft.Network/applicationGateways
53+
54+
### Resources that Do Not Support Tags:
55+
56+
- Microsoft.Storage/storageAccounts/fileServices
57+
- Microsoft.Storage/storageAccounts/fileServices/shares
58+
- Microsoft.Network/networkSecurityGroups/securityRules
59+
- Microsoft.Network/dnsZones/A
60+
- Microsoft.Network/dnszones/CNAME
61+
- Microsoft.Network/virtualNetworks/subnets
62+
- Microsoft.Authorization/roleAssignments
63+
- Microsoft.Network/loadBalancers/backendAddressPools
64+
- Microsoft.Network/applicationGateways/backendHttpSettingsCollection
65+
- Microsoft.Network/applicationGateways/frontendIPConfigurations
66+
- Microsoft.Network/applicationGateways/frontendPorts
67+
- Microsoft.Network/applicationGateways/gatewayIPConfigurations
68+
- Microsoft.Network/applicationGateways/httpListeners
69+
- Microsoft.Network/applicationGateways/probes
70+
- Microsoft.Network/applicationGateways/requestRoutingRules
71+
72+
## Step 2: Tag UI Control
73+
74+
Incorporate the [Microsoft.Common.TagsByResource UI element](https://learn.microsoft.com/en-us/azure/azure-resource-manager/managed-applications/microsoft-common-tagsbyresource?WT.mc_id=Portal-Microsoft_Azure_CreateUIDef0) to include resources that support tags.
75+
76+
## Step 3: Update the Template
77+
78+
Refer to this [pull request](https://github.com/oracle/weblogic-azure/pull/327/) as a guide for how to apply tags to the resource deployments.
79+
80+
Notes:
81+
82+
For AKS, make sure the tag is applied to agent pool and node pool. The whole structure looks like:
83+
84+
```bicep
85+
resource symbolicname 'Microsoft.ContainerService/managedClusters@2024-06-02-preview' = {
86+
name: 'string'
87+
location: 'string'
88+
tags: {
89+
tagName1: 'tagValue1'
90+
tagName2: 'tagValue2'
91+
}
92+
93+
...
94+
95+
agentPoolProfiles: {
96+
97+
...
98+
99+
tags: {
100+
tagName1: 'tagValue1'
101+
tagName2: 'tagValue2'
102+
}
103+
}
104+
}
105+
106+
```
107+
108+
See [Microsoft.ContainerService managedClusters - Bicep](https://learn.microsoft.com/en-us/azure/templates/microsoft.containerservice/managedclusters?pivots=deployment-language-bicep) for more information.
109+
110+
## Step 4: Testing
111+
112+
1. **Create a Test Offer:** Set up a test offer to validate the tagging process.
113+
114+
2. **Tag Settings:**
115+
- Apply a uniform tag to all resources.
116+
- Create specific tags for each resource, setting the tag value to the resource type (e.g., "tag1=storage account").
117+
118+
3. **Deploy the Offer:**
119+
120+
4. **Verify Tags:** Use the following command to verify that the resources have the correct tags applied:
121+
122+
```bash
123+
az resource list --resource-group <resource-group-name> --query "[].{Name:name, Type:type, Tags:tags}" -o json
124+
```
125+
126+
For example:
127+
128+
```shell
129+
az resource list --resource-group haiche-sn-tag-test --query "[].{Name:name, Type:type, Tags:tags}" -o json
130+
[
131+
{
132+
"Name": "0733ecolvm",
133+
"Tags": {
134+
"Tag0": "All",
135+
"Tag6": "storage account"
136+
},
137+
"Type": "Microsoft.Storage/storageAccounts"
138+
},
139+
{
140+
"Name": "olvm_PublicIP",
141+
"Tags": {
142+
"Tag0": "All",
143+
"Tag4": "public ip address"
144+
},
145+
"Type": "Microsoft.Network/publicIPAddresses"
146+
},
147+
{
148+
"Name": "wls-nsg",
149+
"Tags": {
150+
"Tag0": "All",
151+
"Tag3": "network security group"
152+
},
153+
"Type": "Microsoft.Network/networkSecurityGroups"
154+
},
155+
{
156+
"Name": "olvm_VNET",
157+
"Tags": {
158+
"Tag0": "All",
159+
"Tag8": "virtual network"
160+
},
161+
"Type": "Microsoft.Network/virtualNetworks"
162+
},
163+
{
164+
"Name": "olvm_NIC",
165+
"Tags": {
166+
"Tag0": "All",
167+
"Tag2": "network interface"
168+
},
169+
"Type": "Microsoft.Network/networkInterfaces"
170+
},
171+
{
172+
"Name": "WeblogicServerVM",
173+
"Tags": {
174+
"Tag0": "All",
175+
"Tag7": "virtual machine"
176+
},
177+
"Type": "Microsoft.Compute/virtualMachines"
178+
},
179+
{
180+
"Name": "WeblogicServerVM_OsDisk_1_d1fed748ccaa4cac81df9179e6dff325",
181+
"Tags": {
182+
"Tag0": "All",
183+
"Tag7": "virtual machine"
184+
},
185+
"Type": "Microsoft.Compute/disks"
186+
}
187+
]
188+
```
189+
190+
## Step 4: Known issues
191+
192+
The tag is not applied to resources that are not deployed through our template, so we cannot apply tags to them from the template.
193+
194+
Known resources:
195+
196+
- Microsoft.Compute/virtualMachines/extensions
197+
- OmsAgentForLinux
198+
- MDE.Linux
199+
- Microsoft.AlertsManagement/prometheusRuleGroups
200+
- Microsoft.Insights/dataCollectionEndpoints
201+
- Microsoft.Insights/dataCollectionRules

0 commit comments

Comments
 (0)