Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not create resource aws_ram_resource_share_accepter if aws sharing organization is enabled #116

Closed
laserpedro opened this issue Aug 16, 2023 · 2 comments

Comments

@laserpedro
Copy link

laserpedro commented Aug 16, 2023

problem

When sharing a tgw across two accounts within the same Organizations and RAM Sharing with AWS Organizations is enabled there is no need to create an aws_ram_resource_share_accepter as explained here.
however with the current module we cannot control this behavior using a module variable and the resource aws_ram_resource_share_accepter is created whether or not the sharing within the orga is enabled or not.

Describe the solution you'd like.

Add a variable called ram_sharing_organization_enabled set to false by default that would be added to the module so that when enabled the resource aws_ram_resource_share_accepter is not created. For instance:

resource "aws_ram_resource_share_accepter" "this" {
  count = !var.create_tgw && var.share_tgw && !var.ram_sharing_organization_enabled ? 1 : 0
  share_arn = var.ram_resource_share_arn
}
@laserpedro laserpedro changed the title Do not create resource aws_ram_resource_share_accepter if aws sharing organizations is enabled Do not create resource aws_ram_resource_share_accepter if aws sharing organization is enabled Aug 16, 2023
@laserpedro
Copy link
Author

Solved by using:

  create_tgw                            = false
  share_tgw                             = false

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant