Skip to content

Commit

Permalink
databases: set replica size to state on read. (#1186)
Browse files Browse the repository at this point in the history
* Vendor godo changes.

* databases: set replica size to state on read.
  • Loading branch information
andrewsomething authored Jul 31, 2024
1 parent 3d6519a commit cffa11a
Show file tree
Hide file tree
Showing 12 changed files with 64 additions and 38 deletions.
2 changes: 0 additions & 2 deletions digitalocean/database/import_database_replica_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ func TestAccDigitalOceanDatabaseReplica_importBasic(t *testing.T) {
ImportStateVerify: true,
// Requires passing both the cluster ID and replica name
ImportStateIdFunc: testAccDatabaseReplicaImportID(resourceName),
// The DO API does not return the size on read, but it is required on create
ImportStateVerifyIgnore: []string{"size"},
},
// Test importing non-existent resource provides expected error.
{
Expand Down
1 change: 1 addition & 0 deletions digitalocean/database/resource_database_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ func resourceDigitalOceanDatabaseReplicaRead(ctx context.Context, d *schema.Reso
return diag.Errorf("Error retrieving DatabaseReplica: %s", err)
}

d.Set("size", replica.Size)
d.Set("region", replica.Region)
d.Set("tags", tag.FlattenTags(replica.Tags))

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.117.0
github.com/digitalocean/godo v1.119.1-0.20240726213151-e56b8a3e1755
github.com/hashicorp/awspolicyequivalence v1.5.0
github.com/hashicorp/go-uuid v1.0.3
github.com/hashicorp/go-version v1.6.0
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.117.0 h1:WVlTe09melDYTd7VCVyvHcNWbgB+uI1O115+5LOtdSw=
github.com/digitalocean/godo v1.117.0/go.mod h1:Vk0vpCot2HOAJwc5WE8wljZGtJ3ZtWIc8MQ8rF38sdo=
github.com/digitalocean/godo v1.119.1-0.20240726213151-e56b8a3e1755 h1:21uc6tNgFS/5MiYz+KzDhf5tVO38TN8FPO6803yNAjI=
github.com/digitalocean/godo v1.119.1-0.20240726213151-e56b8a3e1755/go.mod h1:WQVH83OHUy6gC4gXpEVQKtxTd4L5oCp+5OialidkPLY=
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.

32 changes: 18 additions & 14 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.

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

1 change: 1 addition & 0 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.

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

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

34 changes: 17 additions & 17 deletions vendor/github.com/digitalocean/godo/kubernetes.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.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ github.com/aws/aws-sdk-go/service/sts/stsiface
# github.com/davecgh/go-spew v1.1.1
## explicit
github.com/davecgh/go-spew/spew
# github.com/digitalocean/godo v1.117.0
# github.com/digitalocean/godo v1.119.1-0.20240726213151-e56b8a3e1755
## explicit; go 1.20
github.com/digitalocean/godo
github.com/digitalocean/godo/metrics
Expand Down

0 comments on commit cffa11a

Please sign in to comment.