Git Product home page Git Product logo

terraspace-docs's Introduction

Terraspace Documentation

BoltOps Badge

This project powers the terraspace documementation website: https://terraspace.cloud. It is a static website generated by Jekyll.

Contributing

For minor changes like typos, you can click Suggest an edit to this page, located at the bottom of each article. This will take you to the source file on GitHub, where you can submit a pull request for your change through the UI.

Local Setup

For larger fixes, you can run the site locally with the following:

git clone https://github.com/boltops-tools/terraspace-docs.git
cd terraspace-docs
bundle
foreman start

You'll be able to view the site on http://localhost:4000.

Html Proofer

Run it locally once in a while. Sometimes external sites are intermittently down, even GitHub.

bundle exec rake html:proof

terraspace-docs's People

Contributors

after2400 avatar alexjfisher avatar arongate avatar kushan-gunasekera avatar piotrplenik avatar sharon-codefresh avatar syphernl avatar tongueroo avatar xat59 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

terraspace-docs's Issues

gitlab as backend for states file

Hello,
I don't really know where to put an example about gitlab, but this is how I do it

See https://docs.gitlab.com/ee/user/infrastructure/terraform_state.html for more information

To use inside gitlab-ci and locally, I have done his configuration
config/boot.rb:

ENV['CI_PROJECT_ID'] ||= '<your project id>'
ENV['CI_API_V4_URL'] ||= 'https://gitlab.com/api/v4'
ENV['CI_JOB_USERNAME'] ||= 'gitlab-ci-token'
ENV['CI_JOB_TOKEN'] ||= 'you-must-defined-a-gitlab-PAT'
ENV['TF_URL'] = "#{ENV['CI_API_V4_URL']}/projects/#{ENV['CI_PROJECT_ID']}/terraform/state"

test/config/terraform/backend.tf:

terraform {
  backend "http" {
    address = "<%= ENV['TF_URL'] %>/<%= expansion(':ACCOUNT-:REGION-:ENV-:TYPE_DIR-:MOD_NAME') %>"
    lock_address = "<%= ENV['TF_URL'] %>/<%= expansion(':ACCOUNT-:REGION-:ENV-:TYPE_DIR-:MOD_NAME') %>/lock"
    unlock_address = "<%= ENV['TF_URL'] %>/<%= expansion(':ACCOUNT-:REGION-:ENV-:TYPE_DIR-:MOD_NAME') %>/lock"
    username = "<%= ENV['CI_JOB_USERNAME'] %>"
    password = "<%= ENV['CI_JOB_TOKEN'] %>"
    lock_method = "POST"
    unlock_method = "DELETE"
    retry_wait_min = 5
  }
}

Note:

  • CI_PROJECT_ID, CI_API_V4_URL and CI_JOB_TOKEN is defined by gitlab automatically in the gitlab-ci, it's only for local usage that I define it ;)

Layering with ENV based folder unclear

The docs indicate the ability to layer tfvars using env based folders here and here. The first section (full-layering) seems to indicate this is "simple layering" but mentions the TS_ENV var without much explanation. The second section (extra) indicates the use of TS_ENV to organize based on env folders but doesn't explain.

Through trial and error I've learned that I need set both TS_ENV and TS_EXTRA like so: TS_ENV=$TS_ENV; TS_EXTRA=$TS_ENV/base. I think the Docs could use some added context here. Ideally, this should be supported out-of-the-box IMHO.

add detail on terrafile usage

Hello,
in the documentation of terrafile usage, there is example about using the provided example, but not how to use it from the module.

So is this proper usage?

Terrafile

mod "foo", source: "[email protected]:bar/baz.git"
module "stuff" {
  source = "vendor/modules/foo"
}

If yes, add this example could be a nice usage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.