in ec/ecresource/deploymentresource/elasticsearch/v2/schema.go [55:159]
func ElasticsearchSchema() schema.Attribute {
return schema.SingleNestedAttribute{
Description: "Elasticsearch cluster definition",
Required: true,
Attributes: map[string]schema.Attribute{
"autoscale": schema.BoolAttribute{
Description: `Enable or disable autoscaling. Defaults to the setting coming from the deployment template.`,
Computed: true,
Optional: true,
PlanModifiers: []planmodifier.Bool{
boolplanmodifier.UseStateForUnknown(),
},
},
"ref_id": schema.StringAttribute{
Description: "A human readable reference for the Elasticsearch resource. The default value `main-elasticsearch` is recommended.",
Optional: true,
Computed: true,
PlanModifiers: []planmodifier.String{
planmodifiers.StringDefaultValue("main-elasticsearch"),
},
},
"resource_id": schema.StringAttribute{
Description: "The Elasticsearch resource unique identifier",
Computed: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
},
"region": schema.StringAttribute{
Description: "The Elasticsearch resource region",
Computed: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
},
"cloud_id": schema.StringAttribute{
Description: "The encoded Elasticsearch credentials to use in Beats or Logstash",
Computed: true,
PlanModifiers: []planmodifier.String{
UseStateForUnknownUnlessNameOrKibanaStateChanges(),
},
},
"http_endpoint": schema.StringAttribute{
Description: "The Elasticsearch resource HTTP endpoint",
Computed: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
},
"https_endpoint": schema.StringAttribute{
Description: "The Elasticsearch resource HTTPs endpoint",
Computed: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
},
"hot": elasticsearchTopologySchema(topologySchemaOptions{
tierName: "hot",
required: true,
nodeRolesImpactedBySizeChange: true,
}),
"coordinating": elasticsearchTopologySchema(topologySchemaOptions{
tierName: "coordinating",
}),
"master": elasticsearchTopologySchema(topologySchemaOptions{
tierName: "master",
}),
"warm": elasticsearchTopologySchema(topologySchemaOptions{
tierName: "warm",
}),
"cold": elasticsearchTopologySchema(topologySchemaOptions{
tierName: "cold",
}),
"frozen": elasticsearchTopologySchema(topologySchemaOptions{
tierName: "frozen",
}),
"ml": elasticsearchTopologySchema(topologySchemaOptions{
tierName: "ml",
}),
"trust_account": elasticsearchTrustAccountSchema(),
"trust_external": elasticsearchTrustExternalSchema(),
"config": elasticsearchConfigSchema(),
"remote_cluster": ElasticsearchRemoteClusterSchema(),
"snapshot": elasticsearchSnapshotSchema(),
"snapshot_source": ElasticsearchSnapshotSourceSchema(),
"extension": elasticsearchExtensionSchema(),
"strategy": schema.StringAttribute{
Description: "Configuration strategy type " + strings.Join(strategiesList, ", "),
Optional: true,
Validators: []validator.String{stringvalidator.OneOf(strategiesList...)},
},
"keystore_contents": keystoreContentsSchema(),
},
}
}