terraform-aws-api-gateway icon indicating copy to clipboard operation
terraform-aws-api-gateway copied to clipboard

Fix: Error in count condition of HTTP-Api-Gateway

Open Aatishsharma77 opened this issue 1 year ago • 0 comments

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.

Aatishsharma77 avatar Apr 05 '24 18:04 Aatishsharma77