Destinations V2: fivetran_destination_v2 Public Preview
Select a destination service to see a complete Terraform configuration of the corresponding destination in HCL (HashiCorp configuration language). The required fields (group_id, service, time_zone_offset, and config) are uncommented. The config object lists every field of the destination service from the Fivetran REST API reference. Every optional destination-level field is included as a commented example so that you can enable only the settings that apply to your destination.
See our Terraform fivetran_destination_v2 resource documentation to learn what each field means and how to use it.
Destination:
Aiven for Apache Kafka
resource "fivetran_destination_v2" "example" { group_id = "<GROUP_ID>" service = "aiven_kafka_wh" time_zone_offset = "<TIME_ZONE_OFFSET>" config = { # Remove the fields that do not apply to your setup. bootstrap_servers = ["<BOOTSTRAP_SERVERS>"] connection_method = "privatelink" # Allowed: privatelink | direct data_format = "JSON" # Allowed: JSON | AVRO enable_single_topic = true num_of_partitions = 0 replication_factor = 0 sasl_mechanism = "SCRAM_SHA_512" # Allowed: SCRAM_SHA_512 | SCRAM_SHA_256 sasl_plain_key = "<SASL_PLAIN_KEY>" sasl_plain_secret = "<SASL_PLAIN_SECRET>" schema_registry = "AIVEN_KARAPACE" # Allowed: AIVEN_KARAPACE | CONFLUENT_CLOUD schema_registry_api_key = "<SCHEMA_REGISTRY_API_KEY>" schema_registry_api_secret = "<SCHEMA_REGISTRY_API_SECRET>" schema_registry_url = "<SCHEMA_REGISTRY_URL>" security_protocol = "SASL" # Allowed: SASL | SASL_PLAINTEXT } # Optional: # config_secrets_version = 1 # daylight_saving_time_enabled = false # hybrid_deployment_agent_id = "<HYBRID_DEPLOYMENT_AGENT_ID>" # networking_method = "<NETWORKING_METHOD>" # private_link_id = "<PRIVATE_LINK_ID>" # proxy_agent_id = "<PROXY_AGENT_ID>" # region = "<REGION>" # run_setup_tests = false # trust_certificates = false # trust_fingerprints = false # config_secrets = { # write-only, Terraform 1.11 or later; move the secret fields here instead of config # sasl_plain_key = "<SASL_PLAIN_KEY>" # sasl_plain_secret = "<SASL_PLAIN_SECRET>" # schema_registry_api_key = "<SCHEMA_REGISTRY_API_KEY>" # schema_registry_api_secret = "<SCHEMA_REGISTRY_API_SECRET>" # } }
Notes
- The provider checks
configagainst destination metadata when you runterraform plan. Unknown fields, wrong value types, and values outside the allowed list fail the plan. - Every
configfield is uncommented because the destination API reference doesn't mark which fields are required. Remove the fields that don't apply to your setup, for example the fields of authentication methods that you don't use. - The example includes only the
configfields that you can set. Fields that Fivetran sets are omitted because the provider rejects them inconfig. If the API reference lists no fields for a service yet, the example shows an emptyconfigobject. - Values in
<UPPERCASE>are placeholders. Replace them with your own values before you runterraform apply. - The selector uses the destination service ID, which is the value of
service. To link to the example for one service, add?service=<SERVICE_ID>to the page URL, for example?service=snowflake. - The provider doesn't mark
configas sensitive, so Terraform shows secret values that you set inconfigin plan and apply output and stores them in plain text in the state file. Pass secrets in through variables markedsensitive = trueand keep your state in a secure backend. For more information, see the Terraform documentation on sensitive data in state. - To keep secrets out of the state file, move them from
configto the write-onlyconfig_secretsattribute, which requires Terraform 1.11 or later. The example lists the fields that the API reference marks as secret in a commented-outconfig_secretsblock. This list might not be complete, and services whose API reference lists no fields have no list. A field can't be set in bothconfigandconfig_secrets. Terraform doesn't storeconfig_secrets, so incrementconfig_secrets_versionafter you rotate a secret to send the new value.