Mesut Tekin
Mesut Tekin

Reputation: 3

HTTPNotFound error while running "terraspace up demo"

I'm tring to create a demo environment with terraspace on Azure. So I have installed and set up environment variable as it is descriped on terraspace doc. when I run "terraspace up demo" it creates resource group and then fails with bellow error. what would be the problem.

Current directory: .terraspace-cache/eastus/dev/stacks/aks Creating Resource Group dev-eastus... Exception Armrest::Error: #Net::HTTPNotFound:0x00007f0e9b0f39c0 /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/armrest-0.1.3/lib/armrest/api/base.rb:43:in request' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/armrest-0.1.3/lib/armrest/api/base.rb:18:in block (2 levels) in class:Base' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/armrest-0.1.3/lib/armrest/services/storage_account.rb:12:in check_name_availability' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace_plugin_azurerm-0.7.0/lib/terraspace_plugin_azurerm/interfaces/backend/storage_account.rb:17:in exist?' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace_plugin_azurerm-0.7.0/lib/terraspace_plugin_azurerm/interfaces/backend/storage_account.rb:6:in create' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace_plugin_azurerm-0.7.0/lib/terraspace_plugin_azurerm/interfaces/backend.rb:10:in call' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/terraform/runner/backend.rb:25:in create' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/terraform/runner.rb:51:in block in terraform' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/hooks/builder.rb:25:in run_hooks' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/hooks/concern.rb:6:in run_hooks' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/terraform/runner.rb:50:in terraform' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/terraform/runner.rb:15:in block in run' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/terraform/runner.rb:97:in time_took' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/terraform/runner.rb:14:in run' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/init.rb:23:in block in init' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/3.1.0/timeout.rb:107:in block in timeout' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/3.1.0/timeout.rb:36:in block in catch' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/3.1.0/timeout.rb:36:in catch' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/3.1.0/timeout.rb:36:in catch' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/3.1.0/timeout.rb:123:in timeout' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/init.rb:22:in init' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/init.rb:12:in run' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/commander.rb:10:in run' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/up.rb:49:in apply' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/up.rb:26:in perform' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/up.rb:11:in run' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli.rb:236:in up' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/command.rb:27:in run' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in invoke_command' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor.rb:392:in dispatch' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/command.rb:76:in dispatch' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/thor-1.2.2/lib/thor/base.rb:485:in start' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/lib/terraspace/cli/concern.rb:65:in start' /opt/hostedtoolcache/Ruby/3.1.4/x64/lib/ruby/gems/3.1.0/gems/terraspace-2.2.6/exe/terraspace:7:in <top (required)>' /opt/hostedtoolcache/Ruby/3.1.4/x64/bin/terraspace:25:in load' /opt/hostedtoolcache/Ruby/3.1.4/x64/bin/terraspace:25:in '

I tried different regions like uksouth and still I got same error.

Upvotes: 0

Views: 180

Answers (1)

UmFuZG9t
UmFuZG9t

Reputation: 1

Encountered the issue on two different contexts, here are the solutions that worked for me :

  • Verification and correction of the config/terraform/backend.rb content, ensure every backend information is correct and refers to an existing backend

  • Removal of backend.tf and provider.tf files in app/stacks/iac-xxxx directories, they were added by error and were causing conflicts with the config/terraform/backend.rb and config/terraform/provider.tf files

Hope this will help people coming to this thread like me

Upvotes: 0

Related Questions