Skip to content

fix: Add the ability to configure policy for cross cluster OpenSearch #31

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

Conversation

ofirmac
Copy link

@ofirmac ofirmac commented Nov 5, 2024

Description

This change modifies the default behavior of the policy creation for cross-cluster access in AWS OpenSearch. Specifically, it enables the creation of policies with the "es:ESCrossClusterGet" action without the /* suffix at the end of the ARN, as required by AWS for certain cross-cluster access configurations.

Motivation and Context

The modification aligns with the AWS documentation for cross-cluster replication (link to AWS article), which specifies that the Action field for cross-cluster requests must omit the /* suffix. By default, this change ensures the correct format for the policy without impacting other configurations.

Breaking Changes

No, this change does not break backward compatibility with the current major version.

How Has This Been Tested?

  • I have tested and validated these changes locally by creating the OpenSearch configuration with the modified policy in my module.
  • I have not updated the examples/* directory, as there are no existing examples for cross-cluster configurations.
  • I have executed pre-commit run -a on my pull request with the following results:
    • Terraform fmt: Passed
    • Terraform wrapper with for_each in module: Passed
    • Terraform docs: Passed
    • Terraform validate with tflint: Passed
    • Terraform validate: Passed
    • Check for merge conflicts: Passed
    • Fix end of files: Passed
    • Trim trailing whitespace: Passed

@ofirmac ofirmac changed the title add the ability to configure policy for cross cluster OpenSearch fix/add the ability to configure policy for cross cluster OpenSearch Nov 6, 2024
@ofirmac ofirmac changed the title fix/add the ability to configure policy for cross cluster OpenSearch fix: add the ability to configure policy for cross cluster OpenSearch Nov 6, 2024
@ofirmac ofirmac changed the title fix: add the ability to configure policy for cross cluster OpenSearch fix: Add the ability to configure policy for cross cluster OpenSearch Nov 6, 2024
[for path in try(statement.value.resource_paths, ["*"]) : "${aws_opensearch_domain.this[0].arn}/${path}"]
[
for path in try(statement.value.resource_paths, ["*"]) :
"${aws_opensearch_domain.this[0].arn}${path == "/*" ? "/*" : path}"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a breaking change because the assumption by users is that / is already there

Copy link

This PR has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this PR will be closed in 10 days

@github-actions github-actions bot added the stale label Dec 30, 2024
Copy link

This PR was automatically closed because of stale in 10 days

@github-actions github-actions bot closed this Jan 10, 2025
Copy link

github-actions bot commented Feb 9, 2025

I'm going to lock this pull request 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 related to this change, 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 Feb 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants