From 473ba5df25e8b1b480c7dc661361b39c2ac8ce6d Mon Sep 17 00:00:00 2001 From: hougang512 <492858311@qq.com> Date: Fri, 28 Jun 2024 20:09:00 +0800 Subject: [PATCH] fix: Create a domain policy that implicitly depends_on domain (#15) --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index 03f443a..8c3fdf2 100644 --- a/main.tf +++ b/main.tf @@ -264,7 +264,7 @@ locals { resource "aws_opensearch_domain_policy" "this" { count = var.create && var.enable_access_policy && (local.create_access_policy || var.access_policies != null) ? 1 : 0 - domain_name = var.domain_name + domain_name = aws_opensearch_domain.this[0].domain_name access_policies = local.create_access_policy ? data.aws_iam_policy_document.this[0].json : var.access_policies }