Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
40f38f6
Adding badges (#15)
arunskurian Apr 6, 2022
1a15d14
Merge branch 'delphix-integrations:develop' into develop
sunnyx4 Apr 6, 2022
c061fa3
Change version to 0.0.1-beta
sunnyx4 Apr 6, 2022
7bd5a01
Delphix TF Provider 1.0.0b3 merge to develop (#21)
arunskurian May 2, 2022
0474730
Merge branch 'develop' of github.com:delphix-integrations/terraform-p…
sunnyx4 May 2, 2022
b9c636d
Merging rel 1.0.0-beta3 from main to develop (#20)
arunskurian May 2, 2022
49f8f35
HUBS-694 Support for Password Vaults
sunnyx4 May 2, 2022
78bcd23
HUBS-694 Support for Password Vaults (#24)
sunnyx4 May 9, 2022
0a8a635
APIGW-799 VDB template parameter template_id throws api error (#25)
eyalkaspi-delphix May 9, 2022
e45a456
Merge branch 'develop' of github.com:delphix-integrations/terraform-p…
sunnyx4 May 9, 2022
e198ef8
HUBS-773 Update Job Poll function to match updated DCT Status Enum
sunnyx4 May 9, 2022
aad8f41
HUBS-692 HUBS-693 Support for SSH and Kerberos Auth
sunnyx4 May 9, 2022
c62c939
Add contact email in index.md
sunnyx4 May 9, 2022
23c1472
HUBS-707 add template_id for vdb provision by snapshot
sunnyx4 May 10, 2022
c906431
Code review for PR-26
sunnyx4 May 12, 2022
76076dc
HUBS-691, HUBS-773, HUBS-707 (#26)
sunnyx4 May 12, 2022
ff9494f
Adjust to DCT API returning job instead of job id (#27)
eyalkaspi-delphix May 18, 2022
7e3d98e
Update DCT sdk go (#28)
eyalkaspi-delphix May 18, 2022
8157305
Merge branch 'develop' of github.com:delphix-integrations/terraform-p…
sunnyx4 May 19, 2022
2fdd20c
HUBS-683 Provision single vdb on SI host from a bookmark.
sunnyx4 May 20, 2022
3c97d8b
code review
sunnyx4 May 24, 2022
ac297a5
HUBS-683 Provision Single VDBs from Bookmark (#29)
sunnyx4 May 25, 2022
3a8f1ca
HUBS-807 Acceptance test for VDB Provision using Bookmark (single VDB)
sunnyx4 May 26, 2022
3de0333
Merge branch 'develop' of github.com:delphix-integrations/terraform-p…
sunnyx4 May 26, 2022
cef31aa
code review
sunnyx4 Jun 2, 2022
56e315f
code review 2
sunnyx4 Jun 14, 2022
7ad1a1c
Update VDB resource for DCT GO SDK v1.0.0-beta7
sunnyx4 Jun 14, 2022
6979502
Update Env resource for DCT GO SDK v1.0.0-beta7
sunnyx4 Jun 14, 2022
7451fc0
Update resources for DCT GO SDK 2.0RC3
sunnyx4 Jun 27, 2022
d27321e
code review
sunnyx4 Jun 27, 2022
8e6a7c8
code review
sunnyx4 Jun 28, 2022
28372ba
Remove beta wording from docs
sunnyx4 Jun 28, 2022
3d1ba0a
HUBS-807, HUBS-705, HUBS-706, HUBS-708 (#30)
sunnyx4 Jun 29, 2022
0c9ba0b
Merge branch 'delphix-integrations:develop' into develop
sunnyx4 Jun 29, 2022
3909b62
Release Provider v1.0.0
sunnyx4 Jun 29, 2022
c29ad7f
Release Provider v1.0.0 (#31)
sunnyx4 Jun 29, 2022
b1705a8
Resolve merge conflicts for develop branch for Release 1.0.0 (#33)
sunnyx4 Jun 29, 2022
cfb53fd
Merge branch 'delphix-integrations:develop' into develop
sunnyx4 Jun 29, 2022
1d0a4eb
Merge branch 'main' into develop
sunnyx4 Jun 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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=1.0.0-beta
- PROVIDER_VERSION=1.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=1.0.0-beta
VERSION=1.0.0
OS_ARCH=darwin_amd64

default: install
Expand Down
12 changes: 6 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# <provider> Delphix Provider

!> **NOTE**
The Terraform Provider for Delphix is currently beta and requires Delphix Control Tower (DCT) APIs to work.
The Terraform Provider for Delphix requires the Delphix Continuous Data Platform and Data Control Tower (DCT).


The Terraform Provider for Delphix enables customers to natively manage data-as-code along with their infrastructure.
The Terraform Provider for Delphix enables customers to natively manage data-as-code along with their infrastructure.
With Terraform and Delphix, customers can now automatically provision, manage and teardown any number of ephemeral data environments to drive enterprise DevOps workflows including test data management.

This provider leverages the Delphix APIs available with the Delphix Data Control Tower (DCT). The provider must be configured with the proper API key generated by DCT and registered with associated Delphix engines before use

To learn more about Delphix and DCT APIs, refer to [Delphix Docs](https://docs.delphix.com) and [DCT Docs](https://docs.delphix.com/dct) respectively.
To learn more about Delphix and DCT APIs, refer to [Delphix Docs](https://docs.delphix.com) and [DCT Docs](https://docs.delphix.com/dct) respectively. Please [Contact us](ask-integrations@delphix.com) (ask-integrations@delphix.com) with any questions.

## Example Usage

Expand All @@ -18,14 +18,14 @@ terraform {
required_providers {
delphix = {
source = "delphix-integrations/delphix"
version = "1.0.0-beta"
version = "1.0.0"
}
}
}

# Configure the DXI Provider
provider "delphix" {
tls_insecure_skip = true
tls_insecure_skip = true
key = "dct_api_key"
host = "dct_hostname"
}
Expand All @@ -39,7 +39,7 @@ resource "delphix_vdb" "vdb_name" {

## Configuration and API Key Generation

Delphix Provider uses DCT APIs to communicate with the Delphix engines. Authentication to DCT APIs are handled using API Keys.
Delphix Provider uses DCT APIs to communicate with the Delphix engines. Authentication to DCT APIs are handled using API Keys.
For generation of the API key, please refer to [Authentication](https://docs.delphix.com/dct/authentication-170164311.html).


Expand Down
45 changes: 42 additions & 3 deletions docs/resources/environment.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Resource: <resource name> delphix_environment

In Delphix, an environment is either a single instance host or cluster of hosts that run database software.
In Delphix, an environment is either a single instance host or cluster of hosts that run database software.

Environments can either be a source (where data comes from), staging (where data are prepared/masked) or target (where data are delivered and used by developers and testers).

Expand Down Expand Up @@ -46,11 +46,44 @@ resource "delphix_environment" "unixcluster" {
hostname = "db.host.com"
toolkit_path = "/home/delphix"
name = "unixcluster"
description = "This is a unix target."
description = "This is a unix target."
is_cluster = true
cluster_home = "/u01/app/19.0.0.0/grid"
}
```
### Creating UNIX standalone target environment using HashiCorp Vault
```hcl
resource "delphix_environment" "wintgt" {
engine_id = 2
os_name = "UNIX"
hostname = "xxx"
toolkit_path = "/home/delphix"
name = "unixtgt"

vault = "vault-name"
hashicorp_vault_engine = "xxx"
hashicorp_vault_secret_path = "xxx"
hashicorp_vault_username_key = "xxx"
hashicorp_vault_secret_key = "xxx"

description = "This is unix target."
}
```
### Creating UNIX standalone target environment using CyberArk Vault
```hcl
resource "delphix_environment" "wintgt" {
engine_id = 2
os_name = "UNIX"
hostname = "xxx"
toolkit_path = "/home/delphix"
name = "unixtgt"

vault = "vault-name"
cyberark_query_string = "xxx"

description = "This is unix target."
}
```
### Creating a WINDOWS standalone target environment
```hcl
resource "delphix_environment" "wintgt" {
Expand Down Expand Up @@ -148,6 +181,8 @@ resource "delphix_environment" "fc-tgt-cluster" {
* `hashicorp_vault_username_key` - (Optional) Key for the username in the key-value store.
* `hashicorp_vault_secret_key` - (Optional) Key for the password in the key-value store.
* `cyberark_vault_query_string` - (Optional) Query to find a credential in the CyberArk vault.
* `use_kerberos_authentication` - (Optional) Whether to use kerberos authentication.
* `use_engine_public_key` - (Optional) Whether to use public key authentication.
* `nfs_addresses` - (Optional) Array of ip address or hostnames. Valid values are a list of addresses. For eg: `["192.168.10.2"]`
* `ase_db_username` - (Optional) Username for the SAP ASE database.
* `ase_db_password` - (Optional) Password for the SAP ASE database.
Expand All @@ -157,17 +192,21 @@ resource "delphix_environment" "fc-tgt-cluster" {
* `ase_db_hashicorp_vault_username_key` - (Optional) Key for the username in the key-value store.
* `ase_db_hashicorp_vault_secret_key` - (Optional) Key for the password in the key-value store.
* `ase_db_cyberark_vault_query_string` - (Optional) Query to find a credential in the CyberArk vault.
* `ase_db_use_kerberos_authentication` - (Optional) Whether to use kerberos authentication for ASE DB discovery.
* `java_home` - (Optional) The path to the user managed Java Development Kit (JDK). If not specified, then the OpenJDK will be used.
* `dsp_keystore_path` - (Optional) DSP keystore path.
* `dsp_keystore_password` - (Optional) DSP keystore password.
* `dsp_keystore_alias` - (Optional) DSP keystore alias.
* `dsp_truststore_path` - (Optional) DSP truststore path.
* `dsp_truststore_password` - (Optional) DSP truststore password.
* `description` - (Optional) The environment description.
* `tags` - (Optional) The tags to be created for this environment. This is a map of 2 parameters:
* `key` - (Required) Key of the tag
* `value` - (Required) Value of the tag

## Attribute Reference

* `namespace` - The namespace of this environment for replicated and restored objects.
* `engine_id` - A reference to the Engine that this Environment connection is associated with.
* `enabled` - True if this environment is enabled.
* `hosts` - The hosts that are part of this environment.
* `hosts` - The hosts that are part of this environment.
105 changes: 77 additions & 28 deletions docs/resources/vdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,15 @@ resource "delphix_vdb" "vdb_name2" {
}
}

# Provision a VDB from a bookmark with a single VDB

resource "delphix_vdb" "test_vdb" {
provision_type = "bookmark"
auto_select_repository = true
bookmark_id = "BOOKMARK_ID"
environment_id = "ENV_ID"
}

# Provision a VDB using snapshot and pre refresh hooks

resource "delphix_vdb" "vdb_name" {
Expand All @@ -48,87 +57,117 @@ resource "delphix_vdb" "vdb_name" {

## Argument Reference

* `source_data_id` - (Required) The ID of the source object (dSource or VDB) to provision from. All other objects referenced by the parameters must live on the same engine as the source.
* `source_data_id` - (Optional) The ID or name of the source object (dSource or VDB) to provision from. All other objects referenced by the parameters must live on the same engine as the source.

* `engine_id` - (Optional) The ID of the Engine onto which to provision. If the source ID unambiguously identifies a source object, this parameter is unnecessary and ignored.
* `engine_id` - (Optional) The ID or name of the Engine onto which to provision. If the source ID unambiguously identifies a source object, this parameter is unnecessary and ignored.

* `target_group_id` - (Optional) The ID of the group into which the VDB will be provisioned. If unset, a group is selected randomly on the Engine.

* `vdb_name` - (Optional) The unique name of the provisioned VDB within a group. If unset, a name is randomly generated.

* `database_name` - (Optional) The name of the database on the target environment. Defaults to vdb_name.

* `cdb_id` - (Optional) The ID of the container database (CDB) to provision an Oracle Multitenant database into. When this is not set, a new vCDB will be provisioned.

* `cluster_node_ids` - (Optional) The cluster node ids, name or addresses for this provision operation (Oracle RAC Only).

* `truncate_log_on_checkpoint` - (Optional) Whether to truncate log on checkpoint (ASE only).

* `username` - (Optional) [Updatable] The name of the privileged user to run the provision operation (Oracle Only).
* `os_username` - (Optional) The name of the privileged user to run the provision operation (Oracle Only).

* `os_password` - (Optional) The password of the privileged user to run the provision operation (Oracle Only).

* `password` - (Optional) [Updatable] The password of the privileged user to run the provision operation (Oracle Only).
* `db_username` - (Optional) [Updatable] The username of the database user (Oracle, ASE Only). Only for update.

* `environment_id` - (Optional) The ID of the target environment where to provision the VDB. If repository_id unambigously identifies a repository, this is unnecessary and ignored. Otherwise, a compatible repository is randomly selected on the environment.
* `db_password` - (Optional) [Updatable] The password of the database user (Oracle, ASE Only). Only for update.

* `environment_id` - (Optional) The ID or name of the target environment where to provision the VDB. If repository_id unambigously identifies a repository, this is unnecessary and ignored. Otherwise, a compatible repository is randomly selected on the environment.

* `environment_user_id` - (Optional)[Updatable] The environment user ID to use to connect to the target environment.

* `repository_id` - (Optional) The ID of the target repository where to provision the VDB. A repository typically corresponds to a database installation (Oracle home, database instance, ...). Setting this attribute implicitly determines the environment where to provision the VDB.

* `auto_select_repository` - (Optional) Option to automatically select a compatible environment and repository. Mutually exclusive with repository_id.

* `pre_refresh` - (Optional) The commands to execute on the target environment before refreshing the VDB. This is a map of 3 parameters:
* `pre_refresh` - (Optional) The commands to execute on the target environment before refreshing the VDB. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `post_refresh` - (Optional) The commands to execute on the target environment after refreshing the VDB. This is a map of 3 parameters:
* `post_refresh` - (Optional) The commands to execute on the target environment after refreshing the VDB. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `pre_rollback` - (Optional) The commands to execute on the target environment before rewinding the VDB. This is a map of 3 parameters:
* `pre_rollback` - (Optional) The commands to execute on the target environment before rewinding the VDB. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `post_rollback` - (Optional) The commands to execute on the target environment after rewinding the VDB. This is a map of 3 parameters:
* `post_rollback` - (Optional) The commands to execute on the target environment after rewinding the VDB. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `configure_clone` - (Optional) The commands to execute on the target environment when the VDB is created or refreshed. This is a map of 3 parameters:
* `configure_clone` - (Optional) The commands to execute on the target environment when the VDB is created or refreshed. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `pre_snapshot` - (Optional) The commands to execute on the target environment before snapshotting a virtual source. These commands can quiesce any data prior to snapshotting. This is a map of 3 parameters:
* `pre_snapshot` - (Optional) The commands to execute on the target environment before snapshotting a virtual source. These commands can quiesce any data prior to snapshotting. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `post_snapshot` - (Optional) The commands to execute on the target environment after snapshotting a virtual source. This is a map of 3 parameters:
* `post_snapshot` - (Optional) The commands to execute on the target environment after snapshotting a virtual source. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `pre_start` - (Optional) The commands to execute on the target environment before starting a virtual source. This is a map of 3 parameters:
* `pre_start` - (Optional) The commands to execute on the target environment before starting a virtual source. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`

* `post_start` - (Optional) The commands to execute on the target environment after starting a virtual source. This is a map of 3 parameters:
* `post_start` - (Optional) The commands to execute on the target environment after starting a virtual source. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `pre_stop` - (Optional) The commands to execute on the target environment before stopping a virtual source. This is a map of 3 parameters:
* `pre_stop` - (Optional) The commands to execute on the target environment before stopping a virtual source. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `post_stop` - (Optional) The commands to execute on the target environment after stopping a virtual source. This is a map of 3 parameters:
* `post_stop` - (Optional) The commands to execute on the target environment after stopping a virtual source. This is a map of 5 parameters:
* `name` - Name of the hook
* `command` - (Required)Command to be executed
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]` Default is `bash`
* `shell` - Type of shell. Valid values are `[bash, shell, expect, ps, psd]`
* `element_id` - Element ID for the hook
* `has_credentials` - Flag to indicate if it has credentials

* `vdb_restart` - (Optional) [Updatable] Indicates whether the Engine should automatically restart this virtual source when target host reboot is detected.

* `auxiliary_template_id` - (Optional) The ID of the configuration template to apply to the auxiliary container database. This is only relevant when provisioning a Multitenant pluggable database into an existing CDB, i.e when the cdb_id property is set. (Oracle Only)

* `template_id` - (Optional) [Updatable] The ID of the target VDB Template (Oracle Only).

* `file_mapping_rules` - (Optional) Target VDB file mapping rules (Oracle Only). Rules must be line separated (\n or \r) and each line must have the format "pattern:replacement". Lines are applied in order.
Expand All @@ -137,6 +176,10 @@ resource "delphix_vdb" "vdb_name" {

* `unique_name` - (Optional) Target VDB db_unique_name (Oracle Only).

* `vcdb_name` - (Optional) When provisioning an Oracle Multitenant vCDB (when the cdb_id property is not set), the name of the provisioned vCDB (Oracle Multitenant Only).

* `vcdb_database_name` - (Optional) When provisioning an Oracle Multitenant vCDB (when the cdb_id property is not set), the database name of the provisioned vCDB. Defaults to the value of the vcdb_name property. (Oracle Multitenant Only).

* `mount_point` - (Optional) Mount point for the VDB (Oracle, ASE Only).

* `open_reset_logs` - (Optional) Whether to open the database after provision (Oracle Only).
Expand Down Expand Up @@ -172,7 +215,13 @@ Environment variable to be set when the engine creates a VDB. See the Engine doc

* `timestamp_in_database_timezone` - (Optional) The point in time from which to execute the operation, expressed as a date-time in the timezone of the source database. Mutually exclusive with timestamp.

* `snapshot_id` - (Optional) The ID of the snapshot from which to execute the operation. If the snapshot_id is not, selects the latest snapshot.
* `snapshot_id` - (Optional) The ID or name of the snapshot from which to execute the operation. If the snapshot_id is not, selects the latest snapshot.

* `bookmark_id` - (Optional) The ID or name of the bookmark from which to execute the operation. The bookmark must contain only one VDB.

* `tags` - (Optional) The tags to be created for VDB. This is a map of 2 parameters:
* `key` - (Required) Key of the tag
* `value` - (Required) Value of the tag


## Attribute Reference
Expand Down
Loading