latitudesh / terraform-provider-latitudesh

Latitude.sh Terraform Provider
https://registry.terraform.io/providers/latitudesh/latitudesh/latest/docs
Mozilla Public License 2.0
10 stars 4 forks source link

Fix/remove read from resources create methods #67

Closed ynhummel closed 5 months ago

ynhummel commented 5 months ago

What does this PR do?

Calling Read at the end of Create and Update operations can lead to inconsistent results, this PR aims to remove these calls from most of our resources.

The PR that removes tham from VIrtualNetwork and Assigments is https://github.com/latitudesh/terraform-provider-latitudesh/pull/66

Description of Task to be completed?

Remove the Read method from Create and Update methods and manually set the attributes in state file. Fix server reinstalling when created with a Tag.

How should this be manually tested?

you can run the Acceptance tests with:

TF_ACC=1 go test ./... -run "<Test-Name>" -v 

Where is:

to test the provider manually, you can follow Notion - Developing the Terraform Provider Locally

Any background context you want to provide?

https://latitude.atlassian.net/browse/PD-3890

What are the relevant GitHub issues (if any)?

https://github.com/latitudesh/terraform-provider-latitudesh/issues/65