MaterializeInc / terraform-provider-materialize

A Terraform provider for Materialize
https://registry.terraform.io/providers/MaterializeInc/materialize
Mozilla Public License 2.0
11 stars 8 forks source link

Add support for AWS IAM authentication in Kafka connections #627

Closed bobbyiliev closed 3 months ago

bobbyiliev commented 3 months ago

Fixes #624

Tests will be failing until this has actually been released: https://github.com/MaterializeInc/materialize/pull/28683

This introduces the ability to use AWS IAM authentication for Kafka connections, specifically for Amazon MSK.

Example usage:

# Create an AWS connection for IAM authentication
resource "materialize_connection_aws" "msk_auth" {
  name                    = "aws_msk"
  assume_role_arn         = "arn:aws:iam::123456789012:role/MaterializeMSK"
}

# Create a Kafka connection using AWS IAM authentication
resource "materialize_connection_kafka" "kafka_msk" {
  name              = "kafka_msk"
  kafka_broker {
    broker = "b-1.your-cluster-name.abcdef.c1.kafka.us-east-1.amazonaws.com:9098"
  }
  security_protocol = "SASL_SSL"
  aws_connection {
    name          = materialize_connection_aws.msk_auth.name
    database_name = materialize_connection_aws.msk_auth.database_name
    schema_name   = materialize_connection_aws.msk_auth.schema_name
  }
}