From 0fb3237007c2e8d81a420f96181a2e9abf760c41 Mon Sep 17 00:00:00 2001 From: "patrick.herrera" Date: Mon, 17 Oct 2022 20:03:27 +1100 Subject: [PATCH] fix: Migrate away from 'override_json' which is deprecated in AWS Provider V4 - NOTE: 'override_policy_documents' is available since 3.28.0 --- infra/terraform/modules/_auth/provider.tf | 2 +- infra/terraform/modules/_lambda/iam.tf | 4 +++- infra/terraform/modules/_lambda/provider.tf | 2 +- infra/terraform/modules/okta_native/provider.tf | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/infra/terraform/modules/_auth/provider.tf b/infra/terraform/modules/_auth/provider.tf index 501d546..6312173 100644 --- a/infra/terraform/modules/_auth/provider.tf +++ b/infra/terraform/modules/_auth/provider.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3" + version = ">= 3.28" } } } diff --git a/infra/terraform/modules/_lambda/iam.tf b/infra/terraform/modules/_lambda/iam.tf index 66c0382..9e50d70 100644 --- a/infra/terraform/modules/_lambda/iam.tf +++ b/infra/terraform/modules/_lambda/iam.tf @@ -14,7 +14,9 @@ data "aws_iam_policy_document" "assume_role" { } data "aws_iam_policy_document" "execution" { - override_json = var.iam_policy_override_json + override_policy_documents = var.iam_policy_override_json == null ? [] : [ + var.iam_policy_override_json + ] statement { sid = "logs" diff --git a/infra/terraform/modules/_lambda/provider.tf b/infra/terraform/modules/_lambda/provider.tf index 501d546..6312173 100644 --- a/infra/terraform/modules/_lambda/provider.tf +++ b/infra/terraform/modules/_lambda/provider.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3" + version = ">= 3.28" } } } diff --git a/infra/terraform/modules/okta_native/provider.tf b/infra/terraform/modules/okta_native/provider.tf index 501d546..6312173 100644 --- a/infra/terraform/modules/okta_native/provider.tf +++ b/infra/terraform/modules/okta_native/provider.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 3" + version = ">= 3.28" } } }