Dealing with Conflicts in a resource

It seems to work just fine for me…

variable "toggle" {
  type = bool
}

resource "aws_sqs_queue" "this" {
  sqs_managed_sse_enabled = var.toggle ? true : null
  kms_master_key_id       = var.toggle ? null : "foobar"
}

EDIT: Though I’m only testing using terraform plan … if you’re getting errors at apply time… show us the errors! Guide to asking for help in this forum