Skip to content

Commit 1cc46bf

Browse files
committed
aws_elasticache_serverless_cache: make values computed
1 parent 46ad7a4 commit 1cc46bf

File tree

1 file changed

+19
-8
lines changed

1 file changed

+19
-8
lines changed

internal/service/elasticache/serverless_cache.go

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -200,14 +200,19 @@ func (r *serverlessCacheResource) Schema(ctx context.Context, request resource.S
200200
Attributes: map[string]schema.Attribute{
201201
"maximum": schema.Int64Attribute{
202202
Optional: true,
203+
Computed: true,
204+
PlanModifiers: []planmodifier.Int64{
205+
int64planmodifier.UseStateForUnknown(),
206+
},
203207
},
204208
"minimum": schema.Int64Attribute{
205209
Optional: true,
210+
Computed: true,
206211
Validators: []validator.Int64{
207-
int64validator.Any(
208-
int64validator.OneOf(0),
209-
int64validator.Between(1, 5000),
210-
),
212+
int64validator.Between(1, 5000),
213+
},
214+
PlanModifiers: []planmodifier.Int64{
215+
int64planmodifier.UseStateForUnknown(),
211216
},
212217
},
213218
names.AttrUnit: schema.StringAttribute{
@@ -226,17 +231,23 @@ func (r *serverlessCacheResource) Schema(ctx context.Context, request resource.S
226231
Attributes: map[string]schema.Attribute{
227232
"maximum": schema.Int64Attribute{
228233
Optional: true,
234+
Computed: true,
229235
Validators: []validator.Int64{
230236
int64validator.Between(1000, 15000000),
231237
},
238+
PlanModifiers: []planmodifier.Int64{
239+
int64planmodifier.UseStateForUnknown(),
240+
},
232241
},
233242
"minimum": schema.Int64Attribute{
234243
Optional: true,
244+
Computed: true,
235245
Validators: []validator.Int64{
236-
int64validator.Any(
237-
int64validator.OneOf(0),
238-
int64validator.Between(1000, 15000000),
239-
)},
246+
int64validator.Between(1000, 15000000),
247+
},
248+
PlanModifiers: []planmodifier.Int64{
249+
int64planmodifier.UseStateForUnknown(),
250+
},
240251
},
241252
},
242253
},

0 commit comments

Comments
 (0)