Skip to content

Commit

Permalink
Add IPv4 Ranges Support (#164)
Browse files Browse the repository at this point in the history
* Add IPv4 ranges support

* Update test to include IP ranges
  • Loading branch information
zliang-akamai authored Nov 29, 2023
1 parent 5586d96 commit e039eb6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions builder/linode/builder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,7 @@ func TestBuilderPrepare_NetworkInterfaces(t *testing.T) {
VPC: "10.0.0.2",
NAT1To1: "any",
},
IPRanges: []string{"10.0.0.3/32"},
},
}

Expand Down
1 change: 1 addition & 0 deletions builder/linode/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ type Interface struct {
Primary bool `mapstructure:"primary"`
SubnetID *int `mapstructure:"subnet_id"`
IPv4 *InterfaceIPv4 `mapstructure:"ipv4"`
IPRanges []string `mapstructure:"ip_ranges"`
}

type Config struct {
Expand Down
2 changes: 2 additions & 0 deletions builder/linode/config.hcl2spec.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions builder/linode/step_create_linode.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ func flattenConfigInterface(i Interface) linodego.InstanceConfigInterfaceCreateO
Primary: i.Primary,
SubnetID: i.SubnetID,
IPv4: flattenConfigInterfaceIPv4(i.IPv4),
IPRanges: i.IPRanges,
}
}

Expand Down

0 comments on commit e039eb6

Please sign in to comment.