I am attempting to create an AWS Lambda event source mapping for a self-managed Kafka cluster using the aws_lambda_event_source_mapping
resource. However, I am encountering the following error:
Error: Unsupported block type
on .terraform/modules/FileDetails_qp2/main.tf line 82, in resource "aws_lambda_event_source_mapping" "kafka_event_source":
82: encryption {
Blocks of type "encryption" are not expected here.
We have selected the authentication method as BASIC_AUTH
and specified the Secrets Manager key for “UserName and Password”. Additionally, we need to select the CA root certificate to connect to the self-managed Kafka. However, Terraform does not allow us to select this option.
AWS Console Says:
Encryption Choose the secret key containing the root CA certificate used by your Kafka brokers for TLS encryption. This is required if your Kafka brokers use certificates signed by a private CA.