Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dev #72

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 63 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,71 @@ The purpose of the repo is to easily test custom config for various terraform
and terragrunt [renovate
managers](https://docs.renovatebot.com/modules/manager/) in one place.

## Setup

The easiest way to use Renovate is to use the GitHub app, see
[here](https://docs.renovatebot.com/install-github-app/) for the deployment
options.

I opted to run it locally to give me more control over when it runs whilst I
experiment:

```sh
npm i -g renovate
export RENOVATE_TOKEN=<my GitHub token>
LOG_LEVEL=debug renovate --autodiscover --autodiscover-filter sajid-khan-js/renovate-test
```

It's also handy to run this after you make changes to your config
(`renovate.json`) `renovate-config-validator` (comes with npm install of
renovate)

## Structure

- [infra](./infra) Terragrunt deployment files - Renovate will bump upstream
module versions
- `.terraform-version` and `.terragrunt-version` files are used by `tfenv` and
`tgenv` respectively - Renovate will bump the version numbers in these
files
- [modules](./modules) Terraform modules - Renovate will bump provider and
terraform version pins
- [renovate.json](./renovate.json) - Config file for renovate
### [Infra](./infra)

Terragrunt deployment files.

Renovate will bump:

- Upstream module versions e.g.
`github.com/cloudposse/terraform-null-label?ref=0.24.0`
- `.terraform-version` and `.terragrunt-version` files are used by `tfenv` and
`tgenv` respectively - Renovate will bump the version numbers in these files
to the latest respective version

### [Modules](./modules)

Terraform modules/stacks.

Renovate will bump:

- Provider and terraform version pins in specific cases
- Any upstream modules used in the stacks e.g. `github.com/cloudposse/terraform-null-label?ref=0.24.0`

#### Terraform version constraint syntax

:memo: Renovate is aware of the [different terraform version
constraints](https://www.terraform.io/docs/language/expressions/version-constraints.html),
meaning it doesn't simply bump versions but actually evaluates whether a bump is
needed. Read more
[here](https://docs.renovatebot.com/modules/manager/terraform/) and
[here](https://docs.renovatebot.com/configuration-options/#rangestrategy)

- `>= 2.0` will not be bumped since this pin allows any newer version that `2.0`
i.e. at runtime (when you running `terraform init`), terraform will pull
the latest provider version anyway
- `~> 0.14.4` will be bumped, but since the pessimistic operator is used (`~>`)
it will use a version that satisfies this constraint e.g. if the latest
version is `1.0.4`, bumping to to `1.0.0` will still make the stack usable by
anyone running terraform version `1.0.X`

### [Renovate config](./renovate.json)

Config file for renovate.

See [here](https://docs.renovatebot.com/configuration-options/) for
configuration options

## Renovate in action

Expand Down
2 changes: 1 addition & 1 deletion infra/dev/.terraform-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.14.8
1.0.4
2 changes: 1 addition & 1 deletion infra/dev/.terragrunt-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.28.18
0.31.3
2 changes: 1 addition & 1 deletion infra/dev/deployment/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@


terraform {
source = "github.com/cloudposse/terraform-null-label?ref=0.24.0"
source = "github.com/cloudposse/terraform-null-label?ref=0.24.1"
}

# These are the variables we have to pass in to use the module specified in the terragrunt configuration above
Expand Down