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

fix!: Bump AWS provider #11

Merged
merged 3 commits into from
Dec 19, 2023
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
6 changes: 6 additions & 0 deletions .checkov-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,9 @@ skip-path: |
skip-check:
# Github: Ensure top-level permissions are not set to write-all
- CKV2_GHA_1

# Github: Ensure Terraform module sources use a commit hash
- CKV_TF_1

# AWS: Ensure KMS key Policy is defined
- CKV2_AWS_64
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit-and-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,13 @@ jobs:
python -m venv .venv
source .venv/bin/activate
pip install pre-commit checkov
- name: Configure ~/.terraformrc
run: |
cat <<-EOF >> ~/.terraformrc
credentials "app.terraform.io" {
token = "${{ secrets.TERRAFORM_CLOUD_TOKEN }}"
}
EOF
- name: pre-commit run
run: |
source .venv/bin/activate
Expand Down Expand Up @@ -91,6 +98,13 @@ jobs:
python -m venv .venv
source .venv/bin/activate
pip install -r tests/requirements.txt
- name: Configure ~/.terraformrc
run: |
cat <<-EOF >> ~/.terraformrc
credentials "app.terraform.io" {
token = "${{ secrets.TERRAFORM_CLOUD_TOKEN }}"
}
EOF
- name: Run
run: |
source .venv/bin/activate
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ test.auto.tfvars*

# Apple
.DS_Store

# Python
.venv
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ No outputs.

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.9 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.0 |

----
### Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.5 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |

----
### Resources
Expand Down
18 changes: 8 additions & 10 deletions examples/basic/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ resource "aws_kms_key" "source" {
}

module "s3_bucket_source" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-source"
kms_key_id = aws_kms_key.source.arn
Expand All @@ -52,9 +51,8 @@ resource "aws_kms_key" "destination" {
}

module "s3_bucket_destination" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-dest"
kms_key_id = aws_kms_key.destination.arn
Expand Down Expand Up @@ -125,8 +123,8 @@ module "example" {
| Name | Source | Version |
|------|--------|---------|
| <a name="module_example"></a> [example](#module\_example) | ../../ | n/a |
| <a name="module_s3_bucket_destination"></a> [s3\_bucket\_destination](#module\_s3\_bucket\_destination) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_destination"></a> [s3\_bucket\_destination](#module\_s3\_bucket\_destination) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |

----
### Outputs
Expand All @@ -142,7 +140,7 @@ module "example" {

| Name | Version |
|------|---------|
| <a name="provider_aws.afs1"></a> [aws.afs1](#provider\_aws.afs1) | ~> 4.9 |
| <a name="provider_aws.afs1"></a> [aws.afs1](#provider\_aws.afs1) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.4 |

----
Expand All @@ -151,7 +149,7 @@ module "example" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.5 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.4 |

----
Expand Down
10 changes: 4 additions & 6 deletions examples/basic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ resource "aws_kms_key" "source" {
}

module "s3_bucket_source" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-source"
kms_key_id = aws_kms_key.source.arn
Expand All @@ -48,9 +47,8 @@ resource "aws_kms_key" "destination" {
}

module "s3_bucket_destination" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-dest"
kms_key_id = aws_kms_key.destination.arn
Expand Down
5 changes: 2 additions & 3 deletions examples/basic/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ terraform {
required_version = ">= 0.15.5"
required_providers {
aws = {
source = "hashicorp/aws"
# V5+ does not exist yet, may contain breaking changes.
version = "~> 4.9"
source = "hashicorp/aws"
version = "~> 5.0"
}
random = {
source = "hashicorp/random"
Expand Down
20 changes: 9 additions & 11 deletions examples/cross-account/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ resource "aws_kms_key" "source" {
}

module "s3_bucket_source" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-source"
kms_key_id = aws_kms_key.source.arn
Expand All @@ -45,9 +44,8 @@ module "s3_bucket_source" {
}

module "s3_bucket_destination" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-dest"

Expand Down Expand Up @@ -116,8 +114,8 @@ module "example" {
| Name | Source | Version |
|------|--------|---------|
| <a name="module_example"></a> [example](#module\_example) | ../../ | n/a |
| <a name="module_s3_bucket_destination"></a> [s3\_bucket\_destination](#module\_s3\_bucket\_destination) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_destination"></a> [s3\_bucket\_destination](#module\_s3\_bucket\_destination) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |

----
### Outputs
Expand All @@ -133,8 +131,8 @@ module "example" {

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 4.9 |
| <a name="provider_aws.account_A"></a> [aws.account\_A](#provider\_aws.account\_A) | ~> 4.9 |
| <a name="provider_aws"></a> [aws](#provider\_aws) | ~> 5.0 |
| <a name="provider_aws.account_A"></a> [aws.account\_A](#provider\_aws.account\_A) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.4 |

----
Expand All @@ -143,7 +141,7 @@ module "example" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.5 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.4 |

----
Expand Down
10 changes: 4 additions & 6 deletions examples/cross-account/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@ resource "aws_kms_key" "source" {
}

module "s3_bucket_source" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-source"
kms_key_id = aws_kms_key.source.arn
Expand All @@ -41,9 +40,8 @@ module "s3_bucket_source" {
}

module "s3_bucket_destination" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-dest"

Expand Down
5 changes: 2 additions & 3 deletions examples/cross-account/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ terraform {
required_version = ">= 0.15.5"
required_providers {
aws = {
source = "hashicorp/aws"
# V5+ does not exist yet, may contain breaking changes.
version = "~> 4.9"
source = "hashicorp/aws"
version = "~> 5.0"
}
random = {
source = "hashicorp/random"
Expand Down
20 changes: 9 additions & 11 deletions examples/cross-region/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ resource "aws_kms_key" "source" {
}

module "s3_bucket_source" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-afs1-source"
kms_key_id = aws_kms_key.source.arn
Expand All @@ -52,9 +51,8 @@ resource "aws_kms_key" "destination" {
}

module "s3_bucket_destination" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-euw1-dest"
kms_key_id = aws_kms_key.destination.arn
Expand Down Expand Up @@ -121,8 +119,8 @@ module "example" {
| Name | Source | Version |
|------|--------|---------|
| <a name="module_example"></a> [example](#module\_example) | ../../ | n/a |
| <a name="module_s3_bucket_destination"></a> [s3\_bucket\_destination](#module\_s3\_bucket\_destination) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_destination"></a> [s3\_bucket\_destination](#module\_s3\_bucket\_destination) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |

----
### Outputs
Expand All @@ -138,8 +136,8 @@ module "example" {

| Name | Version |
|------|---------|
| <a name="provider_aws.afs1"></a> [aws.afs1](#provider\_aws.afs1) | ~> 4.9 |
| <a name="provider_aws.euw1"></a> [aws.euw1](#provider\_aws.euw1) | ~> 4.9 |
| <a name="provider_aws.afs1"></a> [aws.afs1](#provider\_aws.afs1) | ~> 5.0 |
| <a name="provider_aws.euw1"></a> [aws.euw1](#provider\_aws.euw1) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.4 |

----
Expand All @@ -148,7 +146,7 @@ module "example" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.5 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.4 |

----
Expand Down
10 changes: 4 additions & 6 deletions examples/cross-region/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@ resource "aws_kms_key" "source" {
}

module "s3_bucket_source" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-afs1-source"
kms_key_id = aws_kms_key.source.arn
Expand All @@ -48,9 +47,8 @@ resource "aws_kms_key" "destination" {
}

module "s3_bucket_destination" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-euw1-dest"
kms_key_id = aws_kms_key.destination.arn
Expand Down
5 changes: 2 additions & 3 deletions examples/cross-region/terraform.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ terraform {
required_version = ">= 0.15.5"
required_providers {
aws = {
source = "hashicorp/aws"
# V5+ does not exist yet, may contain breaking changes.
version = "~> 4.9"
source = "hashicorp/aws"
version = "~> 5.0"
}
random = {
source = "hashicorp/random"
Expand Down
19 changes: 9 additions & 10 deletions examples/multiple-destinations/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,8 @@ resource "aws_kms_key" "source" {
}

module "s3_bucket_source" {
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

name = "${local.naming_prefix}-source"
kms_key_id = aws_kms_key.source.arn
Expand All @@ -52,10 +51,10 @@ resource "aws_kms_key" "destination" {
}

module "s3_bucket_destinations" {
source = "app.terraform.io/cloudandthings/s3-bucket/aws"
version = "2.0.0"

count = 2
# source = "app.terraform.io/cloudandthings/s3-bucket/aws"
# version = "1.2.0"
source = "../../modules/external/s3_bucket"

name = "${local.naming_prefix}-dest-${count.index}"
kms_key_id = aws_kms_key.destination.arn
Expand Down Expand Up @@ -125,8 +124,8 @@ module "example" {
| Name | Source | Version |
|------|--------|---------|
| <a name="module_example"></a> [example](#module\_example) | ../../ | n/a |
| <a name="module_s3_bucket_destinations"></a> [s3\_bucket\_destinations](#module\_s3\_bucket\_destinations) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | ../../modules/external/s3_bucket | n/a |
| <a name="module_s3_bucket_destinations"></a> [s3\_bucket\_destinations](#module\_s3\_bucket\_destinations) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |
| <a name="module_s3_bucket_source"></a> [s3\_bucket\_source](#module\_s3\_bucket\_source) | app.terraform.io/cloudandthings/s3-bucket/aws | 2.0.0 |

----
### Outputs
Expand All @@ -142,7 +141,7 @@ module "example" {

| Name | Version |
|------|---------|
| <a name="provider_aws.afs1"></a> [aws.afs1](#provider\_aws.afs1) | ~> 4.9 |
| <a name="provider_aws.afs1"></a> [aws.afs1](#provider\_aws.afs1) | ~> 5.0 |
| <a name="provider_random"></a> [random](#provider\_random) | ~> 3.4 |

----
Expand All @@ -151,7 +150,7 @@ module "example" {
| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.15.5 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.9 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 5.0 |
| <a name="requirement_random"></a> [random](#requirement\_random) | ~> 3.4 |

----
Expand Down
Loading
Loading