Skip to content

Commit 74ca0ce

Browse files
Merge pull request #5869 from tiagolicanton/hongbin/mor-1889
magic_wan: support interface_address6 field for tunnels
2 parents 2d689fa + b712173 commit 74ca0ce

File tree

4 files changed

+10
-0
lines changed

4 files changed

+10
-0
lines changed

internal/services/magic_wan_gre_tunnel/custom_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type CustomMagicWANGRETunnelModel struct {
2020
InterfaceAddress types.String `tfsdk:"interface_address" json:"interface_address,required"`
2121
Name types.String `tfsdk:"name" json:"name,required"`
2222
Description types.String `tfsdk:"description" json:"description,optional"`
23+
InterfaceAddress6 types.String `tfsdk:"interface_address6" json:"interface_address6,optional"`
2324
Mtu types.Int64 `tfsdk:"mtu" json:"mtu,computed_optional"`
2425
TTL types.Int64 `tfsdk:"ttl" json:"ttl,computed_optional"`
2526
HealthCheck customfield.NestedObject[MagicWANGRETunnelHealthCheckModel] `tfsdk:"health_check" json:"health_check,computed_optional"`

internal/services/magic_wan_gre_tunnel/custom_schema.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ func customResourceSchema(ctx context.Context) schema.Schema {
5151
Description: "An optional description of the GRE tunnel.",
5252
Optional: true,
5353
},
54+
"interface_address6": schema.StringAttribute{
55+
Description: "A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127",
56+
Optional: true,
57+
},
5458
"mtu": schema.Int64Attribute{
5559
Description: "Maximum Transmission Unit (MTU) in bytes for the GRE tunnel. The minimum value is 576.",
5660
Computed: true,

internal/services/magic_wan_ipsec_tunnel/custom_model.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ type CustomMagicWANIPSECTunnelModel struct {
2020
Name types.String `tfsdk:"name" json:"name,required"`
2121
CustomerEndpoint types.String `tfsdk:"customer_endpoint" json:"customer_endpoint,optional"`
2222
Description types.String `tfsdk:"description" json:"description,optional"`
23+
InterfaceAddress6 types.String `tfsdk:"interface_address6" json:"interface_address6,optional"`
2324
PSK types.String `tfsdk:"psk" json:"psk,optional,no_refresh"`
2425
ReplayProtection types.Bool `tfsdk:"replay_protection" json:"replay_protection,computed_optional"`
2526
HealthCheck customfield.NestedObject[MagicWANIPSECTunnelHealthCheckModel] `tfsdk:"health_check" json:"health_check,computed_optional"`

internal/services/magic_wan_ipsec_tunnel/custom_schema.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ func customResourceSchema(ctx context.Context) schema.Schema {
4848
Description: "An optional description forthe IPsec tunnel.",
4949
Optional: true,
5050
},
51+
"interface_address6": schema.StringAttribute{
52+
Description: "A 127 bit IPV6 prefix from within the virtual_subnet6 prefix space with the address being the first IP of the subnet and not same as the address of virtual_subnet6. Eg if virtual_subnet6 is 2606:54c1:7:0:a9fe:12d2::/127 , interface_address6 could be 2606:54c1:7:0:a9fe:12d2:1:200/127",
53+
Optional: true,
54+
},
5155
"psk": schema.StringAttribute{
5256
Description: "A randomly generated or provided string for use in the IPsec tunnel.",
5357
Optional: true,

0 commit comments

Comments
 (0)