@@ -17,7 +17,6 @@ import (
17
17
"github.com/hashicorp/terraform-plugin-framework/path"
18
18
"github.com/hashicorp/terraform-plugin-framework/resource"
19
19
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
20
- "github.com/hashicorp/terraform-plugin-framework/resource/schema/int32default"
21
20
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier"
22
21
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
23
22
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
@@ -72,14 +71,14 @@ func (r *resourceGatewayResource) Schema(ctx context.Context, request resource.S
72
71
},
73
72
"ipv4_addresses_per_eni" : schema.Int32Attribute {
74
73
Optional : true ,
74
+ Computed : true ,
75
75
Validators : []validator.Int32 {
76
76
int32validator .AtLeast (1 ),
77
77
int32validator .AtMost (62 ),
78
78
},
79
79
PlanModifiers : []planmodifier.Int32 {
80
80
int32planmodifier .RequiresReplace (),
81
81
},
82
- Default : int32default .StaticInt32 (16 ),
83
82
},
84
83
names .AttrName : schema.StringAttribute {
85
84
Required : true ,
@@ -152,7 +151,7 @@ func (r *resourceGatewayResource) Create(ctx context.Context, request resource.C
152
151
153
152
// Ipv4AddressesPerEni is irrelevant if IPAddressType is IPv6
154
153
if data .IPAddressType .ValueEnum () != awstypes .ResourceGatewayIpAddressTypeIpv6 {
155
- input .Ipv4AddressesPerEni = fwflex .Int32FromFramework (ctx , data .Ipv4AddressesPerEni )
154
+ input .Ipv4AddressesPerEni = fwflex .Int32FromFramework (ctx , data .IPV4AddressesPerEni )
156
155
}
157
156
158
157
outputCRG , err := conn .CreateResourceGateway (ctx , & input )
@@ -376,7 +375,7 @@ type resourceGatewayResourceModel struct {
376
375
ARN types.String `tfsdk:"arn"`
377
376
ID types.String `tfsdk:"id"`
378
377
IPAddressType fwtypes.StringEnum [awstypes.ResourceGatewayIpAddressType ] `tfsdk:"ip_address_type"`
379
- Ipv4AddressesPerEni types.Int32 `tfsdk:"ipv4_addresses_per_eni"`
378
+ IPV4AddressesPerEni types.Int32 `tfsdk:"ipv4_addresses_per_eni"`
380
379
Name types.String `tfsdk:"name"`
381
380
SecurityGroupIDs fwtypes.SetOfString `tfsdk:"security_group_ids"`
382
381
Status fwtypes.StringEnum [awstypes.ResourceGatewayStatus ] `tfsdk:"status"`
0 commit comments