Skip to content

Commit 1ae902f

Browse files
authored
Merge pull request #51 from maddevsio/feature/update-terraform-and-terraform-providers
#49 updated terraform version to 15.1, updated providers version
2 parents 7c4f65f + 7d68f68 commit 1ae902f

File tree

11 files changed

+135
-88
lines changed

11 files changed

+135
-88
lines changed

.github/workflows/terraform-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: 'Terraform-validate'
1313
runs-on: ubuntu-latest
1414
container:
15-
image: hashicorp/terraform:0.14.6
15+
image: hashicorp/terraform:0.15.1
1616
env:
1717
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
1818
steps:
@@ -36,7 +36,7 @@ jobs:
3636
name: 'Terraform-format'
3737
runs-on: ubuntu-latest
3838
container:
39-
image: hashicorp/terraform:0.14.6
39+
image: hashicorp/terraform:0.15.1
4040
env:
4141
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
4242
steps:

README.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This repository contains the know-how of the Mad Devs team for the rapid deploym
2626

2727
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.
2828

29-
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.
29+
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.
3030

3131
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.
3232

@@ -369,6 +369,41 @@ You can get access to the cluster using this command:
369369
aws eks update-kubeconfig --name maddevs-demo-use1 --region us-east-1
370370
```
371371
372+
## Update terraform version
373+
374+
Change terraform version in this files
375+
376+
`terraform/.terraform-version` - the main terraform version for tfenv tool
377+
378+
`.github/workflows/terraform-ci.yml` - the terraform version for github actions need for `terraform-validate` and `terraform-format`.
379+
380+
Terraform version in each layer.
381+
```
382+
terraform/layer1-aws/main.tf
383+
terraform/layer2-k8s/main.tf
384+
```
385+
386+
## Updated terraform providers
387+
388+
Change terraform providers version in this files
389+
390+
```
391+
terraform/layer1-aws/main.tf
392+
terraform/layer2-k8s/main.tf
393+
```
394+
395+
When we changed terraform provider versions, we need to update terraform state. For update terraform state in layers we need to run this command:
396+
397+
```
398+
terragrunt run-all init -upgrade
399+
```
400+
401+
Or in each layer run command:
402+
403+
```
404+
terragrunt init -upgrade
405+
```
406+
372407
### examples
373408
374409
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.

terraform/.terraform-version

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
0.15.1
2+

terraform/layer1-aws/.terraform-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

terraform/layer1-aws/.terraform.lock.hcl

Lines changed: 32 additions & 26 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terraform/layer1-aws/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
| Name | Version |
44
|------|---------|
5-
| terraform | ~> 0.14.6 |
6-
| aws | 3.26.0 |
7-
| kubernetes | 2.0.2 |
5+
| terraform | 0.15.1 |
6+
| aws | 3.38.0 |
7+
| kubernetes | 2.1.0 |
88

99
## Providers
1010

1111
| Name | Version |
1212
|------|---------|
13-
| aws | 3.26.0 |
13+
| aws | 3.38.0 |
1414

1515
## Inputs
1616

terraform/layer1-aws/main.tf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
terraform {
2-
required_version = "~> 0.14.6"
2+
required_version = "0.15.1"
33

44
required_providers {
55
aws = {
66
source = "aws"
7-
version = "3.26.0"
7+
version = "3.38.0"
88
}
99
kubernetes = {
1010
source = "kubernetes"
11-
version = "2.0.2"
11+
version = "2.1.0"
1212
}
1313
}
1414
}

terraform/layer2-k8s/.terraform-version

Lines changed: 0 additions & 1 deletion
This file was deleted.

terraform/layer2-k8s/.terraform.lock.hcl

Lines changed: 45 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

terraform/layer2-k8s/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
| Name | Version |
44
|------|---------|
5-
| terraform | ~> 0.14.6 |
6-
| aws | 3.26.0 |
7-
| helm | 2.0.2 |
8-
| kubernetes | 2.0.2 |
5+
| terraform | 0.15.1 |
6+
| aws | 3.38.0 |
7+
| helm | 2.1.2 |
8+
| kubernetes | 2.1.0 |
99

1010
## Providers
1111

1212
| Name | Version |
1313
|------|---------|
14-
| aws | 3.26.0 |
15-
| helm | 2.0.2 |
16-
| kubernetes | 2.0.2 |
14+
| aws | 3.38.0 |
15+
| helm | 2.1.2 |
16+
| kubernetes | 2.1.0 |
1717
| template | n/a |
1818
| terraform | n/a |
1919

0 commit comments

Comments
 (0)