Skip to content

Commit

Permalink
Merge pull request #71 from delphix-integrations/develop
Browse files Browse the repository at this point in the history
HUBS-2080 | Release Version 3.0.0 | Develop -> Main
  • Loading branch information
ankit-patil-hubs authored Oct 19, 2023
2 parents 2f9a77d + 7fb25ec commit 0196c20
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Visit https://goreleaser.com for documentation on how to customize this
# behavior.
env:
- PROVIDER_VERSION=2.1.0
- PROVIDER_VERSION=3.0.0
before:
hooks:
# this is just an example and not a requirement for provider building/publishing
Expand Down
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ HOSTNAME=delphix.com
NAMESPACE=dct
NAME=delphix
BINARY=terraform-provider-${NAME}
VERSION=2.1.0
VERSION=3.0.0
OS_ARCH=darwin_amd64

default: install
Expand Down
8 changes: 4 additions & 4 deletions docs/resources/appdata_dsource.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The linking of a dSource can be configured through various ingestion approaches.
# Link dSource using external backup.
resource "delphix_appdata_dsource" "dsource_name" {
source_id = SOURCE_ID
source_value = SOURCE_VALUE
group_id = GROUP_ID
log_sync_enabled = false
make_current_account_owner = true
Expand Down Expand Up @@ -46,7 +46,7 @@ resource "delphix_appdata_dsource" "dsource_name" {
# Link dSource using Delphix Initiated Backup.
resource "delphix_appdata_dsource" "dsource_name" {
source_id = SOURCE_ID
source_value = SOURCE_VALUE
group_id = GROUP_ID
log_sync_enabled = false
make_current_account_owner = true
Expand Down Expand Up @@ -76,7 +76,7 @@ resource "delphix_appdata_dsource" "dsource_name" {
# Link dSource using Single Database Ingestion.
resource "delphix_appdata_dsource" "dsource_name" {
source_id = SOURCE_ID
source_value = SOURCE_VALUE
group_id = GROUP_ID
log_sync_enabled = false
make_current_account_owner = true
Expand Down Expand Up @@ -111,7 +111,7 @@ resource "delphix_appdata_dsource" "dsource_name" {

## Argument Reference

* `source_id` - (Required) Id of the source to link.
* `source_value` - (Required) Id or Name of the source to link.

* `group_id` - (Required) Id of the dataset group where this dSource should belong to.

Expand Down
4 changes: 2 additions & 2 deletions examples/dsource/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ provider "delphix" {


# resource "delphix_appdata_dsource" "test_app_data_dsource" {
# source_id = "1-APPDATA_STAGED_SOURCE_CONFIG-6"
# source_value = "1-APPDATA_STAGED_SOURCE_CONFIG-6"
# group_id = "1-GROUP-1"
# log_sync_enabled = false
# make_current_account_owner = true
Expand Down Expand Up @@ -52,7 +52,7 @@ provider "delphix" {
# }

resource "delphix_appdata_dsource" "test_app_data_dsource_second" {
source_id = "1-APPDATA_STAGED_SOURCE_CONFIG-7"
source_value = "1-APPDATA_STAGED_SOURCE_CONFIG-7"
group_id = "1-GROUP-1"
log_sync_enabled = false
make_current_account_owner = true
Expand Down
2 changes: 1 addition & 1 deletion examples/jenkins-integration/jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pipeline {
echo ('Provisioning VDB...')
git branch: 'main', changelog: false, poll: false, url: 'https://github.com/delphix-integrations/terraform-provider-delphix.git'
// sh ('ls -R')
sh ('terraform -chdir=examples/simple-provision init')
sh ('terraform -chdir=examples/simple-provision init -upgrade')
withCredentials([string(credentialsId: 'DCT_API_KEY', variable: 'KEY')]) {
sh ('terraform -chdir=examples/simple-provision apply -var="source_data_id_1=$SOURCE_VDB" -var="dct_hostname=$DCT_HOSTNAME" -var="dct_api_key=$KEY" -auto-approve')
}
Expand Down
6 changes: 3 additions & 3 deletions examples/simple-provision/versions.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
terraform {
required_providers {
delphix = {
source = "delphix-integrations/delphix"
version = "1.0.0"
source = "delphix-integrations/delphix"
version = "3.0.0"
}
}
}
}
8 changes: 6 additions & 2 deletions internal/provider/resource_appdata_dsource.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func resourceAppdataDsource() *schema.Resource {
Type: schema.TypeString,
Optional: true,
},
"source_id": {
"source_value": {
Type: schema.TypeString,
Required: true,
},
Expand Down Expand Up @@ -250,6 +250,10 @@ func resourceAppdataDsource() *schema.Resource {
Type: schema.TypeString,
Computed: true,
},
"source_id": {
Type: schema.TypeString,
Computed: true,
},
"database_type": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -390,7 +394,7 @@ func resourceAppdataDsourceCreate(ctx context.Context, d *schema.ResourceData, m
if v, has_v := d.GetOk("name"); has_v {
appDataDSourceLinkSourceParameters.SetName(v.(string))
}
if v, has_v := d.GetOk("source_id"); has_v {
if v, has_v := d.GetOk("source_value"); has_v {
appDataDSourceLinkSourceParameters.SetSourceId(v.(string))
}
if v, has_v := d.GetOk("group_id"); has_v {
Expand Down
4 changes: 2 additions & 2 deletions internal/provider/resource_appdata_dsource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ func testDsourcePreCheck(t *testing.T, sourceId string, groupId string, name str
func testDsourceBasic(sourceId string, groupId string, name string, environmentUser string, stagingEnvironment string, postgresPort string) string {
return fmt.Sprintf(`
resource "delphix_appdata_dsource" "new_data_dsource" {
source_id = "%s"
source_value = "%s"
group_id = "%s"
log_sync_enabled = false
make_current_account_owner = true
Expand All @@ -92,7 +92,7 @@ resource "delphix_appdata_dsource" "new_data_dsource" {
func testDsourceUpdate(sourceId string, groupId string, name string, environmentUser string, stagingEnvironment string, postgresPort string) string {
return fmt.Sprintf(`
resource "delphix_appdata_dsource" "new_data_dsource" {
source_id = "%s"
source_value = "%s"
group_id = "%s"
log_sync_enabled = false
make_current_account_owner = true
Expand Down

0 comments on commit 0196c20

Please sign in to comment.