From 6d027f8fbdbba1d7be0f90835cbf8ba406e035b7 Mon Sep 17 00:00:00 2001 From: hougang512 <492858311@qq.com> Date: Fri, 28 Jun 2024 09:26:24 +0800 Subject: [PATCH] =?UTF-8?q?Update=20main.tf=EF=BC=8Cdomain=5Fpolicy=20impl?= =?UTF-8?q?icitly=20depends=20on=20domain?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If do not establish implicit dependencies, a error is displayed when create a domain policy indicating that the specified domain cannot be found --- 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 }