terraform-aws-api-gateway
terraform-aws-api-gateway copied to clipboard
Fix: Error in count condition of HTTP-Api-Gateway
what
Fixed count condition for module "kms_key" {}, data "aws_iam_policy_document" "cloudwatch" {} in main.tf
This was causing below error on terraform plan
│ Error: Invalid index
│
│ on ../../../main.tf line 543, in module "kms_key":
│ 543: policy = data.aws_iam_policy_document.cloudwatch[0].json
│ ├────────────────
│ │ data.aws_iam_policy_document.cloudwatch is empty tuple
│
│ The given key does not identify an element in this collection value: the collection has no elements.