Skip to content

Conversation

@k-yomo
Copy link
Contributor

@k-yomo k-yomo commented Sep 15, 2022

Resolves #47

@elasticmachine
Copy link

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?

@k-yomo k-yomo force-pushed the support-security-role-mapping branch 3 times, most recently from dab7e80 to 05e5460 Compare September 15, 2022 16:07
@k-yomo k-yomo force-pushed the support-security-role-mapping branch from 05e5460 to 728ab6f Compare September 15, 2022 16:28
@k-yomo k-yomo marked this pull request as ready for review September 15, 2022 16:29
@tobio
Copy link
Member

tobio commented Sep 16, 2022

jenkins test this

Copy link
Member

@tobio tobio left a comment

Choose a reason for hiding this comment

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

We should include role_templates in the resource. Otherwise this looks great, thanks!

}

func (a *ApiClient) GetElasticsearchRoleMapping(ctx context.Context, roleMappingName string) (*models.RoleMapping, diag.Diagnostics) {
req := a.es.Security.GetRoleMapping.WithName(roleMappingName)
Copy link
Member

Choose a reason for hiding this comment

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

Can't we chain the WithContext call here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, it's not possible...!

Type: schema.TypeString,
Required: true,
DiffSuppressFunc: utils.DiffJsonSuppress,
Description: "A list of mustache templates that will be evaluated to determine the role names that should granted to the users that match the role mapping rules. This matches fields of users, rules can be grouped into `all` and `any` top level keys.",
Copy link
Member

Choose a reason for hiding this comment

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

This description is for role_templates which is missing from the resource schema.

@tobio
Copy link
Member

tobio commented Sep 16, 2022

Also needs a change log entry here :)

@tobio
Copy link
Member

tobio commented Oct 4, 2022

@k-yomo thanks for the groundwork here. Just wanted to check if you're still able to continue on with this one? If not are you ok with me adding the final changes to support role_templates to get this merged?

@k-yomo
Copy link
Contributor Author

k-yomo commented Oct 4, 2022

@tobio
I'm not sure when I can get to work on it, so yeah it would be great if you could add. Thank you!!

@tobio
Copy link
Member

tobio commented Oct 4, 2022

jenkins test this

@tobio
Copy link
Member

tobio commented Oct 4, 2022

jenkins test this

@tobio
Copy link
Member

tobio commented Oct 4, 2022

@dimuon are you able to take a look at the changes in this one?

@dimuon
Copy link
Contributor

dimuon commented Oct 4, 2022

@dimuon are you able to take a look at the changes in this one?

I'll take a look

Copy link
Contributor

@dimuon dimuon left a comment

Choose a reason for hiding this comment

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

LGTM

@tobio tobio merged commit 56e69bc into elastic:main Oct 5, 2022
@k-yomo k-yomo deleted the support-security-role-mapping branch October 5, 2022 08:56
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "elasticstack_elasticsearch_security_role_mapping Resource - terraform-provider-elasticstack"
subcategory: ""

Choose a reason for hiding this comment

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

should be under Security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Support for Role Mappings

5 participants