fivetran / terraform-provider-fivetran

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

destination import to read configs #350

Open kakarukeys opened 2 months ago

kakarukeys commented 2 months ago

Is your feature request related to a problem? Please describe. After creating a AWS S3 data lake destination on the UI, I wanted to import it using fivetran provider. However the configs could not be imported. I had to leave the config block blank. Manually adding the configs would result in a new plan to make a change.

Describe the solution you'd like

an import to a completely configured resource should not result in a plan to make a change. it should show no configuration change

resource "fivetran_destination" "my_s3_destination" {
  group_id = fivetran_group.my_group.id

  service                      = "new_s3_datalake"
  region                       = "AWS_AP_SOUTHEAST_1"
  time_zone_offset    = "+8"
  daylight_saving_time_enabled = false

  config {
    region                   = local.region
    fivetran_role_arn = module.fivetran_role.iam_role_arn
    bucket                   = module.datalake_s3_bronze.s3_bucket_id
    prefix_path           = local.fivetran_s3_prefix
    is_private_link_required = false
}

Describe the use-cases if possible see above.

Additional context Girish Sathyanarayana can provide more context