Cloud Target Discovery - Multiple roles

I am starting to use Cloud Target Discovery (in Azure) and have a couple of scenarios where I need multiple roles against a single deployment target.

Firstly, resources in the high availability region have a role of secondary for variable scoping.

Secondly, we have a product where multiple projects are deployed to a single App Service but only in the lower environments. In the higher environments, they each have their own App Service.

Is there a delimiter in the octopus-role tag to support multiple roles?

Hi @amclachlan,

Thanks for getting in touch! Great question, though unfortunately it doesn’t look like this is supported at the moment. Quoting the documentation:

Note that only a single value is supported in tags at the moment.

I’ve asked the team for any update on when this might be supported, so I’ll let you know any info I get back.

Let me know if you have any questions or concerns going forward.

Best regards,


Thanks for the quick reply Kenny. Please let me know what you discover!

1 Like

Hi @amclachlan,

I’m the Product Manager for the Steps team responsible for this feature. We originally looked at having multiple target roles but dropped that complexity for our initial EAP as we wanted to get a better understanding of these more detailed scenarios before attempting to address them.

The variable scoping scenario you’ve outlined is helpful.

We want to make sure we devise an approach to specifying multiple values in these tags that is consistent. My initial proposal would be to allow progressive complexity:

  • For a single value, you would just specify it.
  • For multiple values, use commas to separate values. For readability, we’d likely trim whitespace.
  • For more complicated values, use JSON syntax with either a JSON string or an array or JSON strings. This would provide reasonably well-understood patterns for escaping values to support more complicated scenarios.

Do you have any feedback on the above approach? We could (and probably would) start with just adding the comma-separated method and only implement the final JSON approach to address a specific need. We should be able to accommodate this for target roles when we move this to general availability.

I’m always interested in any feedback you have on the Cloud Target Discovery feature and hearing more about how you plan to use it.


Rhys Parry

Hi @rhys.parry,

For my scenarios, comma-separated would work just fine. Off the top of my head, I can’t image a scenario that would require JSON.



1 Like

Thanks for the feedback @amclachlan

I’ll keep it in mind as we continue to work on Cloud Target Discovery.