Please select one or more roles that '<step name>' step will apply to

Hello team,

I try to model release process with use of step template
“Deploy Child Octopus Deploy Project” v22
and
“Jenkins - Queue Job” v5
on Octopus Cloud 2021.2.7660
I configure resources in terraform and each time I do clean deployment, it goes smooth.
The problem comes when I update existing configuration - for steps where these templates are being used, I receive “Please select one or more roles that '<step name>' step will apply to.”, which breaks the consecutive terraform apply invocations. I want to use worker pool (cloud default currently) and I reflect this in configuration of each of these steps, but there isn’t a way to configure machine role for these steps - when “run once on a worker” option is chosen. Should octopus expect a role for worker pool configuration at all?

Hi @JaroslawG,

Welcome and thanks for reaching out!

I’m sorry, but I’m not sure if I’m entirely following what you’re trying to accomplish. When you specify a step to run on a worker pool, that’s all you need to do. You specify for it to run on a worker from a worker pool and what pool to use, like below:

Here’s some more information on workers: Workers - Octopus Deploy and a good blog post on the matter: Workers explained - Octopus Deploy.

Usually, you specify roles when you are deploying packages or running a script against a target role. The Deploy Child Octopus Deploy Project will make API calls into your Octopus instance to deploy other projects. Are you using it to deploy one of those projects which are targeting a role? Here’s a good article on how that step template works: Better release management with Octopus Deploy - Octopus Deploy

Are you running Terraform from within Octopus as well?

Thanks,
Mark

@mark.reeder , thanks for your answers.

your statements are correct in terms of UI config and I expected this behaviour while configuring actions through terraform. Also - my underlying services to be triggered from Deploy Child Octopus Project was configured to use worker pools, so there were no places to configure target roles for them, however terraform apply was complaining about it.
Unfortunately terraform provider docs showcases this configuration based on generic action which (while updating process configuration) raises error from subject of this thread.
I overcame this by switching to run_script_action - it now does terraform apply without complaining about roles. It came out though that run_script_action doesn’t allow to set specific worker pool id (which would lock me in default one) but I see newest provider version (0.7.60) introduced these attributes already, which solved my problem this time.

PS. I don’t use terraform within Octopus to configure Octopus.

Thanks,
JG

Ah, okay. I understand what you were trying to do now. Sorry for the misunderstanding the first time. So were you able to get your problem resolved with the latest provider version? Sounds like so, but if you are still running into issues, please let me know and I’ll dig into it further.

Thanks!
Mark