Octopus Terraform provider issues

Hi team,
I am using Octopus Deploy Terraform provider for creating some modules, which include create a new environment, space, users etc.
When i first hit terraform apply all works well. If i make some changes and hit again apply, there are errors that the environments I want to create are already there etc. Isn’t the way this provider works the same as aws instance provider, where Terraform state file is the reference and only applies if any changes occurred without popping any errors if some of the configurations remain unchanged?
Thank you.

Hi @1n3l4st1c,

Thanks for getting in touch! Sorry to see you’re hitting this unexpected issue. I had a quick dig to see if I could spot any known issues/solutions, but it seems to be dependent on the specific error message you’re seeing. Would you be willing to send through the full error log to give me a better look at the context and exact error and what it’s referencing? I’m hoping that will help point us in the right direction. :slight_smile:

Feel free to mark this thread as private, or send any sensitive info to support@octopus.com and I can pick it up from there.

I look forward to hearing back!

Best regards,

Kenny

I’m also seeing similar issues, small changes related to almost any name, ID, or other undocumented sensitive properties, will prompt the terraform plugin to decide it has to make new things, and the plugin can even get its wires crossed when simply importing an existing project and trying to change its name to fix capitalization!

Its had to search for these kinds of issues on github because the plugin seems so heavily based on passthrough to the backend server via REST API Calls which makes it hard to write good bug reports even when running with TF_LOG=TRACE due to how the logging (or lack thereof… even with the trace level logging I see no debugging information about the Octopus Deploy API calls, unlike AWS which prints the entire API call out when set to trace level logging) has been implemented leaving me completely in the dark as to the true cause of the behaviour.

1 Like