Configuring tags through Azure ARM template

Hi there,

I’m using the Octopus Deploy Extension in Azure ARM templates to configure the server in octopus with the relevant tags. I’ve been able to add the tenant tags to the server but struggling to add a couple more that we have in the Associated Tenants section of the server.

Here’s my extension config so far but stumped on getting the CRM deploy and Target App Server added.

 {
                            "name": "Octopus.Tentacle",
                            "properties": {
                                "publisher": "OctopusDeploy.Tentacle",
                                "type": "OctopusDeployWindowsTentacle",
                                "typeHandlerVersion": "2.0",
                                "autoUpgradeMinorVersion": true,
                                "settings": {
                                    "OctopusServerUrl": "https://myurl",
                                    "Environments": [
                                        "Azure Test"
                                    ],
                                    "Roles": [
                                        "myapp1",
                                        "myapp2",
                                        "myapp3"
                                    ],
                                    "CommunicationMode": "Poll",
                                    "MachinePolicy": "Default Machine Policy",
                                    "Port": 10943,
                                    "Tenants": [
                                        "tenant1",
                                        "tenant2",
                                        "tenant3"
                                    ]
                                },
                                "protectedSettings": {
                                    "ApiKey": "myapp2MYAPIKEY"
                                }
                            }

Had a look through these links with no success:


Hi John,

Thanks for getting in touch! You can add tenant tags here by specifying them as an array of strings under the TenantTags setting, using the syntax “Tenant Tag Set Name/Tenant Tag Name”. Your ARM template would look something like below (tenant tags being immediately beneath your Tenants settings, and you would need to replace “Tenant Tag Name” with your tenant tag name).

{
                            "name": "Octopus.Tentacle",
                            "properties": {
                                "publisher": "OctopusDeploy.Tentacle",
                                "type": "OctopusDeployWindowsTentacle",
                                "typeHandlerVersion": "2.0",
                                "autoUpgradeMinorVersion": true,
                                "settings": {
                                    "OctopusServerUrl": "https://myurl",
                                    "Environments": [
                                        "Azure Test"
                                    ],
                                    "Roles": [
                                        "myapp1",
                                        "myapp2",
                                        "myapp3"
                                    ],
                                    "CommunicationMode": "Poll",
                                    "MachinePolicy": "Default Machine Policy",
                                    "Port": 10943,
                                    "Tenants": [
                                        "tenant1",
                                        "tenant2",
                                        "tenant3"
                                    ],
                                    "TenantTags": [
                                        "CRM deploy targets/Tenant Tag Name",
                                        "Target App Server/Tenant Tag Name"
                                    ]
                                },
                                "protectedSettings": {
                                    "ApiKey": "myapp2MYAPIKEY"
                                }
                            }

I hope that helps! Let me know how you go or if you have any further questions going forward. :slight_smile:

Best regards,

Kenny