terraform-provider-cdap

Usage

An example of the CDAP provider initialized on a GCP Cloud Data Fusion instance:

terraform {
  required_providers {
    cdap = {
      source = "GoogleCloudPlatform/cdap"
      # Pin to a specific version as 0.x releases are not guaranteed to be backwards compatible.
      version = "0.9.0"
    }
  }
}

resource "google_data_fusion_instance" "instance" {
  provider = google-beta
  name     = "example"
  region   = "us-central1"
  type     = "BASIC"
  project  = "example-project"
}

data "google_client_config" "current" {}

provider "cdap" {
  host  = "${google_data_fusion_instance.instance.service_endpoint}/api/"
  token = data.google_client_config.current.access_token
}

Retries

Retries are off by default. Opt in with a retry block:

provider "cdap" {
  host  = "${google_data_fusion_instance.instance.service_endpoint}/api/"
  token = data.google_client_config.current.access_token

  retry {
    enabled         = true # default is false; set to true to enable retries
    timeout_seconds = 90   # default is 90s when enabled is set to true; no new attempt starts after this (one in-flight request may still run up to the 30m client timeout)
    max_attempts    = 3    # default is 3 when enabled is set to true; 0 = limited only by timeout_seconds
  }
}

Retry decisions are logged at TF_LOG=WARN and above.

Argument Reference

The following fields are supported: