delphix-integrations / terraform-provider-delphix

Repository for Delphix Terraform Provider built on DCT APIs.
https://integrations.delphix.com
11 stars 9 forks source link

HUBS-2073 Source changes #76

Closed ankit-patil-hubs closed 6 months ago

ankit-patil-hubs commented 6 months ago

Problem:

- Terraform SDK upgrade to v2 - Add new resource to add source config, supported only for Postgres currently # Solution:

Testing

ankit.patil@Ankit-Patils-MacBook-Pro terraform-provider-delphix % TESTARGS="-run Test_source_create_positive"  make testacc
TF_ACC=1 go test $(go list ./... | grep -v 'vendor') -v -run Test_source_create_positive -timeout 120m
?       terraform-provider-delphix      [no test files]
=== RUN   Test_source_create_positive
[DELPHIX] [INFO] 2024/03/12 19:47:18 Job result is COMPLETED
[DELPHIX] [INFO] 2024/03/12 19:47:19 [OK] Breaking poll - Status 200 reached.
[DELPHIX] [INFO] 2024/03/12 19:47:25 [OK] Breaking poll - Status 200 reached.
[DELPHIX] [INFO] 2024/03/12 19:47:31 [OK] Breaking poll - Status 200 reached.
[DELPHIX] [INFO] 2024/03/12 19:47:37 Job result is COMPLETED
[DELPHIX] [INFO] 2024/03/12 19:47:43 [OK] Breaking poll - Status 200 reached.
[DELPHIX] [INFO] 2024/03/12 19:47:52 Job result is COMPLETED
[DELPHIX] [INFO] 2024/03/12 19:47:53 [OK] Breaking poll - Status 404 reached.
--- PASS: Test_source_create_positive (55.05s)
PASS
ok      terraform-provider-delphix/internal/provider    56.417s
ankit.patil@Ankit-Patils-MacBook-Pro terraform-provider-delphix % make install
go build -o terraform-provider-delphix
mkdir -p ~/.terraform.d/plugins/delphix.com/dct/delphix/4.0.0/darwin_amd64
mv terraform-provider-delphix ~/.terraform.d/plugins/delphix.com/dct/delphix/4.0.0/darwin_amd64
ankit.patil@Ankit-Patils-MacBook-Pro terraform-provider-delphix % cd examples/appdata_dsource 
delphix_environment.unixsrc: Creating...
time_sleep.wait_30_seconds: Still creating... [10s elapsed]
delphix_environment.unixsrc: Still creating... [10s elapsed]
delphix_environment.unixtgt: Still creating... [10s elapsed]
time_sleep.wait_30_seconds: Still creating... [20s elapsed]
delphix_environment.unixsrc: Still creating... [20s elapsed]
delphix_environment.unixtgt: Still creating... [20s elapsed]
time_sleep.wait_30_seconds: Still creating... [30s elapsed]
time_sleep.wait_30_seconds: Creation complete after 30s [id=2024-03-20T14:58:08Z]
delphix_environment.unixsrc: Still creating... [30s elapsed]
delphix_environment.unixtgt: Still creating... [30s elapsed]
delphix_environment.unixsrc: Creation complete after 40s [id=13-UNIX_HOST_ENVIRONMENT-120]
delphix_database_postgresql.name: Creating...
delphix_environment.unixtgt: Still creating... [40s elapsed]
delphix_database_postgresql.name: Creation complete after 3s [id=13-APPDATA_STAGED_SOURCE_CONFIG-119]
delphix_appdata_dsource.ds1: Creating...
delphix_environment.unixtgt: Creation complete after 50s [id=13-UNIX_HOST_ENVIRONMENT-119]
delphix_appdata_dsource.ds1: Still creating... [10s elapsed]
delphix_appdata_dsource.ds1: Still creating... [20s elapsed]
delphix_appdata_dsource.ds1: Still creating... [30s elapsed]
delphix_appdata_dsource.ds1: Still creating... [40s elapsed]
delphix_appdata_dsource.ds1: Still creating... [50s elapsed]
delphix_appdata_dsource.ds1: Still creating... [1m0s elapsed]
delphix_appdata_dsource.ds1: Still creating... [1m10s elapsed]
delphix_appdata_dsource.ds1: Creation complete after 1m20s [id=13-APPDATA_CONTAINER-144]
delphix_vdb.example: Creating...
delphix_vdb.example: Still creating... [10s elapsed]
delphix_vdb.example: Still creating... [20s elapsed]
delphix_vdb.example: Creation complete after 27s [id=13-APPDATA_CONTAINER-145]
nick-mathison commented 6 months ago
      wait_time - default - 3 mins

What type of input does this value take? I assume integer?

And for the two default values, if they are left blank, it will be "false" and "3"?

Edit: NVM I see it in the code