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 ¶
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 (r *Resource) ImportState(ctx context.Context, req resource.ImportStateRequest, resp *resource.ImportStateResponse)
func (*Resource) UpgradeState ¶
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.