Skip to content

Commit

Permalink
docs: add install instructions using go install (#11)
Browse files Browse the repository at this point in the history
Including docs on how to configure for usage with private repositories.
  • Loading branch information
katcipis authored Nov 5, 2021
1 parent 3e2b910 commit 489c57e
Showing 1 changed file with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<!-- mdtocstart -->

# Table of Contents

- [terrastack](#terrastack)
- [Installing](#installing)
- [Go/Git configuration for private Repositories](#gogit-configuration-for-private-repositories)
- [Why using stacks?](#why-using-stacks)
- [Detecting IaC changes](#detecting-iac-changes)

<!-- mdtocend -->

# terrastack

Terrastack is a tool for managing multiple terraform stacks.
Expand All @@ -19,6 +31,48 @@ don't have the `provider` explicitly set, is not runnable hence it's
So, if your runnable terraform module creates your whole infrastructure, *it's
also not a stack*.


## Installing

To install **terrastack** using Go just run:

```
go install github.com/mineiros-io/terrastack/cmd/terrastack@<version>
```

Where **<version>** is any terrastack [version tag](https://github.com/mineiros-io/terrastack/tags),
or if you are feeling adventurous you can just install **latest**:

```
go install github.com/mineiros-io/terrastack/cmd/terrastack@latest
```

We put great effort into keeping the main branch stable, so it should be safe
to use **latest** to play around, but not recommended for long term automation
since you won't get the same build result each time you run the install command.


### Go/Git configuration for private repositories

While this repository is private, there is some extra work in order to
download and install it using **go install**. There is two main steps.
First you need to configure git to use ssh instead of https:

```
git config --global [email protected]:.insteadOf https://github.com/
```

This only needs to be done once and will change the **.gitconfig** on your
host. Then you should always export **GOPRIVATE** for our mineiros-io repos
before running go install:

```
export GOPRIVATE=github.com/mineiros-io
```

More info [here](https://golang.org/ref/mod#private-module-proxy-direct).


## Why using stacks?

The stack concept is advised for several reasons:
Expand Down

0 comments on commit 489c57e

Please sign in to comment.