v2

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompatibleWithNodeRoles

func CompatibleWithNodeRoles(version string) (bool, error)

func ElasticsearchPayload

func ElasticsearchPayload(ctx context.Context, plan types.Object, state *types.Object, updateResources *models.DeploymentUpdateResources, dtID, version string, useNodeRoles bool) (*models.ElasticsearchPayload, diag.Diagnostics)

func ElasticsearchRemoteClusterSchema

func ElasticsearchRemoteClusterSchema() schema.Attribute

func ElasticsearchRemoteClustersPayload

func ElasticsearchRemoteClustersPayload(ctx context.Context, clustersTF types.Set) (*models.RemoteResources, diag.Diagnostics)

func ElasticsearchSchema

func ElasticsearchSchema() schema.Attribute

func EnrichElasticsearchTemplate

func EnrichElasticsearchTemplate(tpl *models.ElasticsearchPayload, templateId, version string, useNodeRoles bool) *models.ElasticsearchPayload

func EnrichWithEmptyTopologies

func EnrichWithEmptyTopologies(tpl, want *models.ElasticsearchPayload) *models.ElasticsearchPayload

func IsElasticsearchStopped

func IsElasticsearchStopped(res *models.ElasticsearchResourceInfo) bool

IsElasticsearchStopped returns true if the resource is stopped.

func SetUnknownOnTopologySizeChange added in v0.8.0

func SetUnknownOnTopologySizeChange() planmodifier.Set

func UseNodeRoles

func UseNodeRoles(ctx context.Context, stateVersion, planVersion types.String, planElasticsearch types.Object) (bool, diag.Diagnostics)

func UseNodeRolesDefault

func UseNodeRolesDefault() nodeRolesDefault

func UseNodeTypesDefault

func UseNodeTypesDefault() nodeTypesDefault

func UseStateForUnknownUnlessNameOrKibanaStateChanges added in v0.8.0

func UseStateForUnknownUnlessNameOrKibanaStateChanges() planmodifier.String

Use current state for instead of unknown, unless the deployment name change or Kibana is being enabled/disabled

func UseTopologyStateForUnknown

func UseTopologyStateForUnknown(topologyAttributeName string) useTopologyState

Use current state for a topology's attribute if the topology's state is not nil and the template attribute has not changed

func VersionSupportsNodeRoles added in v0.9.0

func VersionSupportsNodeRoles() validator.Set

func VersionSupportsNodeTypes added in v0.9.0

func VersionSupportsNodeTypes() validator.String

Types

type Elasticsearch

type Elasticsearch struct {
	Autoscale        *bool                                    `tfsdk:"autoscale"`
	RefId            *string                                  `tfsdk:"ref_id"`
	ResourceId       *string                                  `tfsdk:"resource_id"`
	Region           *string                                  `tfsdk:"region"`
	CloudID          *string                                  `tfsdk:"cloud_id"`
	HttpEndpoint     *string                                  `tfsdk:"http_endpoint"`
	HttpsEndpoint    *string                                  `tfsdk:"https_endpoint"`
	HotTier          *ElasticsearchTopology                   `tfsdk:"hot"`
	CoordinatingTier *ElasticsearchTopology                   `tfsdk:"coordinating"`
	MasterTier       *ElasticsearchTopology                   `tfsdk:"master"`
	WarmTier         *ElasticsearchTopology                   `tfsdk:"warm"`
	ColdTier         *ElasticsearchTopology                   `tfsdk:"cold"`
	FrozenTier       *ElasticsearchTopology                   `tfsdk:"frozen"`
	MlTier           *ElasticsearchTopology                   `tfsdk:"ml"`
	Config           *ElasticsearchConfig                     `tfsdk:"config"`
	RemoteCluster    ElasticsearchRemoteClusters              `tfsdk:"remote_cluster"`
	Snapshot         *ElasticsearchSnapshot                   `tfsdk:"snapshot"`
	SnapshotSource   *ElasticsearchSnapshotSource             `tfsdk:"snapshot_source"`
	Extension        ElasticsearchExtensions                  `tfsdk:"extension"`
	TrustAccount     ElasticsearchTrustAccounts               `tfsdk:"trust_account"`
	TrustExternal    ElasticsearchTrustExternals              `tfsdk:"trust_external"`
	Strategy         *string                                  `tfsdk:"strategy"`
	KeystoreContents map[string]ElasticsearchKeystoreContents `tfsdk:"keystore_contents"`
}

type ElasticsearchConfig

type ElasticsearchConfig v1.ElasticsearchConfig

func (*ElasticsearchConfig) IsEmpty

func (c *ElasticsearchConfig) IsEmpty() bool

type ElasticsearchExtensions

type ElasticsearchExtensions v1.ElasticsearchExtensions

type ElasticsearchKeystoreContents added in v0.9.0

type ElasticsearchKeystoreContents struct {
	Value  string `tfsdk:"value"`
	AsFile *bool  `tfsdk:"as_file"`
}

type ElasticsearchKeystoreContentsTF added in v0.9.0

type ElasticsearchKeystoreContentsTF struct {
	Value  types.String `tfsdk:"value"`
	AsFile types.Bool   `tfsdk:"as_file"`
}

type ElasticsearchRemoteCluster

type ElasticsearchRemoteCluster struct {
	DeploymentId    *string `tfsdk:"deployment_id"`
	Alias           *string `tfsdk:"alias"`
	RefId           *string `tfsdk:"ref_id"`
	SkipUnavailable *bool   `tfsdk:"skip_unavailable"`
}

type ElasticsearchRemoteClusterTF

