terraform-provider-elasticstack icon indicating copy to clipboard operation
terraform-provider-elasticstack copied to clipboard

[Feature] Support for API Key Management

Open BenB196 opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. Managing Elasticsearch API keys is somewhat cumbersome, especially on large scale deployments where you want fine grain permission controls.

Describe the resource you would like to have implemented. Ability to manage/create API keys via Terraform.

Describe the solution you'd like I'd like to be able to specify an API key resource:

  • For creation and be able to get back the information needed for using the API key.
  • That exists and delete it via terraform.

I'd like to be able to get a list of existing API keys via a data source.

Describe alternatives you've considered You can use the Elasticsearch API via something like curl:

  • Create API Key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
    • Grant API Key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-grant-api-key.html
  • Delete API Key https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-invalidate-api-key.html
  • API Key Data Source https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-get-api-key.html
  • API Key List Data Source https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-query-api-key.html

Additional context Security Resources are already partially supported via user and role

BenB196 avatar Feb 14 '22 17:02 BenB196

I started work here: https://github.com/jitbasemartin/terraform-provider-elasticstack/tree/feature/issue-70 but I think it's too much for me :/ I will try to continue later but if someone wants to start something else I won't be angry ^^

jitbasemartin avatar Mar 22 '22 20:03 jitbasemartin

+1

vladyslav-sokolov avatar Apr 21 '22 08:04 vladyslav-sokolov

+1 on this feature

strelok899 avatar Sep 15 '22 16:09 strelok899

This has been released with 0.5.0

tobio avatar Dec 07 '22 00:12 tobio