You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Don't populate settings during read
There's a fair bit of complexity around handling computed settings. I'll look at adding this back in a follow up PR, but want to get this resource in a working state so we can make a new release.
This covers the case where settings are applied as part of an index template
* Remove other Default attributes
Description: "Value used to route indexing operations to a specific shard. If specified, this overwrites the `routing` value for indexing operations.",
53
52
Optional: true,
54
53
Computed: true,
55
-
Default: stringdefault.StaticString(""),
54
+
PlanModifiers: []planmodifier.String{
55
+
stringplanmodifier.UseStateForUnknown(),
56
+
planmodifiers.StringUseDefaultIfUnknown(""),
57
+
},
56
58
},
57
59
"is_hidden": schema.BoolAttribute{
58
60
Description: "If true, the alias is hidden.",
59
61
Optional: true,
60
62
Computed: true,
61
-
Default: booldefault.StaticBool(false),
63
+
PlanModifiers: []planmodifier.Bool{
64
+
boolplanmodifier.UseStateForUnknown(),
65
+
planmodifiers.BoolUseDefaultIfUnknown(false),
66
+
},
62
67
},
63
68
"is_write_index": schema.BoolAttribute{
64
69
Description: "If true, the index is the write index for the alias.",
65
70
Optional: true,
66
71
Computed: true,
67
-
Default: booldefault.StaticBool(false),
72
+
PlanModifiers: []planmodifier.Bool{
73
+
boolplanmodifier.UseStateForUnknown(),
74
+
planmodifiers.BoolUseDefaultIfUnknown(false),
75
+
},
68
76
},
69
77
"routing": schema.StringAttribute{
70
78
Description: "Value used to route indexing and search operations to a specific shard.",
71
79
Optional: true,
72
80
Computed: true,
73
-
Default: stringdefault.StaticString(""),
81
+
PlanModifiers: []planmodifier.String{
82
+
stringplanmodifier.UseStateForUnknown(),
83
+
planmodifiers.StringUseDefaultIfUnknown(""),
84
+
},
74
85
},
75
86
"search_routing": schema.StringAttribute{
76
87
Description: "Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.",
Description: "Set the number of replicas to the node count in the cluster. Set to a dash delimited lower and upper bound (e.g. 0-5) or use all for the upper bound (e.g. 0-all)",
Description: "Whether to allow Terraform to destroy the index. Unless this field is set to false in Terraform state, a terraform destroy or terraform apply command that deletes the instance will fail.",
479
+
PlanModifiers: []planmodifier.Bool{
480
+
planmodifiers.BoolUseDefaultIfUnknown(true),
481
+
},
470
482
},
471
483
"include_type_name": schema.BoolAttribute{
472
484
Description: "If true, a mapping type is expected in the body of mappings. Defaults to false. Supported for Elasticsearch 7.x.",
473
485
Optional: true,
474
486
Computed: true,
475
-
Default: booldefault.StaticBool(false),
487
+
PlanModifiers: []planmodifier.Bool{
488
+
planmodifiers.BoolUseDefaultIfUnknown(false),
489
+
},
476
490
},
477
491
"wait_for_active_shards": schema.StringAttribute{
478
492
Description: "The number of shard copies that must be active before proceeding with the operation. Set to `all` or any positive integer up to the total number of shards in the index (number_of_replicas+1). Default: `1`, the primary shard. This value is ignored when running against Serverless projects.",
479
493
Optional: true,
480
494
Computed: true,
481
-
Default: stringdefault.StaticString("1"),
495
+
PlanModifiers: []planmodifier.String{
496
+
planmodifiers.StringUseDefaultIfUnknown("1"),
497
+
},
482
498
},
483
499
"master_timeout": schema.StringAttribute{
484
500
Description: "Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error. Defaults to `30s`. This value is ignored when running against Serverless projects.",
485
501
Optional: true,
486
502
Computed: true,
487
-
Default: stringdefault.StaticString("30s"),
488
-
CustomType: customtypes.DurationType{},
503
+
PlanModifiers: []planmodifier.String{
504
+
planmodifiers.StringUseDefaultIfUnknown("30s"),
505
+
},
506
+
CustomType: customtypes.DurationType{},
489
507
},
490
508
"timeout": schema.StringAttribute{
491
509
Description: "Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error. Defaults to `30s`.",
0 commit comments