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

[FEATURE] Support for readonly flag in opensearch_snapshot_repository resource #143

Closed
shmokmt opened this issue Jan 4, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@shmokmt
Copy link

shmokmt commented Jan 4, 2024

Is your feature request related to a problem?

During the migration of an OpenSearch cluster, preventing write operations on the destination OpenSearch can avoid accidents.

What solution would you like?

I hope readonly flag in opensearch_snapshot_repository resource like below.

# Create a snapshot repository
resource "opensearch_snapshot_repository" "repo" {
  name = "es-index-backups"
  type = "s3"
  settings = {
    bucket   = "es-index-backups"
    region   = "us-east-1"
    role_arn = "arn:aws:iam::123456789012:role/MyRole"
    readonly = true
  }
}

What alternatives have you considered?

A clear and concise description of any alternative solutions or features you've considered.

Do you have any additional context?

@shmokmt shmokmt added enhancement New feature or request untriaged labels Jan 4, 2024
@prudhvigodithi prudhvigodithi added good first issue Good for newcomers and removed untriaged labels Feb 12, 2024
@prudhvigodithi
Copy link
Member

[Triage]
Hey @shmokmt I assume you are looking for the following when readonly = true is added

  "index_settings": {
    "index.blocks.read_only": false
  },

This snapshot feature was added from PR #125, can you please take a look and see if you can contribute ?

Thanks
Adding @duboisph @rblcoder @bbarani

@duboisph
Copy link
Contributor

This request is regarding the opensearch_snapshot_repository registering, not Snapshot Management feature added in #125.

That said, looking at the opensearch_snapshot_repository code, this should already work out of the box. The settings map is passed completely to the API.

You can use all settings as allowed by the API, docs: https://opensearch.org/docs/latest/api-reference/snapshots/create-repository/

@shmokmt Have you tried this and isn't it working?

@shmokmt
Copy link
Author

shmokmt commented Feb 13, 2024

I'm sorry. It seems it was my misunderstanding.
It worked fine. thanks!

@shmokmt shmokmt closed this as completed Feb 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants