Skip to content

Commit

Permalink
fix: Specify provider version upper limit (#40)
Browse files Browse the repository at this point in the history
In order to ensure we're utilising newer provider versions we
should be specifying a minimum and maximum version, and not use
version pinning in modules.

Refs: #DEVOP-4407

Signed-off-by: Christian Witts <christian@honestbank.com>
  • Loading branch information
ChristianWitts authored Jun 4, 2024
1 parent 3542ccc commit f766c84
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ docs:
terraform-docs --lockfile=false -c .terraform-docs.yml .
cd examples/create_mysql_instance_with_public_ip/; terraform-docs --lockfile=false markdown . --output-file README.md --output-mode inject
cd examples/create_mysql_instance_with_private_ip/; terraform-docs --lockfile=false markdown . --output-file README.md --output-mode inject
cd examples/mysql_instance_with_read_replica/; terraform-doc --lockfile=falses markdown . --output-file README.md --output-mode inject
cd examples/mysql_instance_with_read_replica/; terraform-docs --lockfile=false markdown . --output-file README.md --output-mode inject
cd examples/postgres_instance_with_read_replica/; terraform-docs --lockfile=false markdown . --output-file README.md --output-mode inject

commit: docs validate
Expand Down
4 changes: 2 additions & 2 deletions modules/google_compute_global_address/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

| Name | Version |
|------|---------|
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 4.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.0, < 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | ~> 4.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.0, < 6.0 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/google_compute_global_address/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
version = ">= 4.0, < 6.0"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/google_compute_network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

| Name | Version |
|------|---------|
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 4.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.0, < 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | ~> 4.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.0, < 6.0 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/google_compute_network/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
version = ">= 4.0, < 6.0"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/google_service_networking_connection/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

| Name | Version |
|------|---------|
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 4.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.0, < 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | ~> 4.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.0, < 6.0 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/google_service_networking_connection/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
version = ">= 4.0, < 6.0"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/google_sql_database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

| Name | Version |
|------|---------|
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 4.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.0, < 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | ~> 4.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.0, < 6.0 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/google_sql_database/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
version = ">= 4.0, < 6.0"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/google_sql_database_instance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

| Name | Version |
|------|---------|
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 4.48 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.48, < 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | ~> 4.48 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.48, < 6.0 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/google_sql_database_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.48"
version = ">= 4.48, < 6.0"
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/google_sql_user/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

| Name | Version |
|------|---------|
| <a name="requirement_google"></a> [google](#requirement\_google) | ~> 4.0 |
| <a name="requirement_google"></a> [google](#requirement\_google) | >= 4.0, < 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_google"></a> [google](#provider\_google) | ~> 4.0 |
| <a name="provider_google"></a> [google](#provider\_google) | >= 4.0, < 6.0 |

## Modules

Expand Down
2 changes: 1 addition & 1 deletion modules/google_sql_user/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
version = ">= 4.0, < 6.0"
}
}
}
Expand Down

0 comments on commit f766c84

Please sign in to comment.