-
-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Description
Creating an MSK cluster using the default AWS provided MSK configuration is not currently possible. The module always passes a configuration_info block to the underlying aws_msk_cluster resource which is not actually required. This is forcing a custom MSK configuration to be used either via a provided ARN or created by the module.
- ✋ I have searched the open/closed issues and my issue is not listed.
Versions
-
Module version [Required]: v3.1.0
-
Terraform version: Tofu 1.10.7
- Provider version(s): 6.30.0
Reproduction Code [Required]
Steps to reproduce the behavior:
Use the module with the create_configuration option disabled and do not provide a configuration_arn:
{
name = "my-msk-cluster"
create_configuration = false
...
}Expected behavior
The MSK cluster should be built using the default MSK configuration: https://docs.aws.amazon.com/msk/latest/developerguide/msk-default-configuration.html. The same behavior as not providing a configuration_info block to the aws_msk_cluster resource.
Another alternative could be to not create custom configuration by default since AWS MSK also doesn't create custom configuration by default, essentially flipping the defaults of create_configuration currently. If nothing is provided regarding configuration (create_configuration or configuration_arn) then the default could be used.
Actual behavior
Errors produced regarding missing configuration_arn and configuration_latest_revision variables when there isn't a desire to use a custom configuration.
Error: Missing required argument
with aws_msk_cluster.this[0],
on main.tf line 104, in resource "aws_msk_cluster" "this":
104: arn = var.create_configuration ? aws_msk_configuration.this[0].arn : var.configuration_arn
The argument "configuration_info.0.arn" is required, but no definition was
found.
Error: Missing required argument
with aws_msk_cluster.this[0],
on main.tf line 105, in resource "aws_msk_cluster" "this":
105: revision = var.create_configuration ? aws_msk_configuration.this[0].latest_revision : var.configuration_revision
The argument "configuration_info.0.revision" is required, but no definition
was found.
Terminal Output Screenshot(s)
Additional context
I'm in the process of migrating to this module from some older standalone terraform and encountered this issue. It looks like there was a previous issue filed here but it wasn't very legible.