Skip to content

#49 updated terraform version to 15.1, updated providers version #51

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

Merged
merged 4 commits into from
May 4, 2021
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/terraform-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: 'Terraform-validate'
runs-on: ubuntu-latest
container:
image: hashicorp/terraform:0.14.6
image: hashicorp/terraform:0.15.1
env:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
steps:
Expand All @@ -36,7 +36,7 @@ jobs:
name: 'Terraform-format'
runs-on: ubuntu-latest
container:
image: hashicorp/terraform:0.14.6
image: hashicorp/terraform:0.15.1
env:
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
steps:
Expand Down
37 changes: 36 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This repository contains the know-how of the Mad Devs team for the rapid deploym

In our company’s work, we have tried many infrastructure solutions and services and traveled the path from on-premise hardware to serverless. As of today, Kubernetes has become our standard platform for deploying applications, and AWS has become the main cloud.

It is worth noting here that although 90% of our and our clients’ projects are hosted on AWS and [AWS EKS](https://aws.amazon.com/eks/) is used as the Kubernetes platform, we do not insist, do not drag everything to Kubernetes, and do not force anyone to be hosted on AWS. Kubernetes is offered only after the collection and analysis of service architecture requirements.
It is worth noting here that although 90% of our and our clients’ projects are hosted on AWS and [AWS EKS](https://aws.amazon.com/eks/) is used as the Kubernetes platform, we do not insist, do not drag everything to Kubernetes, and do not force anyone to be hosted on AWS. Kubernetes is offered only after the collection and analysis of service architecture requirements.

And then, when choosing Kubernetes, it makes almost no difference to applications how the cluster itself is created—manually, through kops or using managed services from cloud providers—in essence, the Kubernetes platform is the same everywhere. So the choice of a particular provider is then made based on additional requirements, expertise, etc.

Expand Down Expand Up @@ -369,6 +369,41 @@ You can get access to the cluster using this command:
aws eks update-kubeconfig --name maddevs-demo-use1 --region us-east-1
```

## Update terraform version

Change terraform version in this files

`terraform/.terraform-version` - the main terraform version for tfenv tool

`.github/workflows/terraform-ci.yml` - the terraform version for github actions need for `terraform-validate` and `terraform-format`.

Terraform version in each layer.
```
terraform/layer1-aws/main.tf
terraform/layer2-k8s/main.tf
```

## Updated terraform providers

Change terraform providers version in this files

```
terraform/layer1-aws/main.tf
terraform/layer2-k8s/main.tf
```

When we changed terraform provider versions, we need to update terraform state. For update terraform state in layers we need to run this command:

```
terragrunt run-all init -upgrade
```

Or in each layer run command:

```
terragrunt init -upgrade
```

### examples

Each layer has an `examples/` directory that contains working examples that expand the basic configuration. The files’ names and contents are in accordance with our coding conventions, so no additional description is required. If you need to use something, just move it from this folder to the root of the layer.
Expand Down
2 changes: 2 additions & 0 deletions terraform/.terraform-version
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
0.15.1

1 change: 0 additions & 1 deletion terraform/layer1-aws/.terraform-version

This file was deleted.

58 changes: 32 additions & 26 deletions terraform/layer1-aws/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions terraform/layer1-aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@

| Name | Version |
|------|---------|
| terraform | ~> 0.14.6 |
| aws | 3.26.0 |
| kubernetes | 2.0.2 |
| terraform | 0.15.1 |
| aws | 3.38.0 |
| kubernetes | 2.1.0 |

## Providers

| Name | Version |
|------|---------|
| aws | 3.26.0 |
| aws | 3.38.0 |

## Inputs

Expand Down
6 changes: 3 additions & 3 deletions terraform/layer1-aws/main.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
terraform {
required_version = "~> 0.14.6"
required_version = "0.15.1"

required_providers {
aws = {
source = "aws"
version = "3.26.0"
version = "3.38.0"
}
kubernetes = {
source = "kubernetes"
version = "2.0.2"
version = "2.1.0"
}
}
}
Expand Down
1 change: 0 additions & 1 deletion terraform/layer2-k8s/.terraform-version

This file was deleted.

84 changes: 45 additions & 39 deletions terraform/layer2-k8s/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 7 additions & 7 deletions terraform/layer2-k8s/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

| Name | Version |
|------|---------|
| terraform | ~> 0.14.6 |
| aws | 3.26.0 |
| helm | 2.0.2 |
| kubernetes | 2.0.2 |
| terraform | 0.15.1 |
| aws | 3.38.0 |
| helm | 2.1.2 |
| kubernetes | 2.1.0 |

## Providers

| Name | Version |
|------|---------|
| aws | 3.26.0 |
| helm | 2.0.2 |
| kubernetes | 2.0.2 |
| aws | 3.38.0 |
| helm | 2.1.2 |
| kubernetes | 2.1.0 |
| template | n/a |
| terraform | n/a |

Expand Down
8 changes: 4 additions & 4 deletions terraform/layer2-k8s/main.tf
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
terraform {
required_version = "~> 0.14.6"
required_version = "0.15.1"

required_providers {
aws = {
source = "aws"
version = "3.26.0"
version = "3.38.0"
}
kubernetes = {
source = "kubernetes"
version = "2.0.2"
version = "2.1.0"
}
helm = {
source = "helm"
version = "2.0.2"
version = "2.1.2"
}
}
}
Expand Down