Hello,
Thank you for the great tool, and sorry if this question has been asked before.
Have you had any experience/instructions in installing/running Terraspace with Azure DevOps pipeline?
I am trying to run Terraspace from an Azure DevOps pipeline (using Microsoft Build Agents - with vmImage: ‘ubuntu-latest’), which has ruby installed by default by the looks of it. I.e. I just have a basic bash task that does
# Install Terraspace
sudo gem install terraspace
sudo gem install bundler
# Create a new project
terraspace new project infra --plugin aws --examples
cd infra
terraspace up demo
Now, when the pipeline runs, it installs Terraspace and creates the project OK. But it errors when doing the terraspace up demo (the below is an output from the pipeline).
=> Creating new project called infra.
create infra
create infra/.gitignore
create infra/Gemfile
create infra/README.md
create infra/Terrafile
create infra/config/app.rb
exist infra
create infra/config/terraform/backend.tf
create infra/config/terraform/provider.tf
=> Creating test for new module: example
create infra/app/modules/example
create infra/app/modules/example/main.tf
create infra/app/modules/example/outputs.tf
create infra/app/modules/example/variables.tf
=> Creating new stack called demo.
create infra/app/stacks/demo
create infra/app/stacks/demo/main.tf
create infra/app/stacks/demo/outputs.tf
create infra/app/stacks/demo/variables.tf
=> Installing dependencies with: bundle install
Fetching gem metadata from https://rubygems.org/........
Resolving dependencies......
Following files may not be writable, so sudo is needed:
/var/lib/gems/2.7.0
/var/lib/gems/2.7.0/build_info
/var/lib/gems/2.7.0/cache
/var/lib/gems/2.7.0/doc
/var/lib/gems/2.7.0/extensions
/var/lib/gems/2.7.0/gems
/var/lib/gems/2.7.0/specifications
Fetching rake 13.0.6
Installing rake 13.0.6
Using concurrent-ruby 1.1.9
Using zeitwerk 2.4.2
Fetching minitest 5.14.4
Using public_suffix 4.0.6
Using aws-eventstream 1.2.0
Fetching aws-partitions 1.516.0
Installing minitest 5.14.4
Installing aws-partitions 1.516.0
Using jmespath 1.4.0
Using memoist 0.16.2
Fetching multipart-post 2.1.1
Fetching racc 1.5.2
Installing multipart-post 2.1.1
Installing racc 1.5.2 with native extensions
Using azure_info 0.1.2
Using unf_ext 0.0.8
Using timeliness 0.3.10
Using bundler 2.2.29
Using text-table 1.2.4
Using declarative 0.0.20
Using deep_merge 1.2.1
Using diff-lcs 1.4.4
Using digest-crc 0.6.4
Using rainbow 3.0.0
Using eventmachine 1.2.7
Using google-protobuf 3.18.1 (x86_64-linux)
Using jwt 2.3.0
Using multi_json 1.15.0
Using os 1.1.1
Using httpclient 2.8.3
Fetching mini_mime 1.1.2
Installing mini_mime 1.1.2
Using trailblazer-option 0.1.1
Using uber 0.1.0
Using retriable 3.1.2
Using rexml 3.2.5
Fetching webrick 1.7.0
Installing webrick 1.7.0
Using google-cloud-errors 1.2.0
Using graph 2.10.0
Using tilt 2.0.10
Using rspec-support 3.10.2
Using rubyzip 2.3.2
Using thor 1.1.0
Using tty-tree 0.4.0
Using i18n 1.8.10
Using tzinfo 2.0.4
Using addressable 2.8.0
Using aws-sigv4 1.4.0
Using gcp_data 0.2.0
**Fetching faraday 0.17.4**
**Installing faraday 0.17.4**
Using unf 0.1.4
Using dsl_evaluator 0.1.3
Using eventmachine-tail 0.6.5
Using googleapis-common-protos-types 1.2.0
Using rhcl 0.1.0
Using representable 3.1.1
Using activesupport 6.1.4.1
Using aws-sdk-core 3.121.2
Using rspec-core 3.10.1
Using rspec-expectations 3.10.1
Using rspec-mocks 3.10.2
Fetching faraday_middleware 0.14.0
Installing faraday_middleware 0.14.0
Using ms_rest 0.7.6
Using signet 0.16.0
Using google-cloud-env 1.5.0
Using domain_name 0.5.20190701
Using grpc 1.41.0 (x86_64-linux)
Using hcl_parser 0.1.0
Using aws-sdk-dynamodb 1.64.0
Fetching aws-sdk-kms 1.50.0
Installing aws-sdk-kms 1.50.0
Using aws-sdk-secretsmanager 1.51.0
Using aws-sdk-ssm 1.120.0
Using aws_data 0.1.1
Using cli-format 0.2.0
Using render_me_pretty 0.8.3
Using rspec 3.10.0
Using http-cookie 1.0.4
Using googleapis-common-protos 1.3.12
Fetching googleauth 0.17.1
Installing googleauth 0.17.1
Using google-cloud-core 1.6.0
Fetching aws-sdk-s3 1.104.0
Installing aws-sdk-s3 1.104.0
Using faraday-cookie_jar 0.0.7
Using grpc-google-iam-v1 1.0.0
Using rspec-terraspace 0.3.0
Fetching gapic-common 0.3.4
Installing gapic-common 0.3.4
Using google-apis-core 0.4.1
Using s3-secure 0.5.1
Using ms_rest_azure 0.12.0
Fetching google-cloud-secret_manager-v1 0.8.0
Installing google-cloud-secret_manager-v1 0.8.0
Fetching google-cloud-secret_manager-v1beta1 0.8.0
Using google-apis-iamcredentials_v1 0.7.0
Using google-apis-storage_v1 0.8.0
Using terraspace_plugin_aws 0.3.0
Using azure_mgmt_resources 0.18.2
Using azure_mgmt_storage 0.23.0
Fetching nokogiri 1.12.5 (x86_64-linux)
Installing google-cloud-secret_manager-v1beta1 0.8.0
Using google-cloud-storage 1.34.1
Using google-cloud-secret_manager 1.1.2
Using terraspace_plugin_google 0.3.0
Installing nokogiri 1.12.5 (x86_64-linux)
Using terraspace-bundler 0.4.2
Fetching azure-core 0.1.15
Installing azure-core 0.1.15
Fetching azure-storage-common 1.1.0
Installing azure-storage-common 1.1.0
Fetching azure-storage-blob 1.1.0
Installing azure-storage-blob 1.1.0
Using terraspace_plugin_azurerm 0.3.1
Using terraspace 0.6.17
Bundle complete! 3 Gemfile dependencies, 101 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
================================================================
Congrats! You have successfully created a terraspace project.
Check out the created files. Adjust to the examples and then deploy with:
cd infra
terraspace up demo -y # to deploy
terraspace down demo -y # to destroy
More info: https://terraspace.cloud/
**You have already activated faraday 1.8.0, but your Gemfile requires faraday 0.17.4. Prepending `bundle exec` to your command may solve this.**
**You have already activated faraday 1.8.0, but your Gemfile requires faraday 0.17.4. Prepending `bundle exec` to your command may solve this.**
I.e. It errors because of faraday. But if you were to look at the logs, faraday was installed as part of the bundler, and it is erroring not because it isn’t installed - rather, because another version has been activated.
I have tried removing faraday by doing “sudo gem uninstall faraday -v 1.8.0” (before the installation of Terraspace), but it failed saying
**ERROR: While executing gem ... (Gem::DependencyRemovalException)**
** Uninstallation aborted due to dependent gem(s)**
Do you have any suggestions on how I would work around this issue? The use of “bundle exec” was suggested as a workaround, but I suppose that would be built into Terraspace?
Looking forward to hearing back some suggestions
Many thanks,
James