Skip to content

Commit cafff51

Browse files
committed
r/aws_vpclattice_resource_gateway: 'ipv4_addresses_per_eni' is Computed.
1 parent 4ae182a commit cafff51

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/service/vpclattice/resource_gateway.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"github.com/hashicorp/terraform-plugin-framework/path"
1818
"github.com/hashicorp/terraform-plugin-framework/resource"
1919
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
20-
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int32default"
2120
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int32planmodifier"
2221
"github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
2322
"github.com/hashicorp/terraform-plugin-framework/resource/schema/setplanmodifier"
@@ -72,14 +71,14 @@ func (r *resourceGatewayResource) Schema(ctx context.Context, request resource.S
7271
},
7372
"ipv4_addresses_per_eni": schema.Int32Attribute{
7473
Optional: true,
74+
Computed: true,
7575
Validators: []validator.Int32{
7676
int32validator.AtLeast(1),
7777
int32validator.AtMost(62),
7878
},
7979
PlanModifiers: []planmodifier.Int32{
8080
int32planmodifier.RequiresReplace(),
8181
},
82-
Default: int32default.StaticInt32(16),
8382
},
8483
names.AttrName: schema.StringAttribute{
8584
Required: true,
@@ -152,7 +151,7 @@ func (r *resourceGatewayResource) Create(ctx context.Context, request resource.C
152151

153152
// Ipv4AddressesPerEni is irrelevant if IPAddressType is IPv6
154153
if data.IPAddressType.ValueEnum() != awstypes.ResourceGatewayIpAddressTypeIpv6 {
155-
input.Ipv4AddressesPerEni = fwflex.Int32FromFramework(ctx, data.Ipv4AddressesPerEni)
154+
input.Ipv4AddressesPerEni = fwflex.Int32FromFramework(ctx, data.IPV4AddressesPerEni)
156155
}
157156

158157
outputCRG, err := conn.CreateResourceGateway(ctx, &input)
@@ -376,7 +375,7 @@ type resourceGatewayResourceModel struct {
376375
ARN types.String `tfsdk:"arn"`
377376
ID types.String `tfsdk:"id"`
378377
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"`
380379
Name types.String `tfsdk:"name"`
381380
SecurityGroupIDs fwtypes.SetOfString `tfsdk:"security_group_ids"`
382381
Status fwtypes.StringEnum[awstypes.ResourceGatewayStatus] `tfsdk:"status"`

0 commit comments

Comments
 (0)