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

database replicas: set uuid on read. #964

Merged
merged 1 commit into from
Mar 21, 2023
Merged

Conversation

andrewsomething
Copy link
Member

As pointed out in #878, we've exposed the uuid of a database replica, but it is not set during imports. We only set it in the create method. It should be set in the read method as well.

Test change on its own shows the problem:

=== CONT  TestAccDigitalOceanDatabaseReplica_importBasic
    import_database_replica_test.go:23: ImportStateVerify attributes not equivalent. Difference is shown below. Top is actual, bottom is expected.
        
        (map[string]string) {
        }
        
        
        (map[string]string) (len=1) {
         (string) (len=4) "uuid": (string) (len=36) "bcb92ee3-5f0b-4b90-8a43-a0350b718396"
        }
--- FAIL: TestAccDigitalOceanDatabaseReplica_importBasic (509.30s)

Fixed with the code change:

=== RUN   TestAccDigitalOceanDatabaseReplica_importBasic
=== PAUSE TestAccDigitalOceanDatabaseReplica_importBasic
=== CONT  TestAccDigitalOceanDatabaseReplica_importBasic
--- PASS: TestAccDigitalOceanDatabaseReplica_importBasic (601.54s)
PASS
ok      github.com/digitalocean/terraform-provider-digitalocean/digitalocean/database   601.579s

Copy link
Contributor

@scotchneat scotchneat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏽

@andrewsomething andrewsomething merged commit 3e81fb5 into main Mar 21, 2023
@andrewsomething andrewsomething deleted the asb/issues/878 branch March 21, 2023 18:25
@JoeyHoutenbos
Copy link

Thanks for fixing this. Any idea when it will be released?

@andrewsomething
Copy link
Member Author

@JoeyHoutenbos We'll get a new release cut: #965

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants