diff --git a/02/terraform/iam/iam.tf b/02/terraform/iam/iam.tf index 41ddbec..78cecaf 100644 --- a/02/terraform/iam/iam.tf +++ b/02/terraform/iam/iam.tf @@ -291,7 +291,8 @@ resource "aws_iam_role" "eks_dude_role" { managed_policy_arns = [ "arn:aws:iam::aws:policy/AmazonEC2FullAccess", aws_iam_policy.iamPassRole.arn, - aws_iam_policy.EKSFullAccess.arn + aws_iam_policy.EKSFullAccess.arn, + "arn:aws:iam::aws:policy/AmazonOpenSearchServiceFullAccess", ] } diff --git a/02/terragrunt/modules/opensearch/main.tf b/02/terragrunt/modules/opensearch/main.tf index 0c4f2c2..4bb2129 100644 --- a/02/terragrunt/modules/opensearch/main.tf +++ b/02/terragrunt/modules/opensearch/main.tf @@ -1,5 +1,9 @@ data "aws_caller_identity" "current" {} data "aws_region" "current" {} +locals { + iam_state = data.terraform_remote_state.iam.outputs.iam +} + resource "aws_iam_service_linked_role" "cluster" { aws_service_name = "opensearchservice.amazonaws.com"