Skip to content

Commit

Permalink
Update type check
Browse files Browse the repository at this point in the history
  • Loading branch information
asaha2 committed Sep 18, 2023
1 parent bd41fda commit a818a1e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions digitalocean/loadbalancer/datasource_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ func DataSourceDigitalOceanLoadbalancer() *schema.Resource {
},
"type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "the type of the load balancer (GLOBAL or REGIONAL)",
},
Expand Down
8 changes: 4 additions & 4 deletions digitalocean/loadbalancer/datasource_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ data "digitalocean_loadbalancer" "foobar" {
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "size_unit", "1"),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "type", "REGIONAL"),
"data.digitalocean_loadbalancer.foobar", "type", ""),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "forwarding_rule.#", "1"),
resource.TestCheckTypeSetElemNestedAttrs(
Expand Down Expand Up @@ -112,7 +112,7 @@ data "digitalocean_loadbalancer" "foobar" {
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "size_unit", "1"),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "type", "REGIONAL"),
"data.digitalocean_loadbalancer.foobar", "type", ""),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "forwarding_rule.#", "1"),
resource.TestCheckTypeSetElemNestedAttrs(
Expand Down Expand Up @@ -178,7 +178,7 @@ data "digitalocean_loadbalancer" "foobar" {
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "size_unit", "6"),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "type", "REGIONAL"),
"data.digitalocean_loadbalancer.foobar", "type", ""),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "forwarding_rule.#", "1"),
resource.TestCheckTypeSetElemNestedAttrs(
Expand Down Expand Up @@ -242,7 +242,7 @@ data "digitalocean_loadbalancer" "foobar" {
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "size_unit", "6"),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "type", "REGIONAL"),
"data.digitalocean_loadbalancer.foobar", "type", ""),
resource.TestCheckResourceAttr(
"data.digitalocean_loadbalancer.foobar", "forwarding_rule.#", "1"),
resource.TestCheckTypeSetElemNestedAttrs(
Expand Down
1 change: 1 addition & 0 deletions digitalocean/loadbalancer/resource_loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,7 @@ func resourceDigitalOceanLoadBalancerV0() *schema.Resource {
},
"type": {
Type: schema.TypeString,
Optional: true,
Computed: true,
Description: "the type of the load balancer (GLOBAL or REGIONAL)",
},
Expand Down
4 changes: 2 additions & 2 deletions digitalocean/loadbalancer/resource_loadbalancer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestAccDigitalOceanLoadbalancer_Basic(t *testing.T) {
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "region", "nyc3"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "type", "REGIONAL"),
"digitalocean_loadbalancer.foobar", "type", ""),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "size_unit", "1"),
resource.TestCheckResourceAttr(
Expand Down Expand Up @@ -96,7 +96,7 @@ func TestAccDigitalOceanLoadbalancer_Updated(t *testing.T) {
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "region", "nyc3"),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "type", "REGIONAL"),
"digitalocean_loadbalancer.foobar", "type", ""),
resource.TestCheckResourceAttr(
"digitalocean_loadbalancer.foobar", "size_unit", "1"),
resource.TestCheckResourceAttr(
Expand Down

0 comments on commit a818a1e

Please sign in to comment.