You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When using a virtualdir (https://domain/directory) for your Octopus Deploy instance, Terraform will throw a "The resource you requested was not found. []" error when attempting an apply. It looks like because the links contain the virtualdir, we're double-appending it (http://localhost/virtual/virtual/api....), resulting in a 404.
Steps to reproduce
Add a Octopus binding for the following URLs: http://localhost, http://localhost/virtual.
Configure a sample tf file (see below) using the virtualdir URL in the Provider address directive.
Attempt to apply.
💥
Expected behavior
Apply will respect the VirtualDir and apply as expected.
Logs and other supporting information
Apply log:
Failed with exit code: 1
Error: Octopus API error: The resource you requested was not found. []
with octopusdeploy_deployment_process.database,
on template.tf line 15, in resource "octopusdeploy_deployment_process" "database":
15: resource "octopusdeploy_deployment_process" "database" {
Octopus Server logged HTTP Requests:
2024-08-09 11:28:18.3446 11128 140 INFO "HTTP" "GET" to "localhost""/api/Spaces-1/projects/Projects-1782" "completed" with 200 in 00:00:00.0092378 (9ms) by "x"
2024-08-09 11:28:18.3446 11128 140 INFO "HTTP" "GET" to "localhost""/api/Spaces-1/deploymentprocesses/deploymentprocess-Projects-1782" "completed" with 200 in 00:00:00.0085337 (8ms) by "x"
2024-08-09 11:28:18.3446 11128 140 INFO "HTTP" "PUT" to "localhost""/virtual/api/Spaces-1/projects/Projects-1782/deploymentprocesses" "completed" with 404 in 00:00:00.0044581 (4ms) by "x"
Note that the PUT includes the virtualdir, which would typically be stripped in the logs. You can see this in the preceding GET.
Environment and versions:
Octopus Server Version: 2023.3.13181
Terraform Version: 1.9.4
Octopus Terraform Provider Version: 0.22.1 and 0.30.0-beta1
Additional context
terraform {
required_providers {
octopusdeploy = {
source = "OctopusDeployLabs/octopusdeploy"
}
}
}
provider "octopusdeploy" {
address = "http://localhost/virtual"
api_key = "API-xxx"
space_id = "Spaces-1"
}
resource "octopusdeploy_deployment_process" "database" {
project_id = "Projects-1"
space_id = "Spaces-1"
step {
condition = "Success"
name = "Hello world (using PowerShell)"
package_requirement = "LetOctopusDecide"
start_trigger = "StartAfterPrevious"
run_script_action {
can_be_used_for_project_versioning = false
condition = "Success"
is_disabled = false
is_required = true
name = "Hello world (using PowerShell)"
script_body = <<-EOT
Write-Host 'Hello world, using PowerShell 1'
#TODO: Experiment with steps of your own :)
Write-Host '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
EOT
run_on_server = true
}
}
step {
condition = "Success"
name = "Hello world (using Bash)"
package_requirement = "LetOctopusDecide"
start_trigger = "StartWithPrevious"
run_script_action {
can_be_used_for_project_versioning = false
condition = "Success"
is_disabled = false
is_required = true
name = "Hello world (using Bash)"
script_body = <<-EOT
echo 'Hello world, using Bash 2'
#TODO: Experiment with steps of your own :)
echo '[Learn more about the types of steps available in Octopus](https://g.octopushq.com/OnboardingAddStepsLearnMore)'
EOT
run_on_server = true
}
}
}
The text was updated successfully, but these errors were encountered:
Describe the bug
When using a virtualdir (https://domain/directory) for your Octopus Deploy instance, Terraform will throw a "The resource you requested was not found. []" error when attempting an apply. It looks like because the links contain the virtualdir, we're double-appending it (
http://localhost/virtual/virtual/api....
), resulting in a 404.Steps to reproduce
http://localhost
,http://localhost/virtual
.Expected behavior
Apply will respect the VirtualDir and apply as expected.
Logs and other supporting information
Apply log:
Octopus Server logged HTTP Requests:
Note that the PUT includes the virtualdir, which would typically be stripped in the logs. You can see this in the preceding GET.
Environment and versions:
2023.3.13181
1.9.4
0.22.1
and0.30.0-beta1
Additional context
The text was updated successfully, but these errors were encountered: