{
  "//": {
    "metadata": {
      "backend": "local",
      "overrides": {
        "stack": [
          "terraform"
        ]
      },
      "stackName": "CloudCollectorV3Stack",
      "version": "0.23.4"
    },
    "outputs": {}
  },
  "provider": {
    "aws": [
      {
        "region": "${var.aws_region}"
      }
    ]
  },
  "resource": {
    "aws_cloudformation_stack": {
      "operata_contact_lens_rules": {
        "//": {
          "metadata": {
            "path": "CloudCollectorV3Stack/operata_contact_lens_rules",
            "uniqueId": "operata_contact_lens_rules"
          }
        },
        "capabilities": [
          "CAPABILITY_IAM"
        ],
        "name": "operata-contact-lens-rules-prod${(var.connect_instance_friendly_name == \"\") ? \"\" : \"-${var.connect_instance_friendly_name}\"}",
        "on_failure": "DELETE",
        "parameters": {
          "amazonConnectInstanceArn": "${var.amazon_connect_instance_arn}"
        },
        "template_url": "https://operata-customer-assets.s3.amazonaws.com/ccv3-templates/v1.2.11/cloud-collector-v3-contact-lens-rules.yaml"
      }
    }
  },
  "terraform": {
    "required_providers": {
      "aws": {
        "source": "hashicorp/aws",
        "version": "~> 6.56"
      }
    },
    "required_version": ">= 1.5"
  },
  "variable": {
    "amazon_connect_instance_arn": {
      "description": "The Amazon Connect instance ARN where the Contact Lens Rules will be created",
      "type": "string"
    },
    "aws_region": {
      "description": "AWS Region where this stack will be created",
      "type": "string"
    },
    "connect_instance_friendly_name": {
      "default": "",
      "description": "Optional friendly name of your Amazon Connect instance for ease of reference (i.e. Dev, Prod, UAT). Alphanumeric, no spaces, 10 characters or fewer. Set this when onboarding more than one Amazon Connect instance into the same AWS account and region, so resource names stay unique.",
      "type": "string",
      "validation": [
        {
          "condition": "${can(regex(\"^[a-zA-Z0-9]{0,10}$\", var.connect_instance_friendly_name))}",
          "error_message": "connect_instance_friendly_name must be 10 or fewer alphanumeric characters, with no spaces or symbols."
        }
      ]
    }
  }
}