type ElasticsearchRemoteClusterTF struct {
	DeploymentId    types.String `tfsdk:"deployment_id"`
	Alias           types.String `tfsdk:"alias"`
	RefId           types.String `tfsdk:"ref_id"`
	SkipUnavailable types.Bool   `tfsdk:"skip_unavailable"`
}

type ElasticsearchRemoteClusters

type ElasticsearchRemoteClusters []ElasticsearchRemoteCluster

type ElasticsearchSnapshot added in v0.7.0

type ElasticsearchSnapshot struct {
	Enabled    bool                                 `tfsdk:"enabled"`
	Repository *ElasticsearchSnapshotRepositoryInfo `tfsdk:"repository"`
}

type ElasticsearchSnapshotRepositoryInfo added in v0.7.0

type ElasticsearchSnapshotRepositoryInfo struct {
	Reference *ElasticsearchSnapshotRepositoryReference `tfsdk:"reference"`
}

type ElasticsearchSnapshotRepositoryReference added in v0.7.0

type ElasticsearchSnapshotRepositoryReference struct {
	RepositoryName string `tfsdk:"repository_name"`
}

type ElasticsearchSnapshotSource

type ElasticsearchSnapshotSource v1.ElasticsearchSnapshotSource

type ElasticsearchSnapshotTF added in v0.8.0

type ElasticsearchSnapshotTF struct {
	Enabled    bool         `tfsdk:"enabled"`
	Repository types.Object `tfsdk:"repository"` //< ElasticsearchSnapshotRepositoryInfo
}

type ElasticsearchTF

type ElasticsearchTF struct {
	Autoscale        types.Bool   `tfsdk:"autoscale"`
	RefId            types.String `tfsdk:"ref_id"`
	ResourceId       types.String `tfsdk:"resource_id"`
	Region           types.String `tfsdk:"region"`
	CloudID          types.String `tfsdk:"cloud_id"`
	HttpEndpoint     types.String `tfsdk:"http_endpoint"`
	HttpsEndpoint    types.String `tfsdk:"https_endpoint"`
	HotContentTier   types.Object `tfsdk:"hot"`
	CoordinatingTier types.Object `tfsdk:"coordinating"`
	MasterTier       types.Object `tfsdk:"master"`
	WarmTier         types.Object `tfsdk:"warm"`
	ColdTier         types.Object `tfsdk:"cold"`
	FrozenTier       types.Object `tfsdk:"frozen"`
	MlTier           types.Object `tfsdk:"ml"`
	Config           types.Object `tfsdk:"config"`
	RemoteCluster    types.Set    `tfsdk:"remote_cluster"`
	Snapshot         types.Object `tfsdk:"snapshot"`
	SnapshotSource   types.Object `tfsdk:"snapshot_source"`
	Extension        types.Set    `tfsdk:"extension"`
	TrustAccount     types.Set    `tfsdk:"trust_account"`
	TrustExternal    types.Set    `tfsdk:"trust_external"`
	Strategy         types.String `tfsdk:"strategy"`
	KeystoreContents types.Map    `tfsdk:"keystore_contents"`
}

type ElasticsearchTopologies

type ElasticsearchTopologies []ElasticsearchTopology

func (ElasticsearchTopologies) AsSet

type ElasticsearchTopology

type ElasticsearchTopology struct {
	InstanceConfigurationId *string                           `tfsdk:"instance_configuration_id"`
	Size                    *string                           `tfsdk:"size"`
	SizeResource            *string                           `tfsdk:"size_resource"`
	ZoneCount               int                               `tfsdk:"zone_count"`
	NodeTypeData            *string                           `tfsdk:"node_type_data"`
	NodeTypeMaster          *string                           `tfsdk:"node_type_master"`
	NodeTypeIngest          *string                           `tfsdk:"node_type_ingest"`
	NodeTypeMl              *string                           `tfsdk:"node_type_ml"`
	NodeRoles               []string                          `tfsdk:"node_roles"`
	Autoscaling             *ElasticsearchTopologyAutoscaling `tfsdk:"autoscaling"`
	// contains filtered or unexported fields
}

func CreateTierForTest

func CreateTierForTest(tierId string, tier ElasticsearchTopology) *ElasticsearchTopology

type ElasticsearchTopologyAutoscaling

type ElasticsearchTopologyAutoscaling v1.ElasticsearchTopologyAutoscaling

type ElasticsearchTopologyTF

type ElasticsearchTopologyTF struct {
	InstanceConfigurationId types.String `tfsdk:"instance_configuration_id"`
	Size                    types.String `tfsdk:"size"`
	SizeResource            types.String `tfsdk:"size_resource"`
	ZoneCount               types.Int64  `tfsdk:"zone_count"`
	NodeTypeData            types.String `tfsdk:"node_type_data"`
	NodeTypeMaster          types.String `tfsdk:"node_type_master"`
	NodeTypeIngest          types.String `tfsdk:"node_type_ingest"`
	NodeTypeMl              types.String `tfsdk:"node_type_ml"`
	NodeRoles               types.Set    `tfsdk:"node_roles"`
	Autoscaling             types.Object `tfsdk:"autoscaling"`
}

func (*ElasticsearchTopologyTF) HasNodeType

func (topology *ElasticsearchTopologyTF) HasNodeType() bool

type ElasticsearchTrustAccounts

type ElasticsearchTrustAccounts v1.ElasticsearchTrustAccounts

type ElasticsearchTrustExternals

type ElasticsearchTrustExternals v1.ElasticsearchTrustExternals

type PlanModifierResponse added in v0.8.0

type PlanModifierResponse interface {
	planmodifier.StringResponse | planmodifier.Int64Response
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL