Skip to content

Commit 30322d0

Browse files
Merge pull request #90 from delphix-integrations/develop
HUBS-2447 | Develop -> Main | Merge develop to main
2 parents f464351 + f711b90 commit 30322d0

File tree

5 files changed

+23
-6
lines changed

5 files changed

+23
-6
lines changed

GNUmakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ HOSTNAME=delphix.com
33
NAMESPACE=dct
44
NAME=delphix
55
BINARY=terraform-provider-${NAME}
6-
VERSION=3.2.2
6+
VERSION=3.2.3
77
OS_ARCH=darwin_amd64
88

99
default: install
@@ -13,6 +13,7 @@ build:
1313

1414
release:
1515
GOOS=darwin GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_darwin_amd64
16+
GOOS=darwin GOARCH=arm64 go build -o ./bin/${BINARY}_${VERSION}_darwin_arm64
1617
GOOS=freebsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_freebsd_386
1718
GOOS=freebsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_freebsd_amd64
1819
GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm

docs/resources/vdb.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,9 @@ resource "delphix_vdb" "vdb_name" {
202202

203203
* `new_dbid` - (Optional) [Updatable] Option to generate a new DB ID for the created VDB (Oracle Only).
204204

205+
* `masked` - (Optional) Option to create a Masked VDB. Note: You should define a `configure_clone` script in the Hooks step to mask the dataset. The selection of the "Mask this VDB" option will cause the data to be marked as masked, whether you have defined a script to do so or not.
206+
If you do not define a script to mask the dataset, the data will not be masked unless there is a masking job associated with the source dataset.
207+
205208
* `listener_ids` - (Optional) [Updatable] The listener IDs for this provision operation (Oracle Only). This is a list of listener ids. For eg: [ "listener-123", "listener-456" ]
206209

207210
* `custom_env_vars` - (Optional)

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ require (
5757
github.com/golang/protobuf v1.5.3 // indirect
5858
github.com/kr/pretty v0.2.1 // indirect
5959
github.com/kr/text v0.2.0 // indirect
60-
golang.org/x/net v0.21.0 // indirect
60+
golang.org/x/net v0.23.0 // indirect
6161
google.golang.org/appengine v1.6.8 // indirect
6262
google.golang.org/protobuf v1.33.0 // indirect
6363
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
158158
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
159159
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
160160
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
161-
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
162-
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
161+
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
162+
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
163163
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
164164
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
165165
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=

internal/provider/resource_vdb.go

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package provider
33
import (
44
"context"
55
"encoding/json"
6-
"github.com/hashicorp/terraform-plugin-log/tflog"
76
"net/http"
87
"time"
98

109
dctapi "github.com/delphix/dct-sdk-go/v14"
10+
"github.com/hashicorp/terraform-plugin-log/tflog"
1111
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
1212
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1313
)
@@ -519,6 +519,10 @@ func resourceVdb() *schema.Resource {
519519
Type: schema.TypeBool,
520520
Optional: true,
521521
},
522+
"masked": {
523+
Type: schema.TypeBool,
524+
Optional: true,
525+
},
522526
"listener_ids": {
523527
Type: schema.TypeList,
524528
Optional: true,
@@ -861,6 +865,9 @@ func helper_provision_by_snapshot(ctx context.Context, d *schema.ResourceData, m
861865
if v, has_v := d.GetOkExists("new_dbid"); has_v {
862866
provisionVDBBySnapshotParameters.SetNewDbid(v.(bool))
863867
}
868+
if v, has_v := d.GetOkExists("masked"); has_v {
869+
provisionVDBBySnapshotParameters.SetMasked(v.(bool))
870+
}
864871
if v, has_v := d.GetOkExists("listener_ids"); has_v {
865872
provisionVDBBySnapshotParameters.SetListenerIds(toStringArray(v))
866873
}
@@ -1099,6 +1106,9 @@ func helper_provision_by_timestamp(ctx context.Context, d *schema.ResourceData,
10991106
if v, has_v := d.GetOkExists("new_dbid"); has_v {
11001107
provisionVDBByTimestampParameters.SetNewDbid(v.(bool))
11011108
}
1109+
if v, has_v := d.GetOkExists("masked"); has_v {
1110+
provisionVDBByTimestampParameters.SetMasked(v.(bool))
1111+
}
11021112
if v, has_v := d.GetOk("listener_ids"); has_v {
11031113
provisionVDBByTimestampParameters.SetListenerIds(toStringArray(v))
11041114
}
@@ -1340,6 +1350,9 @@ func helper_provision_by_bookmark(ctx context.Context, d *schema.ResourceData, m
13401350
if v, has_v := d.GetOkExists("new_dbid"); has_v {
13411351
provisionVDBFromBookmarkParameters.SetNewDbid(v.(bool))
13421352
}
1353+
if v, has_v := d.GetOkExists("masked"); has_v {
1354+
provisionVDBFromBookmarkParameters.SetMasked(v.(bool))
1355+
}
13431356
if v, has_v := d.GetOk("listener_ids"); has_v {
13441357
provisionVDBFromBookmarkParameters.SetListenerIds(toStringArray(v))
13451358
}
@@ -1549,7 +1562,6 @@ func resourceVdbRead(ctx context.Context, d *schema.ResourceData, meta interface
15491562
config_params, _ := json.Marshal(result.GetConfigParams())
15501563
d.Set("config_params", string(config_params))
15511564
d.Set("additional_mount_points", flattenAdditionalMountPoints(result.GetAdditionalMountPoints()))
1552-
15531565
d.Set("id", vdbId)
15541566

15551567
return diags
@@ -1600,6 +1612,7 @@ func resourceVdbUpdate(ctx context.Context, d *schema.ResourceData, meta interfa
16001612
"oracle_instance_name",
16011613
"unique_name",
16021614
"mount_point",
1615+
"masked",
16031616
"open_reset_logs",
16041617
"snapshot_policy_id",
16051618
"retention_policy_id",

0 commit comments

Comments
 (0)