security_role

package
v0.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 23, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDataSource

func NewDataSource() datasource.DataSource

NewDataSource exposes the security role data source for provider wiring.

func NewResource

func NewResource() resource.Resource

NewResource exposes the security role resource for provider wiring.

Types

type Resource

type Resource struct {
	*entitycore.KibanaResource[resourceModel]
}

func (*Resource) ConfigValidators

func (r *Resource) ConfigValidators(_ context.Context) []resource.ConfigValidator

func (*Resource) ImportState

func (*Resource) UpgradeState

func (r *Resource) UpgradeState(context.Context) map[int64]resource.StateUpgrader

UpgradeState migrates Plugin SDKv2 state (version 0) into the Plugin Framework shape used by this resource (version 1). The schema change reshapes a few SDK-legacy block layouts:

  • elasticsearch: SDK TypeList(MinItems:1,MaxItems:1) -> PF SingleNestedBlock. Unwrap the single-element list into a bare object.
  • elasticsearch.indices[*].field_security and elasticsearch.remote_indices[*].field_security: SDK TypeList(MaxItems:1) -> PF SingleNestedBlock. Unwrap (empty list -> null, one-element list -> the element).

In addition, the top-level optional sets that SDKv2 persisted as `[]` (cluster, run_as, base, remote_indices) are normalised to null so the migrated state matches what the PF flatten functions produce by default. `field_security.grant`/`except` are intentionally left as-is: flatten's hint-aware path round-trips either representation cleanly.