From 73bc70a0f6b3393839d788d5ec8d5bd2e9ae2bd9 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Thu, 14 May 2020 06:50:37 -0700 Subject: [PATCH 1/2] Refactors count logic to avoid dependency on apply --- main.tf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.tf b/main.tf index f58fe16..e5958d7 100644 --- a/main.tf +++ b/main.tf @@ -15,7 +15,7 @@ resource "aws_ram_principal_association" "this" { } resource "aws_ram_resource_share_accepter" "this" { - count = var.create_ram_principal_association && local.cross_account && var.auto_accept ? 1 : 0 + count = local.create_ram_resource_share_accepter && var.auto_accept ? 1 : 0 provider = aws @@ -32,5 +32,5 @@ data "aws_caller_identity" "owner" { } locals { - cross_account = join("", data.aws_caller_identity.this.*.account_id) != join("", data.aws_caller_identity.owner.*.account_id) + create_ram_resource_share_accepter = var.create_ram_principal_association ? data.aws_caller_identity.this[0].account_id != data.aws_caller_identity.owner[0].account_id : false } From ff57241605bd454159ec7ac89c19b44928fe57b4 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Thu, 14 May 2020 07:08:06 -0700 Subject: [PATCH 2/2] Bumps version to 2.0.1 --- .bumpversion.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index abcc8f4..22eceb9 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 2.0.0 +current_version = 2.0.1 commit = True message = Bumps version to {new_version} tag = False