fivetran / terraform-provider-fivetran

Terraform Provider for Fivetran
https://fivetran.com
Apache License 2.0
40 stars 24 forks source link

schema_change_handling required for sap_hana_db service but not supported #349

Open fivetran-justinbeausoleil opened 3 months ago

fivetran-justinbeausoleil commented 3 months ago

Describe the bug With version 1.2.8, the resource fivetran_conector_schema_config requires schema_change_handling. However, the service sap_hana_db does not support schema_change_handling, and fails during apply.

To Reproduce

resource "fivetran_connector_schema_config" "sap_hana_db_schema_config" {
  count = local.dev_only # only create a dev environment

  connector_id           = fivetran_connector.sap_hana_db[count.index].id
  schema_change_handling = "ALLOW_ALL"
  schemas = {
    "SAPABAP1" = {
      "enabled" : true,
      "tables" : {
        "BSEG" : {
          "enabled" : true
        }
      }
    }
  }
  validation_level = "NONE"
}

Expected behavior Because sap_hana_db does not support schema_change_handling, the key/value pair should not be required for the indicated service.

Logs & Output Running terraform apply results in:

│ Error: Unable to Create Connector Schema Resource.
│ 
│   with fivetran_connector_schema_config.sap_hana_db_schema_config[0],
│   on connector-schema-config.tf line 32, in resource "fivetran_connector_schema_config" "sap_hana_db_schema_config":
│   32: resource "fivetran_connector_schema_config" "sap_hana_db_schema_config" {
│ 
│ Error while applying schema config patch. status code: 400; expected: 200; code: InvalidInput; message: Service `sap_hana_db` doesn't support `schema_change_handling`.

Plugin version:

    fivetran = {
      source  = "fivetran/fivetran"
      version = "1.2.8"
    }

Additional context If I put an empty string, I receive the error: Attribute schema_change_handling value must be one of: ["ALLOW_ALL" "ALLOW_COLUMNS" "BLOCK_ALL"], got: ""