Skip to content

Commit

Permalink
Merge pull request #90 from delphix-integrations/develop
Browse files Browse the repository at this point in the history
HUBS-2447 | Develop -> Main | Merge develop to main
  • Loading branch information
Uddipaan-Hazarika authored Jun 27, 2024
2 parents f464351 + f711b90 commit 30322d0
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
3 changes: 2 additions & 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=3.2.2
VERSION=3.2.3
OS_ARCH=darwin_amd64

default: install
Expand All @@ -13,6 +13,7 @@ build:

release:
GOOS=darwin GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_darwin_amd64
GOOS=darwin GOARCH=arm64 go build -o ./bin/${BINARY}_${VERSION}_darwin_arm64
GOOS=freebsd GOARCH=386 go build -o ./bin/${BINARY}_${VERSION}_freebsd_386
GOOS=freebsd GOARCH=amd64 go build -o ./bin/${BINARY}_${VERSION}_freebsd_amd64
GOOS=freebsd GOARCH=arm go build -o ./bin/${BINARY}_${VERSION}_freebsd_arm
Expand Down
3 changes: 3 additions & 0 deletions docs/resources/vdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ resource "delphix_vdb" "vdb_name" {

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

* `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.
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.

* `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" ]

* `custom_env_vars` - (Optional)
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require (
github.com/golang/protobuf v1.5.3 // indirect
github.com/kr/pretty v0.2.1 // indirect
github.com/kr/text v0.2.0 // indirect
golang.org/x/net v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.33.0 // indirect
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs=
golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
Expand Down
17 changes: 15 additions & 2 deletions internal/provider/resource_vdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package provider
import (
"context"
"encoding/json"
"github.com/hashicorp/terraform-plugin-log/tflog"
"net/http"
"time"

dctapi "github.com/delphix/dct-sdk-go/v14"
"github.com/hashicorp/terraform-plugin-log/tflog"
"github.com/hashicorp/terraform-plugin-sdk/v2/diag"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
Expand Down Expand Up @@ -519,6 +519,10 @@ func resourceVdb() *schema.Resource {
Type: schema.TypeBool,
Optional: true,
},
"masked": {
Type: schema.TypeBool,
Optional: true,
},
"listener_ids": {
Type: schema.TypeList,
Optional: true,
Expand Down Expand Up @@ -861,6 +865,9 @@ func helper_provision_by_snapshot(ctx context.Context, d *schema.ResourceData, m
if v, has_v := d.GetOkExists("new_dbid"); has_v {
provisionVDBBySnapshotParameters.SetNewDbid(v.(bool))
}
if v, has_v := d.GetOkExists("masked"); has_v {
provisionVDBBySnapshotParameters.SetMasked(v.(bool))
}
if v, has_v := d.GetOkExists("listener_ids"); has_v {
provisionVDBBySnapshotParameters.SetListenerIds(toStringArray(v))
}
Expand Down Expand Up @@ -1099,6 +1106,9 @@ func helper_provision_by_timestamp(ctx context.Context, d *schema.ResourceData,
if v, has_v := d.GetOkExists("new_dbid"); has_v {
provisionVDBByTimestampParameters.SetNewDbid(v.(bool))
}
if v, has_v := d.GetOkExists("masked"); has_v {
provisionVDBByTimestampParameters.SetMasked(v.(bool))
}
if v, has_v := d.GetOk("listener_ids"); has_v {
provisionVDBByTimestampParameters.SetListenerIds(toStringArray(v))
}
Expand Down Expand Up @@ -1340,6 +1350,9 @@ func helper_provision_by_bookmark(ctx context.Context, d *schema.ResourceData, m
if v, has_v := d.GetOkExists("new_dbid"); has_v {
provisionVDBFromBookmarkParameters.SetNewDbid(v.(bool))
}
if v, has_v := d.GetOkExists("masked"); has_v {
provisionVDBFromBookmarkParameters.SetMasked(v.(bool))
}
if v, has_v := d.GetOk("listener_ids"); has_v {
provisionVDBFromBookmarkParameters.SetListenerIds(toStringArray(v))
}
Expand Down Expand Up @@ -1549,7 +1562,6 @@ func resourceVdbRead(ctx context.Context, d *schema.ResourceData, meta interface
config_params, _ := json.Marshal(result.GetConfigParams())
d.Set("config_params", string(config_params))
d.Set("additional_mount_points", flattenAdditionalMountPoints(result.GetAdditionalMountPoints()))

d.Set("id", vdbId)

return diags
Expand Down Expand Up @@ -1600,6 +1612,7 @@ func resourceVdbUpdate(ctx context.Context, d *schema.ResourceData, meta interfa
"oracle_instance_name",
"unique_name",
"mount_point",
"masked",
"open_reset_logs",
"snapshot_policy_id",
"retention_policy_id",
Expand Down

0 comments on commit 30322d0

Please sign in to comment.