-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add system-user resource #188
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
0c87ba2
to
6cb177c
Compare
6cb177c
to
59256e1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nice, couple of minor comments. We'd need a changelog entry here as well please.
Importer: &schema.ResourceImporter{ | ||
StateContext: schema.ImportStatePassthroughContext, | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it ever makes sense to import this resource? A user would never be able to import the password/hash and so it's pretty likely there would be changes to be applied.
Given the 'create' doesn't actually create the user I'd be inclined to just make this not importable. WDYT?
Importer: &schema.ResourceImporter{ | |
StateContext: schema.ImportStatePassthroughContext, | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh that's true and making the resource not importable makes sense.
Fixed it!
a641bcd
resource "elasticstack_elasticsearch_security_system_user" "kibana_system" { | ||
username = "kibana_system" | ||
|
||
// use hashed password: see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html#security-api-put-user-request-body |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I initially read this comment as if I couldn't set the plaintext password.
// use hashed password: see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html#security-api-put-user-request-body | |
// For details on how to generate the hashed password see https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html#security-api-put-user-request-body |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small update to the docs here. Looking great!
Co-authored-by: Toby Brain <[email protected]>
Co-authored-by: Toby Brain <[email protected]>
Can we get a release? Please 😍 |
@Fuco1 we'll have a release out in the next 2 weeks |
Resolves #104
This PR adds
elasticstack_elasticsearch_security_system_user
resource to manage built-in system user.