Fellas,
I am trying to use random_id resource for deploying a kafka module.
We have a child base module with full kafka Terraform repo (random_id resource is set here) and its being called from a main deployment terraform repo.
Here is the syntax I am using:
resource "random_id" "rand" {
byte_length = 8
}
resource "aws_msk_configuration" "config1" {
kafka_versions = ["****"]
name = "${var.env}-mskconfig-${lower(random_id.rand.hex)}"
server_properties = var.server_properties
}
And here is my versions.tf file in the child module
terraform {
required_version = “>= 0.13”
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 3.0"
}
random = {
source = "hashicorp/random"
version = "~> 2.3.0"
}
}
}
When I am calling this from the main deployment terraform module, its failing on me with:
Error: Invalid resource instance data in state
on .terraform/modules/kafka-msk/main.tf line 16:
16: resource "random_id" "rand" {
Instance module.kafka-msk.random_id.rand data could not be decoded from the
state: unsupported attribute "b64".
I exhausted all possible version setting scenarios and ended up here asking for help.
Let me know what am I missing here folks.
Thanks
Vikram Y