Skip to content

Commit

Permalink
LBAAS-3552: add lb ipv6 field
Browse files Browse the repository at this point in the history
  • Loading branch information
jvasilevsky committed Dec 2, 2024
1 parent b96ae91 commit d9e1176
Show file tree
Hide file tree
Showing 13 changed files with 342 additions and 55 deletions.
4 changes: 4 additions & 0 deletions digitalocean/loadbalancer/datasource_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,10 @@ func dataSourceDigitalOceanLoadbalancerRead(ctx context.Context, d *schema.Resou
d.Set("type", foundLoadbalancer.Type)
d.Set("network", foundLoadbalancer.Network)

if foundLoadbalancer.IPv6 != "" {
d.Set("ipv6", foundLoadbalancer.IPv6)
}

if err := d.Set("droplet_ids", flattenDropletIds(foundLoadbalancer.DropletIDs)); err != nil {
return diag.Errorf("[DEBUG] Error setting Load Balancer droplet_ids - error: %#v", err)
}
Expand Down
9 changes: 9 additions & 0 deletions digitalocean/loadbalancer/resource_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ func resourceDigitalOceanLoadBalancerV0() *schema.Resource {
Computed: true,
},

"ipv6": {
Type: schema.TypeString,
Computed: true,
},

"status": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -741,6 +746,10 @@ func resourceDigitalOceanLoadbalancerRead(ctx context.Context, d *schema.Resourc
d.Set("http_idle_timeout_seconds", loadbalancer.HTTPIdleTimeoutSeconds)
d.Set("project_id", loadbalancer.ProjectID)

if loadbalancer.IPv6 != "" {
d.Set("ipv6", loadbalancer.IPv6)
}

if loadbalancer.SizeUnit > 0 {
d.Set("size_unit", loadbalancer.SizeUnit)
} else {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/digitalocean/terraform-provider-digitalocean

require (
github.com/aws/aws-sdk-go v1.42.18
github.com/digitalocean/godo v1.129.0
github.com/digitalocean/godo v1.131.0
github.com/hashicorp/awspolicyequivalence v1.5.0
github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320
github.com/hashicorp/go-uuid v1.0.3
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ3
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/digitalocean/godo v1.129.0 h1:ov6v/O1N3cSuODgXBeTrwx9iYw44F4ZOHh/m9WsBp0I=
github.com/digitalocean/godo v1.129.0/go.mod h1:PU8JB6I1XYkQIdHFop8lLAY9ojp6M0XcU0TWaQSxbrc=
github.com/digitalocean/godo v1.131.0 h1:0WHymufAV5avpodT0h5/pucUVfO4v7biquOIqhLeROY=
github.com/digitalocean/godo v1.131.0/go.mod h1:PU8JB6I1XYkQIdHFop8lLAY9ojp6M0XcU0TWaQSxbrc=
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
Expand Down
13 changes: 13 additions & 0 deletions vendor/github.com/digitalocean/godo/CHANGELOG.md

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

4 changes: 2 additions & 2 deletions vendor/github.com/digitalocean/godo/apps.gen.go

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

49 changes: 49 additions & 0 deletions vendor/github.com/digitalocean/godo/apps.go

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

40 changes: 29 additions & 11 deletions vendor/github.com/digitalocean/godo/databases.go

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

80 changes: 42 additions & 38 deletions vendor/github.com/digitalocean/godo/godo.go

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

1 change: 1 addition & 0 deletions vendor/github.com/digitalocean/godo/load_balancers.go

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

Loading

0 comments on commit d9e1176

Please sign in to comment.