From 67d1b169c9c5d86ee1accaa6d6d7a00fc43ea3a8 Mon Sep 17 00:00:00 2001 From: Krisjanis Lejejs Date: Fri, 27 Sep 2024 11:07:01 +0300 Subject: [PATCH] Update Terraform versions and dependencies --- .github/workflows/lint.yml | 2 +- .modules/service/policy.tf | 2 +- .modules/webservice/dns.tf | 4 ++-- .modules/webservice/versions.tf | 6 ++++-- assist/main.tf | 4 +++- cas_validator/main.tf | 6 ++++-- community/dns.tf | 2 +- community/ec2.tf | 2 +- community/main.tf | 6 ++++-- infrastructure/certificate.tf | 2 +- infrastructure/region/network.tf | 2 +- infrastructure/versions.tf | 6 ++++-- ios_pushserver/main.tf | 6 ++++-- os-builds/main.tf | 4 +++- private_demo/main.tf | 6 ++++-- service_hub_bots/main.tf | 6 ++++-- static_dns/main.tf | 4 +++- static_dns/record._checkdns.tf | 2 +- 18 files changed, 46 insertions(+), 26 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0b8690c..9ed1aa3 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4.1.7 + uses: actions/checkout@v4.2.0 - name: Setup Terraform uses: hashicorp/setup-terraform@v3.1.2 diff --git a/.modules/service/policy.tf b/.modules/service/policy.tf index cdbf186..af6b1ad 100644 --- a/.modules/service/policy.tf +++ b/.modules/service/policy.tf @@ -53,4 +53,4 @@ resource "aws_iam_role" "task-execution" { resource "aws_iam_role_policy" "task-role" { policy = data.aws_iam_policy_document.task-policy.json role = aws_iam_role.task-execution.id -} \ No newline at end of file +} diff --git a/.modules/webservice/dns.tf b/.modules/webservice/dns.tf index 2515168..77e9e63 100644 --- a/.modules/webservice/dns.tf +++ b/.modules/webservice/dns.tf @@ -5,8 +5,8 @@ data "cloudflare_zone" "dns_zone" { resource "cloudflare_record" "instance_dns" { zone_id = data.cloudflare_zone.dns_zone.id name = coalesce(var.subdomain, lower(var.service_name)) - value = lower(aws_alb.main.dns_name) + content = lower(aws_alb.main.dns_name) type = "CNAME" ttl = 1 proxied = var.cloudflare_proxy -} \ No newline at end of file +} diff --git a/.modules/webservice/versions.tf b/.modules/webservice/versions.tf index 6e48503..ae61c09 100644 --- a/.modules/webservice/versions.tf +++ b/.modules/webservice/versions.tf @@ -1,8 +1,10 @@ terraform { required_providers { + required_version = "= 1.9.6" + cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } -} \ No newline at end of file +} diff --git a/assist/main.tf b/assist/main.tf index 226618b..09575a3 100644 --- a/assist/main.tf +++ b/assist/main.tf @@ -9,9 +9,11 @@ terraform { required_providers { + required_version = "= 1.9.6" + cloudflare = { source = "cloudflare/cloudflare" - version = "~> 4" + version = "~> 4.0" } } } diff --git a/cas_validator/main.tf b/cas_validator/main.tf index adb6e0d..10b8d0b 100644 --- a/cas_validator/main.tf +++ b/cas_validator/main.tf @@ -8,14 +8,16 @@ terraform { } required_providers { + required_version = "= 1.9.6" + aws = { source = "hashicorp/aws" - version = "~> 4.0" + version = "~> 5.0" } cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } } diff --git a/community/dns.tf b/community/dns.tf index 137e53b..1f45d03 100644 --- a/community/dns.tf +++ b/community/dns.tf @@ -5,7 +5,7 @@ data "cloudflare_zone" "dns_zone" { resource "cloudflare_record" "community" { zone_id = data.cloudflare_zone.dns_zone.id name = "community" - value = aws_eip.discourse.public_ip + content = aws_eip.discourse.public_ip type = "A" proxied = true } diff --git a/community/ec2.tf b/community/ec2.tf index 622f618..fd7a805 100644 --- a/community/ec2.tf +++ b/community/ec2.tf @@ -9,5 +9,5 @@ resource "aws_instance" "discourse" { resource "aws_eip" "discourse" { instance = aws_instance.discourse.id - vpc = true + domain = "vpc" } diff --git a/community/main.tf b/community/main.tf index 2b8e605..8a38275 100644 --- a/community/main.tf +++ b/community/main.tf @@ -8,14 +8,16 @@ terraform { } required_providers { + required_version = "= 1.9.6" + aws = { source = "hashicorp/aws" - version = "~> 4.0" + version = "~> 5.0" } cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } } diff --git a/infrastructure/certificate.tf b/infrastructure/certificate.tf index c77cb2e..e616c2f 100644 --- a/infrastructure/certificate.tf +++ b/infrastructure/certificate.tf @@ -22,7 +22,7 @@ resource "cloudflare_record" "dns_instance_validation" { zone_id = data.cloudflare_zone.dns_zone.id name = each.value.name - value = trimsuffix(each.value.record, ".") + content = trimsuffix(each.value.record, ".") type = each.value.type ttl = 1 proxied = false diff --git a/infrastructure/region/network.tf b/infrastructure/region/network.tf index 0508b39..a4a97cc 100644 --- a/infrastructure/region/network.tf +++ b/infrastructure/region/network.tf @@ -32,7 +32,7 @@ resource "aws_route_table" "public" { resource "aws_eip" "nat" { count = 2 - vpc = true + domain = "vpc" tags = { Region = data.aws_region.current.name diff --git a/infrastructure/versions.tf b/infrastructure/versions.tf index c238c02..9669934 100644 --- a/infrastructure/versions.tf +++ b/infrastructure/versions.tf @@ -1,14 +1,16 @@ terraform { required_version = "= 1.7.5" required_providers { + required_version = "= 1.9.6" + aws = { source = "hashicorp/aws" - version = "~> 4.0" + version = "~> 5.0" } cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } } diff --git a/ios_pushserver/main.tf b/ios_pushserver/main.tf index 5aa1b47..e1f6e1a 100644 --- a/ios_pushserver/main.tf +++ b/ios_pushserver/main.tf @@ -8,14 +8,16 @@ terraform { } required_providers { + required_version = "= 1.9.6" + aws = { source = "hashicorp/aws" - version = "~> 4.0" + version = "~> 5.0" } cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } } diff --git a/os-builds/main.tf b/os-builds/main.tf index 88c48a7..90b1bdd 100644 --- a/os-builds/main.tf +++ b/os-builds/main.tf @@ -9,9 +9,11 @@ terraform { required_providers { + required_version = "= 1.9.6" + cloudflare = { source = "cloudflare/cloudflare" - version = "~> 4" + version = "~> 4.0" } } } diff --git a/private_demo/main.tf b/private_demo/main.tf index be2bf6b..5b23208 100644 --- a/private_demo/main.tf +++ b/private_demo/main.tf @@ -8,14 +8,16 @@ terraform { } required_providers { + required_version = "= 1.9.6" + aws = { source = "hashicorp/aws" - version = "~> 4.0" + version = "~> 5.0" } cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } } diff --git a/service_hub_bots/main.tf b/service_hub_bots/main.tf index 25b2cb7..cf8cc14 100644 --- a/service_hub_bots/main.tf +++ b/service_hub_bots/main.tf @@ -8,14 +8,16 @@ terraform { } required_providers { + required_version = "= 1.9.6" + aws = { source = "hashicorp/aws" - version = "~> 4.0" + version = "~> 5.0" } cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } } diff --git a/static_dns/main.tf b/static_dns/main.tf index a0d8d20..5c9ed0a 100644 --- a/static_dns/main.tf +++ b/static_dns/main.tf @@ -8,9 +8,11 @@ terraform { } required_providers { + required_version = "= 1.9.6" + cloudflare = { source = "cloudflare/cloudflare" - version = "~> 3.0" + version = "~> 4.0" } } } diff --git a/static_dns/record._checkdns.tf b/static_dns/record._checkdns.tf index ddb4823..555fd13 100644 --- a/static_dns/record._checkdns.tf +++ b/static_dns/record._checkdns.tf @@ -2,7 +2,7 @@ resource "cloudflare_record" "_checkdns" { zone_id = data.cloudflare_zone.dns_zone.id name = "_checkdns" - value = "1.1.1.1" + content = "1.1.1.1" type = "A" ttl = 1 proxied = false