chef-partners/azure-chef-extension

Using chef tags with ARM deployment

Closed this issue · 6 comments

Hello team, I didn't find any examples of using chef tags with ARM template deployment.

can I use chef tags with the extension?

If you are talking about --tags option in knife bootstrap you can try passing that in bootstrap_options hash in azure-chef-extension.

thanks @Vasu1105

I have tried this but it didn't work. am I doing it wrong?

                    "bootstrap_options": {
                        "chef_server_url": "[parameters('chef_server_url')]",
                        "node_ssl_verify_mode": "[parameters('node_ssl_verify_mode')]",
                        "environment": "[parameters('environment')]",
                        "tags": "Azure,East-US2",
                        "validation_client_name": "[parameters('chef_validation_client_name')]"
                    },

Okay @raghureddy45. We will look into this.

@raghureddy45 you can use tags option with 'custom_json_attr' option as follows

'bootstrap_options':{
'chef_server_url': ' <your-chef-server-url>', 
'chef_node_name': '<your-node-name>'},
 'CHEF_LICENSE':'accept',
 'runlist': '[recipe[new::default]]',
 'custom_json_attr': {'tags':['tag1','tag2','tag3']}}'

If you want to use it with policyfile you can use it as

'custom_json_attr': { 'policy_group': 'ayu-policygroup', 'policy_name': 'ayushpolicy','tags':['tag1','tag2','tag3']}

@raghureddy45 any updates ?

@raghureddy45 As discussed above you can provide tags in the custom_json_attr to work. I am closing this issue feel free to open it if the issue still exist.