Skip to content

Conversation

@Uddipaan-Hazarika
Copy link
Contributor

@Uddipaan-Hazarika Uddipaan-Hazarika commented May 3, 2023

Problem:

We didnt support appdata plugin in provider.

Solution:

added appdata provision parameters.

Testing

Tried with Postgre and Hana and all 3 methods of provisioning for both databases.
HANA:

terraform {
  required_providers {
    delphix = {
      version = "2.0.0-beta"
      source  = "delphix.com/local/delphix"
    }
  }
}

provider "delphix" {
  tls_insecure_skip = true
  key               = KEY
  host              = URL
}

resource "delphix_vdb" "test_hana_tf_snpsht" {
  provision_type          = "snapshot"
  auto_select_repository  = true
  environment_id          = "5-UNIX_HOST_ENVIRONMENT-1"
  source_data_id          = "4-APPDATA_CONTAINER-16"
  snapshot_id             = "5-APPDATA_SNAPSHOT-1"
  name                    = "test_hana_tf_snpsht"

  appdata_source_params = jsonencode({
    mountLocation    = "/mnt/snpsht"
     configServices = [{
        "sTenantServicePort" =  "indexserver:30055"
      },
      {
        "sTenantServicePort" =  "xsengine:30058"
      }]
    tDatabaseName   = "tfsnpsht"
    tSystemUserName ="SYSTEM"
    tSystemUserPassword ="Delphix_123"
  })
}

POSTGRES:

terraform {
  required_providers {
    delphix = {
      version = "2.0.0-beta"
      source  = "delphix.com/local/delphix"
    }
  }
}

provider "delphix" {
  tls_insecure_skip = true
  key               = KEY
  host              = URL
}

resource "delphix_vdb" "test_postgres_tf_tmstmp" {
  provision_type          = "timestamp"
  timestamp               = "2023-05-02T17:59:43.587Z"
  auto_select_repository  = true
  environment_id          = "4-UNIX_HOST_ENVIRONMENT-8"
  source_data_id          = "4-APPDATA_CONTAINER-8"
  name                    = "test_postgres_tf_tmstmp"

  appdata_source_params = jsonencode({
    mountLocation       = "/mnt/tmstmp"
    postgresPort        = 5436
    configSettingsStg   = [{ propertyName: "timezone", value:"GMT", commentProperty:false}]
    })
}

@Uddipaan-Hazarika Uddipaan-Hazarika requested review from arunskurian, kishlay-delphix and sunnyx4 and removed request for arunskurian and sunnyx4 May 3, 2023 09:10
@Uddipaan-Hazarika Uddipaan-Hazarika changed the title HUBS-1559 | Postgres support HUBS-1559 | Postgres (Appdata) support May 3, 2023
Copy link
Contributor

@kishlay-delphix kishlay-delphix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@eyalkaspi-delphix eyalkaspi-delphix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add in your testing section the terraform files you have used so that others can more easily repeat the testing in the future

@Uddipaan-Hazarika Uddipaan-Hazarika requested a review from sunnyx4 May 8, 2023 08:26
@elima-sugunan elima-sugunan self-requested a review May 9, 2023 06:40
@Uddipaan-Hazarika Uddipaan-Hazarika merged commit f8789af into delphix-integrations:develop May 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants