Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Support HTTP idle timeout & Project ID" #904

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Revert "Support HTTP idle timeout & Project ID (#897)"
This reverts commit dc5ff85.
  • Loading branch information
andrewsomething committed Nov 22, 2022
commit b360ad1a2c73f1e5bcbf4ca8ae01f191895d1d78
21 changes: 0 additions & 21 deletions digitalocean/resource_digitalocean_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -365,18 +365,6 @@ func resourceDigitalOceanLoadBalancerV0() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},

"http_idle_timeout_seconds": {
Type: schema.TypeInt,
Optional: true,
Default: nil,
},

"project_id": {
Type: schema.TypeString,
Optional: true,
Default: "",
},
},
}
}
Expand Down Expand Up @@ -425,7 +413,6 @@ func buildLoadBalancerRequest(client *godo.Client, d *schema.ResourceData) (*god
EnableBackendKeepalive: d.Get("enable_backend_keepalive").(bool),
ForwardingRules: forwardingRules,
DisableLetsEncryptDNSRecords: godo.Bool(d.Get("disable_lets_encrypt_dns_records").(bool)),
ProjectID: d.Get("project_id").(string),
}
sizeUnit, ok := d.GetOk("size_unit")
if ok {
Expand All @@ -434,12 +421,6 @@ func buildLoadBalancerRequest(client *godo.Client, d *schema.ResourceData) (*god
opts.SizeSlug = d.Get("size").(string)
}

idleTimeout, ok := d.GetOk("http_idle_timeout_seconds")
if ok {
t := uint64(idleTimeout.(int))
opts.HTTPIdleTimeoutSeconds = &t
}

if v, ok := d.GetOk("droplet_tag"); ok {
opts.Tag = v.(string)
} else if v, ok := d.GetOk("droplet_ids"); ok {
Expand Down Expand Up @@ -524,8 +505,6 @@ func resourceDigitalOceanLoadbalancerRead(ctx context.Context, d *schema.Resourc
d.Set("enable_backend_keepalive", loadbalancer.EnableBackendKeepalive)
d.Set("droplet_tag", loadbalancer.Tag)
d.Set("vpc_uuid", loadbalancer.VPCUUID)
d.Set("http_idle_timeout_seconds", loadbalancer.HTTPIdleTimeoutSeconds)

if loadbalancer.SizeUnit > 0 {
d.Set("size_unit", loadbalancer.SizeUnit)
} else {
Expand Down
16 changes: 0 additions & 16 deletions digitalocean/resource_digitalocean_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ func TestAccDigitalOceanLoadbalancer_Basic(t *testing.T) {
"digitalocean_loadbalancer.foobar", "enable_backend_keepalive", "true"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "disable_lets_encrypt_dns_records", "false"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "http_idle_timeout_seconds", "90"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "project_id", "my-project-uuid"),
),
},
},
Expand Down Expand Up @@ -156,10 +152,6 @@ func TestAccDigitalOceanLoadbalancer_Updated(t *testing.T) {
"digitalocean_loadbalancer.foobar", "enable_backend_keepalive", "true"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "disable_lets_encrypt_dns_records", "false"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "http_idle_timeout_seconds", "90"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "project_id", "my-project-uuid"),
),
},
{
Expand Down Expand Up @@ -199,10 +191,6 @@ func TestAccDigitalOceanLoadbalancer_Updated(t *testing.T) {
"digitalocean_loadbalancer.foobar", "enable_backend_keepalive", "false"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "disable_lets_encrypt_dns_records", "true"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "http_idle_timeout_seconds", "120"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "project_id", "my-project-uuid"),
),
},
},
Expand Down Expand Up @@ -740,8 +728,6 @@ resource "digitalocean_loadbalancer" "foobar" {

enable_proxy_protocol = true
enable_backend_keepalive = true
http_idle_timeout_seconds = 90
project_id = "my-project-uuid"

droplet_ids = [digitalocean_droplet.foobar.id]
}`, rInt, rInt)
Expand Down Expand Up @@ -783,8 +769,6 @@ resource "digitalocean_loadbalancer" "foobar" {
enable_proxy_protocol = false
enable_backend_keepalive = false
disable_lets_encrypt_dns_records = true
http_idle_timeout_seconds = 120
project_id = "my-project-uuid"

droplet_ids = [digitalocean_droplet.foobar.id, digitalocean_droplet.foo.id]
}`, rInt, rInt, rInt)
Expand Down
1 change: 0 additions & 1 deletion docs/resources/loadbalancer.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ the backend service. Default value is `false`.
* `type` - (Required) An attribute indicating how and if requests from a client will be persistently served by the same backend Droplet. The possible values are `cookies` or `none`. If not specified, the default value is `none`.
* `cookie_name` - (Optional) The name to be used for the cookie sent to the client. This attribute is required when using `cookies` for the sticky sessions type.
* `cookie_ttl_seconds` - (Optional) The number of seconds until the cookie set by the Load Balancer expires. This attribute is required when using `cookies` for the sticky sessions type.
* `http_idle_timeout_seconds` - (Optional) The http idle timeout configuration in seconds. if not specified, this defaults to 60 seconds.


`healthcheck` supports the following:
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.90.0
github.com/digitalocean/godo v1.87.0
github.com/hashicorp/awspolicyequivalence v1.5.0
github.com/hashicorp/go-uuid v1.0.2
github.com/hashicorp/go-version v1.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,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.90.0 h1:mnluEWL5eXFNYnLzHFuwsPuXZsWmzGoMNYSLZi9QPgc=
github.com/digitalocean/godo v1.90.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA=
github.com/digitalocean/godo v1.87.0 h1:U6jyE7Ga+6NkAa8pnpgrKk0lEU1e3Fc/kWipC9tARds=
github.com/digitalocean/godo v1.87.0/go.mod h1:NRpFznZFvhHjBoqZAaOD3khVzsJ3EibzKqFL4R60dmA=
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/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
Expand Down
22 changes: 0 additions & 22 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.

16 changes: 12 additions & 4 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.

47 changes: 0 additions & 47 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.

48 changes: 32 additions & 16 deletions vendor/github.com/digitalocean/godo/apps_accessors.go

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

2 changes: 1 addition & 1 deletion vendor/github.com/digitalocean/godo/droplet_actions.go

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