id int32 0 299 | prompt stringlengths 93 303 | prompt_original stringlengths 21 1.39k | intent stringlengths 25 2.17k | main_tf stringlengths 109 8.28k | checks_rego stringlengths 171 6.45k | plan_json stringlengths 1.41k 174k |
|---|---|---|---|---|---|---|
0 | I need a way to track which lookups are being made against our domain so we can review that activity in a central place, and it should be dependable enough to use for troubleshooting later. | Configure a query log that can create a log stream and put log events using Route 53 resources. Name the zone "primary", the cloudwatch log group "aws_route53_example_com", and the cloudwatch log resource policy "route53-query-logging-policy" | Has one "aws_route53_zone" resource
with "name"
Has one "aws_cloudwatch_log_group" resource
Has one "aws_cloudwatch_log_resource_policy" resource
with "policy_document" enabling "logs:CreateLogStream" and "logs:PutLogEvents"
with "policy_name"
Has one "aws_route53_query_log" resource
with "cloudwatch... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "primary" {
name = "example53.com"
}
resource "aws_cloudwatch_log_group" "aws_route53_example... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_cloudwatch_log_group = false
default is_valid_cloudwatch_log_resource_policy = false
default is_valid_route53_query_log = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_cloudwatch_log_group.aws_route53_example_com","mode":"managed","type":"aws_cloudwatch_log_group","name":"aws_route53_example_com","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"v... |
1 | I need to make sure one of our internal name‑lookup setups can be used from more than one private network, and it should work even as we add or remove networks over time. | Configure a valid Route 53 zone association resource | Has multiple "aws_vpc" resource
with a specified "cidr_block"
with "enable_dns_hostnames" equal to "true"
with "enable_dns_support" equal to "true"
Has one "aws_route53_zone" resource
with "name"
with a "vpc" block that contains "vpc_id" that references the "aws_vpc" resource
Has one "aws_route53_... | provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "example" {
cidr_block = "10.6.0.0/16"
enable_dns_hostnames = true
enable_dns_support = true
}
resource "aws_route53_zone" "example" {
name = "example.com"
vpc {
vpc_id = aws_vpc.example.id
}
}
resource "aws_vpc" "alternate" ... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_vpc = false
default is_valid_zone_association = false
default is_valid_vpc_association = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configurat... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_vpc_association_authorization.example","mode":"managed","type":"aws_route53_vpc_association_authorization","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,... |
2 | I need our site to show up at our main domain and automatically direct visitors to whatever is handling the traffic behind it, and it should stay reliable even if demand spikes. | Configure a Route 53 record with an Elastic Load Balancer resource. Call the zone "primary" and the elb "main" | Has one "aws_route53_zone" resource
with "name"
Has a "aws_elb" resource
with "name"
with "availability_zones"
with a "listener" block with "instance_port", "instance_protocol", "lb_port", "lb_protocol"
Has a "aws_route53_record" resource
with "name"
with "type"
with "ttl"
with "zone_i... | provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "primary" {
name = "example53.com"
}
resource "aws_elb" "main" {
name = "sample"
availability_zones = ["us-east-1c"]
listener {
instance_port = 80
instance_protocol = "http"
lb_port = 80
lb_proto... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
default is_valid_elb = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources[i]
resou... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elb.main","mode":"managed","type":"aws_elb","name":"main","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_logs":[],"availability_zones":["us-east-1c"],"connection... |
3 | Our main data store is too slow for people overseas, so I want to spread read traffic across a few copies in different parts of the world while keeping things reliable. | Using route 53 resources, configure a weighted routing policy that splits users between three db_instances that are replicas of a main db_instance. Provision the three replica instances in "us-east-1", "eu-central-1", and "ap-southeast-1". Provision the zone and main db_instance in "us-west-1". Call the zone "main", th... | Has one "aws_route53_zone" resource
with "name"
Has a "aws_db_instance" resource
with "identifier" set to "master"
with "instance_class"
with "allocated_storage"
with "engine"
with "username"
with "password"
with "backup_retention_period" set to a non-zero number
Has multiple "aws_db_i... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
configuration_aliases = [ aws.main, aws.us_east, aws.eu_central, aws.ap_southeast ]
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
alias = "main"
region = "us-west-2"
}
provider "aws" {
... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record_us = false
default is_valid_r53_record_eu = false
default is_valid_r53_record_ap = false
default is_valid_db_instance_main = false
default is_valid_db_instance_replicaus = false
defa... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_db_instance.primary","mode":"managed","type":"aws_db_instance","name":"primary","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"allocated_storage":20,"allow_major_versio... |
4 | I need a setup where people inside our company automatically connect to a different data store than outsiders, and everyone should be able to use simple, human‑friendly names to reach the right place without extra steps. | Configure Route 53 to return different database endpoints to internal versus external users. Internal users are routed to an internal RDS instance, while external users are routed to a publicly accessible one. Name the zones "private" and "public", the databases "internal" and "public", and the subnet group "main" | Has one "aws_vpc" resource
with a specified "cidr_block"
Has multiple "aws_subnet" resources
with "vpc_id" referencing the "aws_vpc" resource
with specified "cidr_block" for each
with "availability_zone" set
Has one "aws_db_subnet_group" resource
with "subnet_ids" referencing the IDs of "aws_subne... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
# Create a VPC for internal resources
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/24"
}
# RDS instances
resource ... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
default is_valid_db_instance = false
default is_valid_vpc = false
default is_valid_subnet = false
default is_valid_subnet_group = false
is_valid_r53_zone {
some i, j... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_db_instance.internal","mode":"managed","type":"aws_db_instance","name":"internal","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"allocated_storage":20,"allow_major_vers... |
5 | I need to spread read traffic across a couple of copies of our main database so things stay fast and reliable, and I want to be able to nudge more users toward one copy than the other. | Using route 53 resources, configure a weighted routing policy that splits users between two db_instances that are replicas of a main db_instance. Call the zone "main", the original db_instance "primary", and the two replicas "replica-1" and "replica-2" respectively | Has one "aws_route53_zone" resource
with "name"
Has a "aws_db_instance" resource
with "identifier" set to "primary"
with "instance_class"
with "allocated_storage"
with "engine"
with "username"
with "password"
with "backup_retention_period" set to a non-zero number
Has multiple "aws_db_... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_db_instance" "primary" {
identifier = "primary"
allocated_storage = 20
engine = "postgr... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record_primary = false
default is_valid_r53_record_secondary = false
default is_valid_db_instance_main = false
default is_valid_db_instance_replica1 = false
default is_valid_db_instance_repl... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_db_instance.primary","mode":"managed","type":"aws_db_instance","name":"primary","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"allocated_storage":20,"allow_major_versio... |
6 | I need a simple way to run and manage a web app in the cloud without handling servers myself, and it should have the right permissions to operate smoothly while keeping the setup pretty minimal. | Create a basic elastic beanstalk environment with a elastic beanstalk application. Name the iam_role "eb_ec2_role", the instance profile "eb_ec2_profile", and the elastic beanstalk application "my_application" | Has one "aws_iam_role" resource
with "name"
with "assume_role_policy" and "Service" set to "ec2.amazonaws.com"
Has one "aws_iam_role_policy_attachment" resource
with "role" referencing the "aws_iam_role"
with "policy_arn" set to "arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier"
Has one "aws_iam_ins... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
# IAM role for Elastic Beanstalk EC2 instances
resource "aws_iam_role" "eb_ec2_role" {
name = "elastic_beanstalk_ec2_role_... | package terraform.validation
default is_configuration_valid = false
default is_valid_iam_instance_profile = false
default is_valid_iam_role = false
default is_valid_iam_role_policy_attachment = false
default is_valid_eb_app = false
default is_valid_eb_env = false
is_valid_iam_role {
some i
resource :... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.my_application","mode":"managed","type":"aws_elastic_beanstalk_application","name":"my_application","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"v... |
7 | I want to be able to shift my app’s traffic gradually between two different versions so I can roll out updates safely and switch back quickly if something goes wrong. | Configure Blue/Green deployment with Route53 resources to navigate traffic between Elastic Beanstalk Environments. Name the environments "blue" and "green" and implement a Weighted Routing Policy for the records | Has one "aws_iam_role" resource
with "name"
with "assume_role_policy" and "Service" set to "ec2.amazonaws.com"
Has one "aws_iam_role_policy_attachment" resource
with "role" referencing the "aws_iam_role"
with "policy_arn" set to "arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier"
Has one "aws_iam_ins... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "eb_ec2_role" {
name = "elastic_beanstalk_ec2_role"
assume_role_policy = jsonencode({
Versi... | package terraform.validation
default is_configuration_valid = false
default is_valid_iam_instance_profile = false
default is_valid_iam_role = false
default is_valid_iam_role_policy_attachment = false
default is_valid_eb_app = false
default is_valid_eb_env = false
default is_valid_r53_zone = false
default is_val... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.blue_app","mode":"managed","type":"aws_elastic_beanstalk_application","name":"blue_app","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"app... |
8 | I need our main site to show up when people type in our custom name, and it should lead them to the right place reliably. | Set up a record that maps a domain name to an IPv4 address using Route 53 resources | Has one "aws_route53_zone" resource
with "name" set to "example53.com"
Has one "aws_route53_record" resource
with "name"
with "type" set to "A"
with "ttl"
with "records"
with "zone_id" referencing the "aws_route53_zone" resource
| provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "example53" {
name = "example53.com"
}
resource "aws_route53_record" "example53_A" {
zone_id = aws_route53_zone.example53.zone_id
name = "example53.com"
type = "A"
ttl = "300"
records = ["192.0.2.1"]
} | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_route53_zone"
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_record.example53_A","mode":"managed","type":"aws_route53_record","name":"example53_A","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"alias":[],"cidr_routing_pol... |
9 | I want our main domain to be reachable using modern addressing so people on newer networks can access it reliably. | Set up a record that maps a domain name to an IPv6 address using Route 53 resources | Has one "aws_route53_zone" resource
with "name" set to "example53.com"
Has one "aws_route53_record" resource
with "name"
with "type" set to "AAAA"
with "ttl"
with "records"
with "zone_id" referencing the "aws_route53_zone" resource
| provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "example53" {
name = "example53.com"
}
resource "aws_route53_record" "example53_A" {
zone_id = aws_route53_zone.example53.zone_id
name = "example53.com"
type = "AAAA"
ttl = "300"
records = ["2001:0db8:85a3:0000:0000:8a2e:0370:... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_route53_zone"
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_record.example53_A","mode":"managed","type":"aws_route53_record","name":"example53_A","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"alias":[],"cidr_routing_pol... |
10 | I need a way for one of our machines to clearly identify itself when others look it up by its address, and it should be set up in a way that’s easy to manage going forward. | Set up a Pointer record for reverse DNS using Route 53 resources. The domain name should be "host.example53.com" and name the zone "reverse_zone" | Has one "aws_route53_zone" resource
with "name" ending in ".in-addr.arpa"
Has one "aws_route53_record" resource
with "name"
with "type" set to "PTR"
with "ttl"
with "records"
with "zone_id" referencing the "aws_route53_zone" resource
| provider "aws" {
region = "us-east-1"
}
# Create Reverse DNS Hosted Zone
resource "aws_route53_zone" "reverse_zone" {
name = "2.0.192.in-addr.arpa"
}
# Create a PTR Record for a specific IP address within that zone
resource "aws_route53_record" "ptr_record" {
zone_id = aws_route53_zone.reverse_zone.zone_id
na... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_route53_zone"
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_record.ptr_record","mode":"managed","type":"aws_route53_record","name":"ptr_record","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"alias":[],"cidr_routing_polic... |
11 | I need to prove that we control our domain by adding a small piece of text that an external service can check, and it should be easy to update later if needed. | Set up a TXT recordfor domain ownership verification purposes using Route 53 resources. The verification string should be "passwordpassword" and the name of the zone should be "example" | Has one "aws_route53_zone" resource
with "name" set to "example53.com"
Has one "aws_route53_record" resource
with "name"
with "type" set to "TXT"
with "ttl"
with "records" set to a string
with "zone_id" referencing the "aws_route53_zone" resource
| provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "example" {
name = "example53.com"
}
# TXT Record for domain verification or other purposes
resource "aws_route53_record" "example_txt" {
zone_id = aws_route53_zone.example.zone_id
name = "sub.example53.com"
type = "TXT"
ttl = "... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_route53_zone"
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_record.example_txt","mode":"managed","type":"aws_route53_record","name":"example_txt","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"alias":[],"cidr_routing_pol... |
12 | I need an easy way to run and manage a web app without dealing with a lot of server setup, and it should scale automatically and run with the right access to other parts of our system. | Create an elastic beanstalk WebServer environment with a elastic beanstalk application. Name the iam_role "eb_ec2_role", the instance profile "eb_ec2_profile", and the elastic beanstalk application "my_application" | Has one "aws_iam_role" resource
with "name"
with "assume_role_policy" and "Service" set to "ec2.amazonaws.com"
Has one "aws_iam_role_policy_attachment" resource
with "role" referencing the "aws_iam_role"
with "policy_arn" set to "arn:aws:iam::aws:policy/AWSElasticBeanstalkWebTier"
Has one "aws_iam_ins... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
# IAM role for Elastic Beanstalk EC2 instances
resource "aws_iam_role" "eb_ec2_role" {
name = "elastic_beanstalk_ec2_role_... | package terraform.validation
default is_configuration_valid = false
default is_valid_iam_instance_profile = false
default is_valid_iam_role = false
default is_valid_iam_role_policy_attachment = false
default is_valid_eb_app = false
default is_valid_eb_env = false
is_valid_iam_role {
some i
resource :... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.my_application","mode":"managed","type":"aws_elastic_beanstalk_application","name":"my_application","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"v... |
13 | I need a reusable setup blueprint for one of our apps so we can spin up environments consistently without doing all the settings by hand. | Create a template of an elastic beanstalk application | Has one "aws_elastic_beanstalk_application" resource
with "name"
Has one "aws_elastic_beanstalk_configuration_template" resource
with "name"
with "application" referencing the "aws_elastic_beanstalk_application" resource
with "solution_stack_name" | provider "aws" {
region = "us-east-1"
}
resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name"
description = "tf-test-desc"
}
resource "aws_elastic_beanstalk_configuration_template" "tf_template" {
name = "tf-test-template-config"
application = aws_elasti... | package terraform.validation
default is_configuration_valid = false
default is_valid_eb_app = false
default is_valid_eb_app_template = false
is_valid_eb_app {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_elastic_beanstalk_application"
resource.expression... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.tftest","mode":"managed","type":"aws_elastic_beanstalk_application","name":"tftest","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"appvers... |
14 | I need a reusable setup for running a Go-based service in our environment so new deployments stay consistent and easy to spin up. | Create a template of an elastic beanstalk application that is running a version of Go | Has one "aws_elastic_beanstalk_application" resource
with "name"
Has one "aws_elastic_beanstalk_configuration_template" resource
with "name"
with "application" referencing the "aws_elastic_beanstalk_application" resource
with "solution_stack_name" that references a valid "Go" version | provider "aws" {
region = "us-east-1"
}
resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name"
description = "tf-test-desc"
}
resource "aws_elastic_beanstalk_configuration_template" "tf_template" {
name = "tf-test-template-config"
application = aws_elasti... | package terraform.validation
default is_configuration_valid = false
default is_valid_eb_app = false
default is_valid_eb_app_template = false
is_valid_eb_app {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_elastic_beanstalk_application"
resource.expression... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.tftest","mode":"managed","type":"aws_elastic_beanstalk_application","name":"tftest","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"appvers... |
15 | I need a simple way to run my app in the cloud so it can grow as usage increases, without me having to manage the underlying servers. | Provision a resource to deploy and scale a web application that was developed with supported programming languages. | Has one "aws_elastic_beanstalk_application" resource
with "name" | provider "aws" {
region = "us-east-1"
}
resource "aws_elastic_beanstalk_application" "tftest" {
name = "tf-test-name"
description = "tf-test-desc"
} | package terraform.validation
default is_configuration_valid = false
default is_valid_eb_app = false
is_valid_eb_app {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_elastic_beanstalk_application"
resource.expressions.name
}
is_configuration_valid {
is... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.tftest","mode":"managed","type":"aws_elastic_beanstalk_application","name":"tftest","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"appvers... |
16 | I need a simple way to manage new releases of my app so old versions don’t pile up, but still keep things running smoothly and securely. | Create an Elastic Beanstalk application with an app version lifecycle | Has one "aws_elastic_beanstalk_application" resource
with "name"
with "appversion_lifecycle" block
Has one "aws_iam_role" resource
with "name"
with "assume_role_policy" and "Service" set to "elasticbeanstalk.amazonaws.com" | provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "beanstalk_service" {
name = "tf-test-beanstalk-service-role"
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Action = "sts:AssumeRole",
Effect = "Allow",
Principal = {
Servi... | package terraform.validation
default is_configuration_valid = false
default is_valid_eb_app = false
default is_valid_iam_role = false
is_valid_eb_app {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_elastic_beanstalk_application"
resource.expressions.nam... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.tftest","mode":"managed","type":"aws_elastic_beanstalk_application","name":"tftest","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"appvers... |
17 | I need a place to run and update my app where older releases get cleaned up automatically after a few days so things don’t pile up. | Create an Elastic Beanstalk application with an app version lifecycle. Retain the version for 5 days | Has one "aws_elastic_beanstalk_application" resource
with "name"
with "appversion_lifecycle" block
Has one "aws_iam_role" resource
with "name"
with "assume_role_policy" and "Service" set to "elasticbeanstalk.amazonaws.com" | provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "beanstalk_service" {
name = "tf-test-beanstalk-service-role"
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
Action = "sts:AssumeRole",
Effect = "Allow",
Principal = {
Servi... | package terraform.validation
default is_configuration_valid = false
default is_valid_eb_app = false
default is_valid_iam_role = false
is_valid_eb_app {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_elastic_beanstalk_application"
resource.expressions.nam... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elastic_beanstalk_application.tftest","mode":"managed","type":"aws_elastic_beanstalk_application","name":"tftest","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"appvers... |
18 | I need an automated way to run my build steps whenever my code changes, using a setup that can pull from my existing repo and run in a simple, lightweight environment. | create a Basic AWS codebuild project resource with example iam role and an example GITHUB source | Has one "aws_iam_role" resource and one "aws_codebuild_project" resource with the "type" argument within the "source" block equal to "GITHUB" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
data "aws_iam_policy_document" "assume_role" {
statement {
effect = "Allow"
principals {
type = "Serv... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
h... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example","mode":"managed","type":"aws_codebuild_project","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_identi... |
19 | I need an automated system that can pull our code from an online repo, run our builds with some custom settings, and keep things snappy by reusing work where possible. | create a AWS codebuild project resource with example iam role, an example GITHUB source, environment variables, and a cache | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_codebuild_project" resource with a "cache" block, at least one "environment_variable" within the "environment" block, and the "type" argument within the "source" block equal to "GITHUB" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "example" {
name = "example"
assume_role_policy = jsonencode({
Version = "2012-10-17"
S... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
h... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example","mode":"managed","type":"aws_codebuild_project","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_identi... |
20 | I need an automated build setup that pulls code from our repo, runs tasks in a controlled environment, and keeps the outputs and any reusable build data organized so things run quickly and reliably. | create a AWS codebuild project resource with example iam role, an example GITHUB source, artifact, and a cache | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_codebuild_project" resource with a "cache" block, the "type" argument within the "artifacts" block not equal to "NO_ARTIFACTS", and the "type" argument within the "source" block equal to "GITHUB" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "example4" {
name = "example4"
assume_role_policy = jsonencode({
Version = "2012-10-17"
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
h... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example4","mode":"managed","type":"aws_codebuild_project","name":"example4","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_iden... |
21 | I want an automated build process that pulls code from our online repo and keeps track of everything it does, and it should be able to run in a lightweight environment without costing too much. | create a AWS codebuild project resource with example iam role, example GITHUB source, and a logs config | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_codebuild_project" resource with the "type" argument within the "source" block equal to "GITHUB" and a "logs_config" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "example5" {
name = "example5"
assume_role_policy = jsonencode({
Version = "2012-10-17"
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
has_vali... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example5","mode":"managed","type":"aws_codebuild_project","name":"example5","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_iden... |
22 | I want an automated build setup that can pull in code from more than one place and run in a locked‑down environment, keeping things as simple as possible. | create a AWS codebuild project resource with example iam role and secondary sources | Has one "aws_iam_role" resource and one "aws_codebuild_project" resource with a "secondary_sources" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
data "aws_iam_policy_document" "assume_role" {
statement {
effect = "Allow"
principals {
type = "Serv... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
h... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example7","mode":"managed","type":"aws_codebuild_project","name":"example7","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_iden... |
23 | I need an automated build setup that can pull in more than one codebase and produce multiple outputs, all while keeping things organized and secure. | create a AWS codebuild project resource with example iam role and secondary artifiacts | Has one "aws_iam_role" resource, at least one "aws_s3_bucket" resource, and one "aws_codebuild_project" resource with a "secondary_artifacts" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "test_role8" {
name = "test_role8"
assume_role_policy = jsonencode({
Version = "2012-10-17"
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
h... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example7","mode":"managed","type":"aws_codebuild_project","name":"example7","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_iden... |
24 | I need an automated setup that can take code from our repo, run whatever build steps we define, bundle the output somewhere durable, and also be able to run several builds at once without breaking our limits. | create a AWS codebuild project resource with example iam role and buildbatch configuration | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_codebuild_project" resource with a "build_batch_config" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "test_role9" {
name = "test_role9"
assume_role_policy = jsonencode({
Version = "2012-10-17"
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
has_vali... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example9","mode":"managed","type":"aws_codebuild_project","name":"example9","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_iden... |
25 | I need an automated build setup that can pull code from more than one place, run with a few custom settings, and save its outputs in multiple locations, all while keeping things simple and secure. | create a AWS codebuild project resource with example iam role, environment variables, secondary sources, secondary artifacts | Has one "aws_iam_role" resource, at least one "aws_s3_bucket" resource, and one "aws_codebuild_project" resource with a "secondary_artifacts" block, with a "secondary_sources" block, and at least one "environment_variable" within the "environment" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "test_role11" {
name = "test_role11"
assume_role_policy = jsonencode({
Version = "2012-10-17... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for aws_iam_role resource
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"codebuild.amazonaws.com")
}
has_vali... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_codebuild_project.example11","mode":"managed","type":"aws_codebuild_project","name":"example11","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"artifacts":[{"artifact_id... |
26 | I need a simple natural‑language helper that can guide people through placing an order, asking for the details it needs, confirming everything, and handling misunderstandings gracefully. | create an aws_lex_bot | Has one resource "aws_lex_bot" and one resource "aws_lex_intent" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_intent" "order_flowers" {
name = "OrderFlowers"
description = "Intent to order a bouquet of flowers for... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.order_flowers","mode":"managed","type":"aws_lex_bot","name":"order_flowers","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message":[{"conte... |
27 | I want a simple conversational helper that can guide people through giving a few pieces of information step by step, making sure nothing important is missed before confirming their request. | create an aws_lex bot with multiple slots | Has one resource "aws_lex_bot" and one resource "aws_lex_intent" with at least 2 slot blocks | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_intent" "order_pizza_intent" {
name = "OrderPizzaIntent"
description ... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.pizza_ordering_bot","mode":"managed","type":"aws_lex_bot","name":"pizza_ordering_bot","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message... |
28 | I need a simple conversational tool that can take a food order, ask for the details it needs, and then check whether the customer wants to add anything else before wrapping up. | create an aws_lex bot for ordering pizza with a followup question | Has one resource "aws_lex_bot" and one resource "aws_lex_intent" with followup question block (slot block and "aws_lex_slot_type" is not mandatory) | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_bot" "pizza_order_bot" {
name = "PizzaOrderBot"
description = "Pizza order bot"
idle_session_ttl_in_s... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.pizza_order_bot","mode":"managed","type":"aws_lex_bot","name":"pizza_order_bot","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message":[{"c... |
29 | I need a simple conversational tool that can guide someone through placing a food order and wrap up with a friendly confirmation message once it has everything it needs. | create an aws_lex_bot for ordering pizzas with a conclusion statement | Has one resource "aws_lex_bot" and at least one resource "aws_lex_intent" with at least one user prompt | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_intent" "order_pizza_intent" {
name = "OrderPizzaIntent"
description ... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.pizza_ordering_bot","mode":"managed","type":"aws_lex_bot","name":"pizza_ordering_bot","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message... |
30 | I want a simple conversational helper that can understand when someone wants to plan a trip and guide them through it, with clear fallbacks if it gets confused. | create an aws_lex_bot for booking a trip with all arguments filled | Has one resource "aws_lex_bot" with all arguments initialized and at least one "aws_lex_intent" resource | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_intent" "BookTrip" {
description = "Book a trip"
name = "BookTrip"
sample_utterances = ... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.BookTripBot","mode":"managed","type":"aws_lex_bot","name":"BookTripBot","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message":[{"content":... |
31 | I want to set up a conversational helper that can walk people through ordering food, handle updates or cancellations, answer basic questions, and generally guide them through a few different actions, all while keeping things simple and reliable. | create an aws_lex_bot for ordering pizzas with 5 different intents | Has one resource "aws_lex_bot" with 5 different intent blocks and 5 different "aws_lex_intent" resources | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_intent" "OrderPizza" {
name = "OrderPizza"
description = "Pizza order processing"
sample_utterances =... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.PizzaOrderBot","mode":"managed","type":"aws_lex_bot","name":"PizzaOrderBot","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message":[{"conte... |
32 | I need a friendly, kid‑oriented way for people to talk to an automated helper that can take simple requests, change their mind if needed, and respond politely. | create an aws_lex_bot for ordering pizzas that is meant for kids | Has one resource "aws_lex_bot" with "child_directed" = true and at least one "aws_lex_intent" resource | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_bot" "KidsPizzaOrderBot" {
child_directed = true
name = "KidsPizzaOrderBot"
process_behavi... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.KidsPizzaOrderBot","mode":"managed","type":"aws_lex_bot","name":"KidsPizzaOrderBot","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message":... |
33 | I need a conversational tool that can take simple food orders and should only act on a request when it’s reasonably sure what the person meant, while still being easy for people to interact with. | create an aws_lex_bot for ordering pizzas and set nlu_intent_confidence_threshold to 0.5 | Has one resource "aws_lex_bot" with argument "enable_model_improvements" = true
and argument "nlu_intent_confidence_threshold" = 0.5 and at least one resource "aws_lex_intent" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_lex_intent" "order_pizza_intent" {
name = "OrderPizzaIntent"
description ... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_lex_bot.pizza_ordering_bot","mode":"managed","type":"aws_lex_bot","name":"pizza_ordering_bot","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"abort_statement":[{"message... |
34 | I want callers to be able to interact with an automated assistant during support conversations, and I need it wired into our existing setup without a lot of extra complexity. | create an aws_connect_bot_association resource | Has one resource "aws_connect_instance", at least one "aws_lex_intent" resource, one "aws_lex_bot" resource, and one "aws_connnect_bot_association" resource | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
data "aws_region" "current" {}
resource "aws_connect_instance" "example" {
identity_management_type = "CONNECT_MANAGED"
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
# Rule for multiple aws_lex_intent resources
has_valid_lex_intents {
count([intent | intent := input.planned_values.root_module.resources[_]; intent.type == "aws_lex_intent"; intent.values.name; intent.values.fulfillment_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_connect_bot_association.example","mode":"managed","type":"aws_connect_bot_association","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"lex_bot":[{"lex_r... |
35 | I need a simple way to take in continuous chunks of data so other parts of the system can process them reliably, and it should work even if the volume fluctuates a bit. | Generate a basic Amazon Kinesis stream | Has one "aws_kinesis_stream" resource | provider "aws" {
region = "us-west-2"
}
resource "aws_kinesis_stream" "test_stream" {
name = "drow1"
shard_count = 1
retention_period = 48
shard_level_metrics = [
"IncomingBytes",
"OutgoingBytes",
]
stream_mode_details {
stream_mode = "PROVISIONED"
}
tags = {
Envir... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_kinesis_stream {
resource := input.planned_values.root_module.resources[i]
resource.type == "aws_kinesis_stream"
resource.values.name
}
has_valid_resources {
has_valid_kinesis_stream
} | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_kinesis_stream.test_stream","mode":"managed","type":"aws_kinesis_stream","name":"test_stream","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"encryption_type":"NONE","en... |
36 | I need a simple setup that can watch a continuous flow of event data and run some lightweight processing on it in a reliable, low‑maintenance way. | Generate a basic Amazon Kinesis Analytics Application with an input kinesis stream | Has one "aws_kinesis_analytics_application" resource with one "aws_kinesis_stream" resource as an input | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
data "aws_iam_policy_document" "StreamReaderWriter" {
statement {
effect = "Allow"
actions = ["kinesis:DescribeStr... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"kinesisanalytics.amazonaws.com")
}
has_valid_kinesis_stream {
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_policy.StreamReaderWriter","mode":"managed","type":"aws_iam_policy","name":"StreamReaderWriter","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"delay_after_policy_cr... |
37 | I need to run some continuous data processing logic that can handle streaming workloads reliably, and it should run in a managed environment so I don’t have to deal with the underlying servers. | Generate a basic Amazon Kinesis V2 Analytics Application to manage an Apache Flink Application | Has one "aws_iam_role" resource, and one "aws_kinesisanalyticsv2_application" with argument runtime_environment != "SQL-1_0" | provider "aws" {
region = "us-west-2"
}
data "aws_iam_policy_document" "KinesisAssume" {
statement {
effect = "Allow"
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["kinesisanalytics.amazonaws.com"]
}
}
}
resource "aws_iam_role" "kinesis_role" {
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"kinesisanalytics.amazonaws.com")
}
has_valid_kinesisanalyticsv... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.kinesis_role","mode":"managed","type":"aws_iam_role","name":"kinesis_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[... |
38 | We need a way to take in a steady stream of app events, clean them up on the fly, and store them in a long‑term place where the files are automatically organized by things like who they belong to and when they arrived, all while keeping it flexible enough to rearrange later if our data patterns change. | Generate a Kinesis Firehose Delivery Stream with an extended S3 Destination with Dynamic Partitioning enabled | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_kinesis_firehose_delivery_stream" resource with the argument "enabled" within the "dynamic_partitioning_configuration" block set to "true"
| terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
# even though this program seems to be problematic, it's copied from https://registry.terraform.io/providers/hashicorp/aws/la... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
re... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.firehose_role","mode":"managed","type":"aws_iam_role","name":"firehose_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\"... |
39 | We need a way to take our incoming app data and load it into our analytics system automatically, with a fallback option for storing the raw files in case something goes wrong. | Generate a Kinesis Firehose Delivery Stream with a Redshift cluster destination | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, one "aws_redshift_cluster" resource, and one "aws_kinesis_firehose_delivery_stream" resource with a "redshift_configuration" block
| terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "firehose_role" {
name = "firehose_redshift_role"
assume_role_policy = jsonencode({
Version ... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
re... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_policy.firehose_policy","mode":"managed","type":"aws_iam_policy","name":"firehose_policy","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"delay_after_policy_creation... |
40 | We need a way to stream our app’s event data into a search and analytics system in near‑real time, with a fallback location for anything that can’t be processed right away. | Generate a Kinesis Firehose Delivery Stream with a Elasticsearch destination with the appropriate iam role and bucket | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, one "aws_elasticsearch_domain" resource, and one "aws_kinesis_firehose_delivery_stream" resource with an "elasticsearch_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "januarythird" {
bucket = "januarythird"
}
resource "aws_elasticsearch_domain" "test_cluster" {
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
resource ... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticsearch_domain.test_cluster","mode":"managed","type":"aws_elasticsearch_domain","name":"test_cluster","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"cluster_confi... |
41 | We need a way to funnel a high volume of incoming event data into our search and analytics system in near real time, with some kind of fallback storage in case the main pipeline slows down. | Generate a Kinesis Firehose Delivery Stream with an OpenSearch destination | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, one "aws_opensearch_domain" resource, and one "aws_kinesis_firehose_delivery_stream" resource with an "opensearch_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "januaryseventh" {
bucket = "januaryseventh"
}
resource "aws_opensearch_domain" "test_cluster" {... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
re... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.firehose_role","mode":"managed","type":"aws_iam_role","name":"firehose_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\"... |
42 | We need a way to move our app’s event data into our analytics tool quickly, with a fallback so we don’t lose anything if the primary path has issues. | Generate a Kinesis Firehose Delivery Stream with a Splunk destination | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_kinesis_firehose_delivery_stream" resource with an "splunk_configuration" block | provider "aws" {
region = "us-west-2"
}
data "aws_iam_policy_document" "firehose_assume_role" {
statement {
effect = "Allow"
principals {
type = "Service"
identifiers = ["firehose.amazonaws.com"]
}
actions = ["sts:AssumeRole"]
}
}
resource "aws_iam_role" "firehose_role" {
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
resource ... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.firehose_role","mode":"managed","type":"aws_iam_role","name":"firehose_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\"... |
43 | We need a way to take a steady flow of app events and push them into a search-friendly system in near real time, with some kind of fallback storage so we don’t lose data if the main target is slow or unavailable. | Generate a Kinesis Firehose Delivery Stream with a OpenSearch Serverless Destination | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, one "aws_opensearchserverless_security_policy" resource, and one "aws_kinesis_firehose_delivery_stream" resource with an "opensearchserverless_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
data "aws_region" "current" {}
data "aws_caller_identity" "current" {}
resource "aws_iam_role" "firehose_role" {
name = "... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
resource ... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_policy.firehose_policy","mode":"managed","type":"aws_iam_policy","name":"firehose_policy","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"delay_after_policy_creation... |
44 | We need a way to collect a steady stream of app events, move them reliably into our search and analytics system, and keep everything running inside our private network for security. | Generate a Kinesis Firehose Delivery Stream with a Elasticsearch Destination With VPC | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, one "aws_elasticsearch_domain" resource, one "aws_vpc" resource, two "aws_subnet" resources, one "aws_security_group," and one "aws_kinesis_firehose_delivery_stream" resource with a "vpc_config" block within the "elasticsearch_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "bucket" {
bucket_prefix = "my-bucket-"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
re... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticsearch_domain.test_cluster","mode":"managed","type":"aws_elasticsearch_domain","name":"test_cluster","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"cluster_confi... |
45 | We need a way to send our app’s event data to an external monitoring service in near real‑time, with a fallback so nothing gets lost if the service slows down or goes offline. | Generate a Kinesis Firehose Delivery Stream with a HTTP Endpoint (e.g., New Relic) Destination | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_kinesis_firehose_delivery_stream" resource with an "http_endpoint_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "firehose_role2" {
name = "firehose_http_s3_role"
assume_role_policy = jsonencode({
Version ... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
resource ... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_policy.firehose_http_s3_policy","mode":"managed","type":"aws_iam_policy","name":"firehose_http_s3_policy","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"delay_after... |
46 | We need a way to move our app’s streaming data into our search and analytics tool in near real time, and the whole thing has to run inside our private network for security. | Generate a Kinesis Firehose Delivery Stream with OpenSearch Destination With VPC | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, one "aws_opensearch_domain" resource, one "aws_vpc" resource, two "aws_subnet" resources, one "aws_security_group," and one "aws_kinesis_firehose_delivery_stream" resource with a "vpc_config" block within the "opensearch_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "bucket" {
bucket_prefix = "my-bucket-"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
resour... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.firehose_role","mode":"managed","type":"aws_iam_role","name":"firehose_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\"... |
47 | I need a simple place where I can send live video feeds so they can be stored briefly and accessed by whatever needs to process them. | Generate a basic Kinesis Video Stream resource | Has one "aws_kinesis_video_stream" resource | provider "aws" {
region = "us-east-1"
}
resource "aws_kinesis_video_stream" "default" {
name = "terraform-kinesis-video-stream"
data_retention_in_hours = 1
device_name = "kinesis-video-device-name"
media_type = "video/h264"
tags = {
Name = "terraform-kinesis... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_kinesis_video_stream {
some i
resource := input.planned_values.root_module.resources[i]
resource.type == "aws_kinesis_video_stream"
resource.values.name
}
has_valid_resources {
has_valid_kinesis_video_... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_kinesis_video_stream.default","mode":"managed","type":"aws_kinesis_video_stream","name":"default","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"data_retention_in_hours... |
48 | I need a way for one of our background services to reliably tap into a stream of incoming events so it can process them in real time without missing anything. | Generate a resource to manage a Kinesis Stream Consumer | Has one "aws_kinesis_stream" resource and one "aws_kinesis_stream_consumer" resource | provider "aws" {
region = "us-west-2"
}
resource "aws_kinesis_stream" "example" {
name = "example-stream"
shard_count = 1
}
resource "aws_kinesis_stream_consumer" "example" {
name = "example-consumer"
stream_arn = aws_kinesis_stream.example.arn
} | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_kinesis_stream {
some i
resource := input.planned_values.root_module.resources[i]
resource.type == "aws_kinesis_stream"
resource.values.name
}
has_valid_kinesis_stream_consumer {
some i
resource :... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_kinesis_stream.example","mode":"managed","type":"aws_kinesis_stream","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"encryption_type":"NONE","enforce_co... |
49 | We need a way to funnel high‑volume app data into long‑term storage automatically, with something that can smooth out traffic spikes and keep things reliable without much manual work. | Generate a Kinesis Firehose Delivery Stream with an extended S3 Destination | Has one "aws_iam_role" resource, one "aws_s3_bucket" resource, and one "aws_kinesis_firehose_delivery_stream" resource with an "extended_s3_configuration" block
| provider "aws" {
region = "us-west-2"
}
resource "aws_s3_bucket" "januarysixteenth" {
bucket = "januarysixteenth"
}
data "aws_iam_policy_document" "firehose_assume_role" {
statement {
effect = "Allow"
principals {
type = "Service"
identifiers = ["firehose.amazonaws.com"]
}
a... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"firehose.amazonaws.com")
}
has_valid_bucket {
some i
re... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.firehose_role","mode":"managed","type":"aws_iam_role","name":"firehose_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\"... |
50 | I need a simple way to analyze streaming data as it comes in, nothing fancy, just enough to get something running quickly. | Generate a basic Amazon Kinesis Analytics Application | Has one "aws_kinesis_analytics_application" resource | provider "aws" {
region = "us-west-2"
}
resource "aws_kinesis_analytics_application" "test_application" {
name = "kinesis-analytics-application-test"
} | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_kinesis_analytics_application {
some i
resource := input.planned_values.root_module.resources[i]
resource.type == "aws_kinesis_analytics_application"
resource.values.name
}
has_valid_resource... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_kinesis_analytics_application.test_application","mode":"managed","type":"aws_kinesis_analytics_application","name":"test_application","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":... |
51 | I need a small setup that can run some ongoing data queries for me, without requiring much maintenance and able to scale as needed. | Generate a basic Amazon Kinesis V2 Analytics Application to manage a SQL application | Has one "aws_iam_role" resource, and one "aws_kinesisanalyticsv2_application" with argument runtime_environment == "SQL-1_0" | provider "aws" {
region = "us-west-2"
}
data "aws_iam_policy_document" "KinesisAssume" {
statement {
effect = "Allow"
actions = ["sts:AssumeRole"]
principals {
type = "Service"
identifiers = ["kinesisanalytics.amazonaws.com"]
}
}
}
resource "aws_iam_role" "kinesis_role" {
... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"kinesisanalytics.amazonaws.com")
}
has_valid_kinesisanalyticsv2_appli... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.kinesis_role","mode":"managed","type":"aws_iam_role","name":"kinesis_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[... |
52 | I need to pull information from a site our system can’t reach directly, and it should grab the content automatically on a regular basis while going through our own network path for security. | Generate a Kendra data source resource with a proxy configuration | Has one "aws_iam_role" resource, one "aws_kendra_index" resource, and one "aws_kendra_data_source" resource with a "proxy_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "role" {
name = "Kendra-Role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statemen... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"kendra.amazonaws.com")
}
has_valid_kendra_index {
some i
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.role","mode":"managed","type":"aws_iam_role","name":"role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"st... |
53 | I need a system that can scan information from a site we point it to, but only pay attention to certain parts of it while ignoring others, and it should be easy to control what gets included or skipped. | Generate a Kendra data source resource With URL Exclusion and Inclusion Patterns | Has one "aws_iam_role" resource, one "aws_kendra_index" resource, and one "aws_kendra_data_source" resource with "url_exclusion_patterns" and "url_inclusion_patterns" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "role" {
name = "Kendra-Role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statemen... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"kendra.amazonaws.com")
}
has_valid_kendra_index {
some i
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.role","mode":"managed","type":"aws_iam_role","name":"role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"st... |
54 | I need a searchable place for all our internal content, and it should understand a few basic details about each item so results feel reasonably relevant without me having to fine‑tune anything. | Generate a basic Kendra index resource with the default Document Metadata Configuration Updates | Has one "aws_iam_role" resource and one "aws_kendra_index" resource with all default "document_metadata_configuration_updates" set | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "role" {
name = "Kendra-Role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statement... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"kendra.amazonaws.com")
}
has_valid_kendra_index {
some i
resou... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.role","mode":"managed","type":"aws_iam_role","name":"role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"st... |
55 | I need a searchable knowledge hub for our internal content, and it should understand who’s allowed to see what based on our existing team structure. | Generate a basic Kendra index resource With user group resolution configuration | Has one "aws_iam_role" resource and one "aws_kendra_index" resource with the "user_group_resolution_configuration" block | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "role" {
name = "Kendra-Role"
assume_role_policy = <<EOF
{
"Version": "2012-10-17",
"Statemen... | package terraform.validation
import future.keywords.in
default has_valid_resources = false
has_valid_iam_role(resources) {
some resource in resources
resource.type == "aws_iam_role"
contains(resource.change.after.assume_role_policy,"kendra.amazonaws.com")
}
has_valid_kendra_index {
some i
resou... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.role","mode":"managed","type":"aws_iam_role","name":"role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\":\"st... |
56 | I need our custom domain to be recognized and managed so we can start using it for our online services. | Set up an aws_route_53 zone named "example53.com" | Has one "aws_route53_zone" resource
with "name" set to "example53.com" | provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "primary" {
name = "example53.com"
} | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_route53_zone"
resource.expressions.name.constant_value == "ex... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_zone.primary","mode":"managed","type":"aws_route53_zone","name":"primary","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"comment":"Managed by Terraform","delega... |
57 | I need my main domain to direct visitors to a specific place where our app is running, keeping the setup straightforward. | Set up a non-alias aws_route_53 record that is linked to an aws_route53_zone resource named "example53.com" | Has one "aws_route53_zone" resource
with "name" set to "example53.com"
Has one "aws_route53_record" resource
with "name"
with "type"
with "ttl"
with "records"
with "zone_id" referencing the "aws_route53_zone" resource
| provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "example53" {
name = "example53.com"
}
resource "aws_route53_record" "example53_A" {
zone_id = aws_route53_zone.example53.zone_id
name = "example53.com"
type = "A"
ttl = "300"
records = ["192.0.2.1"]
} | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_route53_zone"
resource.ex... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_record.example53_A","mode":"managed","type":"aws_route53_record","name":"example53_A","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"alias":[],"cidr_routing_pol... |
58 | I need a way for systems inside our internal network to look up a specific service by a stable name, and it should only be reachable from within that network. | Set up a non-alias aws_route_53 record that is linked to an aws_route53_zone resource called "private_zone" whose name paramter is set to "internal.example53.com" and has an aws_vpc resource called "main" attached to it | Has one "aws_vpc" resource
with a specified "cidr_block"
Has one "aws_route53_zone" resource
with "name" set to "internal.example53.com"
with a "vpc" block that contains "vpc_id" that references the "aws_vpc" resource
Has one "aws_route53_record" resource
with "name"
with "type"
with "ttl"
... | provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
tags = {
Name = "main-vpc"
}
}
resource "aws_route53_zone" "private_zone" {
name = "internal.example53.com"
vpc {
vpc_id = aws_vpc.main.id
}
}
resource "aws_route53_record" "internal_record" {... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record = false
default is_valid_vpc = false
# Validate aws_vpc resource
is_valid_vpc {
some i
resource := input.configuration.root_module.resources[i]
resource.type == ... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_record.internal_record","mode":"managed","type":"aws_route53_record","name":"internal_record","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"alias":[],"cidr_rou... |
59 | I need a way to automatically flag when one of our machines is working too hard and have that status feed into whatever system is watching over our app’s overall well‑being, but it should err on the side of saying things are fine if there isn’t enough info. | Configure a health check with route 53 that uses a cloudwatch metric alarm called "foobar". Set the metric_name to "CPUUtilization", namespace to "AWS/EC2", statistic to "Average", period to "120", and comparison_operator to "GreaterThanOrEqualToThreshold". If the health check doesn't have enough info about the alarm, ... | Has one "aws_cloudwatch_metric_alarm"" resources
with "alarm_name"
with "comparison_operator" set to "GreaterThanOrEqualToThreshold"
with "evaluation_periods"
with "namespace" set to "AWS/EC2"
with "period" set to "120"
with "statistic" set to "Average"
with "metric_name" set to "CPUUtilizat... | provider "aws" {
region = "us-east-1"
}
resource "aws_cloudwatch_metric_alarm" "foobar" {
alarm_name = "terraform-test-foobar5"
comparison_operator = "GreaterThanOrEqualToThreshold"
evaluation_periods = "2"
metric_name = "CPUUtilization"
namespace = "AWS/EC2"
period ... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_health_check = false
default is_valid_cloud_watch_alarm = false
# Validate aws_route53_health_check
is_valid_r53_health_check {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_cloudwatch_metric_alarm.foobar","mode":"managed","type":"aws_cloudwatch_metric_alarm","name":"foobar","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"actions_enabled":tr... |
60 | I need users to reach our service through our main domain in a way that automatically sends them to whichever location can respond the quickest, even as traffic conditions change. | Configure a routing policy that navigates users to the least congested endpoint of a route 53 zone using Route 53 resources. Call the zone "primary" and use "us-east-1" and "eu-central-1" regions | Has one "aws_route53_zone" resource
with "name"
Has two "aws_route53_record" resources
The first "aws_route53_record"
with "name"
with "type"
with "ttl"
with "records"
with "zone_id" referencing the "aws_route53_zone" resource
with "set_identifier"
with ... | provider "aws" {
region = "us-east-1"
}
resource "aws_route53_zone" "primary" {
name = "example53.com"
}
# Record for the EC2 instance in the US East region
resource "aws_route53_record" "us_east_record" {
zone_id = aws_route53_zone.primary.zone_id
name = "service.example53.com"
type = "A"
ttl ... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_zone = false
default is_valid_r53_record_na = false
default is_valid_r53_record_eu = false
# Validate aws_route53_zone resource
is_valid_r53_zone {
some i
resource := input.configuration.root_module.resources... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_record.eu_central_record","mode":"managed","type":"aws_route53_record","name":"eu_central_record","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":2,"values":{"alias":[],"cidr... |
61 | I want a simple way to control how people reach our service through our domain, with room to change the routing logic later without much effort. | route 53 traffic policy | Has one "aws_route53_traffic_policy" resource
with "name" | provider "aws" {
region = "us-east-1"
}
resource "aws_route53_traffic_policy" "example" {
name = "example"
comment = "example comment"
document = <<EOF
{
"AWSPolicyFormatVersion": "2015-10-01",
"RecordType": "A",
"Endpoints": {
"endpoint-start-NkPh": {
"Type": "value",
"Value": "10.... | package terraform.validation
default is_configuration_valid = false
default is_valid_r53_traffic_policy = false
# Validate aws_route53_zone resource
is_valid_r53_traffic_policy {
some i
resource := input.configuration.root_module.resources[i]
resource.type == "aws_route53_traffic_policy"
resourc... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_route53_traffic_policy.example","mode":"managed","type":"aws_route53_traffic_policy","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"comment":"example c... |
62 | I need an easy way to spin up and tear down a shared environment for running containerized workloads, making sure it has its own isolated network space and the right access rules, plus some automatic setup so my command‑line tools can talk to it while it exists. | Define a variable 'cluster_name' of type string. Create an AWS EKS cluster named based on the provided cluster name variable, associating it with an IAM role. Configure the EKS cluster with VPC subnet IDs for networking. Ensure that IAM role permissions are handled before and after EKS cluster management for proper res... | has one "aws_eks_cluster" resource
with one "name"
with one "role_arn"
with one "subnet_ids" in "vpc_config"
with multiple "depends_on" dependencies
with multiple "local-exec" provisioners
with a "command"
with a "when"
has one "aws_iam_role" resource
with one "name"
with one "assume_role_policy"
has one "aws_iam_r... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
variable "cluster_name" {
type = string
default = "test-cluster"
}
data "aws_region" "current" {}
resource "aws_vpc" "ma... | package terraform.validation
default has_aws_eks_cluster = false
default has_aws_iam_role = false
default has_aws_iam_role_policy_attachment_eks_cluster = false
default has_aws_iam_role_policy_attachment_eks_service = false
has_aws_eks_cluster {
some i
eks_cluster := input.configuration.root_module.resources[... | {"format_version":"1.2","terraform_version":"1.14.3","variables":{"cluster_name":{"value":"test-cluster"}},"planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.example","mode":"managed","type":"aws_eks_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":... |
63 | I need a place to run containerized apps in a managed, scalable way, with its own network space and the right access setup, and I want my local tools to be able to talk to it securely and reliably. | Set up an AWS provider for the specified region. Retrieve the current caller identity using 'aws_caller_identity'. Optionally, fetch the latest stable ECR image tagged as 'stable' from the specified repository. Define local variables including an image tag, AWS tags, and workspace name. Instantiate an EKS module with c... | has one "aws_caller_identity" data source named "current"
has one "aws_ecr_image"
with one "repository_name"
with one "image_tag"
has multiple local variables defining:
"image_tag"
"aws_tags"
"workspace_name"
has one module named "eks"
has one "aws_eks_cluster" data source named "aptos"
with one "name"
with a "dep... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
variable "cluster_name" {
type = string
default = "test-cluster"
}
data "aws_region" "current" {}
resource "aws_vpc" "ma... | package terraform.validation
default has_aws_eks_cluster = false
default has_aws_iam_role = false
default has_aws_iam_role_policy_attachment_eks_cluster = false
default has_aws_iam_role_policy_attachment_eks_service = false
has_aws_eks_cluster {
some i
eks_cluster := input.configuration.root_module.resources[... | {"format_version":"1.2","terraform_version":"1.14.3","variables":{"cluster_name":{"value":"test-cluster"}},"planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.example","mode":"managed","type":"aws_eks_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":... |
64 | I need to make sure some of our system-level services in the cluster can run in an isolated, pay‑as‑you‑go compute setup, and also apply a small configuration tweak to one of the built‑in components once that environment is ready, keeping everything tied cleanly into the network we already have. | Create an IAM role for EKS Fargate profiles with the necessary policies for pod execution. Attach the AmazonEKSFargatePodExecutionRolePolicy to the IAM role. Define an AWS EKS Fargate profile for the 'kube-system' namespace, associating it with the EKS cluster and specifying the pod execution role ARN. Ensure that the ... | Resource "aws_iam_role" "eks-fargate-profile"
has one "name"
has one "assume_role_policy"
Resource "aws_iam_role_policy_attachment" "eks-fargate-profile"
has one "policy_arn"
has one "role"
Resource "aws_eks_fargate_profile" "kube-system"
has one "cluster_name"
has one "fargate_profile_name"
has one "pod_execution_role... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
data "aws_availability_zones" "available" {
state = "available"
... | package terraform.validation
default has_aws_iam_role_fargate = false
default has_aws_iam_role_policy_attachment_fargate = false
default has_aws_eks_fargate_profile = false
default has_aws_eks_cluster_auth = false
default has_null_resource_k8s_patcher = false
has_aws_iam_role_fargate {
role := input.planned_value... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.cluster","mode":"managed","type":"aws_eks_cluster","name":"cluster","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"bootstrap_self_managed_addons":true,"enab... |
65 | I need to let a specific team or system interact with our container platform in a controlled way, making sure they get the right level of access without overcomplicating things. | Create a Terraform script for an AWS EKS access entry with name "example". Define a resource to grant access to an EKS cluster using the cluster's name and a principal's ARN. Include assigning specific Kubernetes groups and set the access type to 'STANDARD'. | has one "aws_eks_access_entry" resource
with one "cluster_name"
with one "principal_arn"
with one "kubernetes_groups"
with one "type" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "private-us-east-1a" {
vpc_id = aws_vp... | package terraform.validation
default has_aws_eks_access_entry_example = false
has_aws_eks_access_entry_example {
entry := input.planned_values.root_module.resources[_]
entry.type == "aws_eks_access_entry"
entry.name == "example"
entry.values.cluster_name == input.planned_values.root_module.resources[_... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_access_entry.example","mode":"managed","type":"aws_eks_access_entry","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"cluster_name":"test","kubernete... |
66 | I need to let a specific person see only a limited part of our app’s shared computing space, keeping their permissions tightly scoped to just one area. | Create a Terraform script to associate an access policy with name "example", with an AWS EKS cluster. Define a resource linking the cluster's name to a specific policy ARN and a principal's ARN. Include settings for an access scope limited to a specific namespace. | has one "aws_eks_access_policy_association" resource
with one "cluster_name"
with one "policy_arn"
with one "principal_arn"
with one "access_scope" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "private-us-east-1a" {
vpc_id = aws_vp... | package terraform.validation
default has_aws_eks_access_policy_association_example = false
has_aws_eks_access_policy_association_example {
policy_assoc := input.planned_values.root_module.resources[_]
policy_assoc.type == "aws_eks_access_policy_association"
policy_assoc.name == "example"
policy_assoc.... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_access_policy_association.example","mode":"managed","type":"aws_eks_access_policy_association","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"acces... |
67 | I need to extend our container-orchestration setup with one of the optional system components it supports so we get better networking behavior, and it should plug cleanly into the existing cluster without adding much complexity. | Generate a Terraform script to add an addon with name "example", to an AWS EKS cluster. Define a resource that specifies the cluster's name and sets the addon name to 'vpc-cni'. | has one "aws_eks_addon" resource
with one "cluster_name"
with one "addon_name" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "private-us-east-1a" {
vpc_id = aws_vp... | package terraform.validation
default has_aws_eks_addon_example = false
has_aws_eks_addon_example {
addon := input.planned_values.root_module.resources[_]
addon.type == "aws_eks_addon"
addon.name == "example"
addon.values.cluster_name == input.planned_values.root_module.resources[_].values.name # Ensu... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_addon.example","mode":"managed","type":"aws_eks_addon","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"addon_name":"vpc-cni","cluster_name":"test","... |
68 | I want to run certain lightweight workloads without having to manage any underlying machines, and have them launch only within a specific part of our environment for security and cost control. | Generate a Terraform script to create an AWS EKS Fargate profile. Define a resource that links to an EKS cluster (with name set to "example") by name, sets a Fargate profile name, and assigns a pod execution role ARN (tied to an IAM role with name "example"). Specify subnet IDs and include a selector for the namespace ... | has one "aws_eks_fargate_profile" resource
with one "cluster_name"
with one "fargate_profile_name"
with one "pod_execution_role_arn"
with one "subnet_ids"
with one "selector" containing "namespace" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "example1" {
vpc_id = aws_vpc.main.id
... | package terraform.validation
default has_aws_eks_fargate_profile_example = false
has_aws_eks_fargate_profile_example {
fargate_profile := input.configuration.root_module.resources[_]
fargate_profile.type == "aws_eks_fargate_profile"
fargate_profile.name == "example"
contains(fargate_profile.expression... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.example","mode":"managed","type":"aws_eks_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"bootstrap_self_managed_addons":true,"enab... |
69 | I need a secure way for certain automated workloads in our compute platform to run with just the permissions they need, without giving them broader access than necessary. | Create a Terraform script for an AWS IAM role designed for EKS Fargate profiles. Define a role with a specific name (with the name attribute set to "eks-fargate-profile-example") and an assume role policy that allows actions from 'eks-fargate-pods.amazonaws.com'. Also, attach a predefined Amazon EKS Fargate Pod Executi... | has one "aws_iam_role" resource
with one "name"
with one "assume_role_policy"
has one "aws_iam_role_policy_attachment" resource
with one "policy_arn"
with one "role" | provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "example" {
name = "eks-fargate-profile-example"
assume_role_policy = jsonencode({
Statement = [{
Action = "sts:AssumeRole"
Effect = "Allow"
Principal = {
Service = "eks-fargate-pods.amazonaws.com"
}
}]
V... | package terraform.validation
default has_aws_iam_role_example = false
default has_aws_iam_role_policy_attachment_example = false
has_aws_iam_role_example {
role := input.planned_values.root_module.resources[_]
role.type == "aws_iam_role"
role.values.name == "eks-fargate-profile-example"
# Ensure the a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.example","mode":"managed","type":"aws_iam_role","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\":[{\"Action\... |
70 | I need to let an external authentication system securely verify who can access my container platform, and I want this to plug into the cluster’s built‑in access controls without adding too much complexity. | Generate a Terraform script to configure an OIDC identity provider for an AWS EKS cluster (where the cluster has it's name attribute set to "example"). Define a resource that links to the cluster by name and sets up OIDC with specific parameters including client ID, identity provider config name, and issuer URL. | has one "aws_eks_identity_provider_config" resource
with one "cluster_name"
with one "oidc" block containing:
one "client_id"
one "identity_provider_config_name"
one "issuer_url" | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "example1" {
vpc_id = aws_vpc.main.id
... | package terraform.validation
default has_aws_eks_identity_provider_config_example = false
has_aws_eks_identity_provider_config_example {
identity_provider_config := input.planned_values.root_module.resources[_]
identity_provider_config.type == "aws_eks_identity_provider_config"
identity_provider_config.va... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.example","mode":"managed","type":"aws_eks_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"bootstrap_self_managed_addons":true,"enab... |
71 | I need to add a pool of machines that can join our container platform, scale up and down automatically, and have whatever access they need to pull images and handle networking, while keeping the setup simple and reliable. | Create a Terraform script for an AWS EKS node group (with name attribute set to "example") linked to a specific EKS cluster (with name attribute set to "example"). Define a resource with details including the node group name, node role ARN, and subnet IDs. Configure scaling parameters (desired size is 1, max size is 2,... | has one "aws_eks_node_group" resource
with one "cluster_name"
with one "node_group_name"
with one "node_role_arn"
with one "subnet_ids"
with one "scaling_config" containing:
one "desired_size"
one "max_size"
one "min_size"
with one "update_config" containing:
one "max_unavailable"
with dependencies on three IAM role po... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
data "aws_availability_zones" "available" {
state = "available"
... | package terraform.validation
default has_aws_eks_node_group_example = false
has_aws_eks_node_group_example {
node_group := input.planned_values.root_module.resources[_]
node_group.type == "aws_eks_node_group"
node_group.values.cluster_name == input.planned_values.root_module.resources[_].values.name
n... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.example","mode":"managed","type":"aws_eks_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"bootstrap_self_managed_addons":true,"enab... |
72 | I need certain workloads in our container platform to be able to pull data from our storage system, but only with tightly scoped permissions, and tied to a specific app identity so everything stays secure and easy to manage. | Create a Terraform script for an AWS EKS setup with pod identity management. Start by defining an IAM policy document (called "example") for assuming a role by EKS pods. Then, create an IAM role (called "example") using this policy. Attach a policy for S3 read-only access to this role. Finally, define an EKS pod identi... | has one "data" block for "aws_iam_policy_document" named "assume_role"
with one "statement" block containing:
one "effect"
one "principals" block with "type" and "identifiers"
one "actions" list
has one "aws_iam_role" resource named "example"
with one "name"
with one "assume_role_policy" referencing the data block
ha... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "example1" {
vpc_id = aws_vpc.main.id... | package terraform.validation
default has_aws_iam_policy_document_assume_role = false
default has_aws_iam_role_example = false
default has_aws_iam_role_policy_attachment_example_s3 = false
default has_aws_eks_pod_identity_association_example = false
has_aws_iam_policy_document_assume_role {
assume_role := input.co... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.example","mode":"managed","type":"aws_eks_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"bootstrap_self_managed_addons":true,"enab... |
73 | I need to spin up a managed container environment that can reach the rest of our cloud network, and it should be reachable from outside our private network while keeping the setup simple and secure. | Create a Terraform configuration to provision an AWS IAM role with attribute name set to "example" for an Amazon EKS cluster. The role's assume role policy should allow access for EKS services. Attach the AmazonEKSClusterPolicy to this role. Additionally, define an AWS EKS cluster with a name set to "example", with a s... | has one "aws_iam_role"
with one "name"
with one "assume_role_policy"
has one "aws_iam_role_policy_attachment"
with one "policy_arn"
with one "role" referencing the "aws_iam_role.eks.name"
has one "aws_eks_cluster"
with one "name"
with one "version"
with one "role_arn"
with one "vpc_config" containing "endpoint_priva... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "private-us-east-1a" {
vpc_id = aws_vp... | package terraform.analysis
default has_aws_iam_role = false
default has_aws_iam_role_policy_attachment = false
default has_aws_eks_cluster = false
has_aws_iam_role {
r := input.configuration.root_module.resources[_]
r.type == "aws_iam_role"
r.expressions.name.constant_value == "example"
r.expressions.... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.eks","mode":"managed","type":"aws_eks_cluster","name":"eks","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"bootstrap_self_managed_addons":true,"enabled_clus... |
74 | I need to spin up a managed environment for running containerized workloads, and it should plug into my network and be reachable from the outside while keeping the setup straightforward and secure. | Generate Terraform code to set up an AWS IAM role named 'eks-cluster' for an Amazon EKS cluster. Ensure the role's assume role policy allows access for EKS services and attach the AmazonEKSClusterPolicy to this role. Create an AWS EKS cluster with a name and version, attaching it to a subnet and VPC from us-east-1. Ens... | has one "aws_iam_role"
with one "name"
with one "assume_role_policy"
has one "aws_iam_role_policy_attachment"
with one "policy_arn"
with one "role" referencing the "aws_iam_role.eks.name"
has one "aws_eks_cluster"
with one "name"
with one "version"
with one "role_arn"
with one "vpc_config" containing "endpoint_priva... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
}
resource "aws_subnet" "private-us-east-1a" {
vpc_id = aws_vp... | package terraform.analysis
default has_aws_iam_role = false
default has_aws_iam_role_policy_attachment = false
default has_aws_eks_cluster = false
has_aws_iam_role {
role := input.configuration.root_module.resources[_]
role.type == "aws_iam_role"
role.expressions.assume_role_policy
}
has_aws_iam_role_pol... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_eks_cluster.cluster","mode":"managed","type":"aws_eks_cluster","name":"cluster","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"bootstrap_self_managed_addons":true,"enab... |
75 | I need a place to keep some files, but it has to block anyone coming from a certain network, and I want the access rules written down clearly so they’re easy to manage later. | Create an AWS S3 bucket named 'my_bucket' and define an S3 bucket policy to deny access from a specific IP address. Ensure that the S3 bucket policy includes a version number, an identifier, and a statement that denies all S3 actions for the specified IP address. Use the 'jsonencode' function to encode the policy in JS... | has one "aws_s3_bucket" resource
with one "bucket"
has one "aws_s3_bucket_policy"
with one "bucket"
with one "policy" | provider "aws" {
region = "us-west-1"
}
resource "aws_s3_bucket" "a" {
bucket = "test_bucket"
}
resource "aws_s3_bucket_policy" "b" {
bucket = aws_s3_bucket.a.id
policy = jsonencode({
"Version" : "2012-10-17",
"Id" : "my_policy",
"Statement" : [
{
"Sid" : "IPAllow",
... | package terraform.validation
default valid_configuration = false
default has_s3_bucket = false
default has_s3_bucket_policy = false
# Check for if any aws_s3_bucket with "bucket"
has_s3_bucket {
resource := input.configuration.root_module.resources[_]
resource.type == "aws_s3_bucket"
resource.expressions... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_s3_bucket.a","mode":"managed","type":"aws_s3_bucket","name":"a","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket":"test_bucket","force_destroy":false,"region":"us-... |
76 | I need a secure place to store some files where everything stays private by default, is encrypted automatically, and can’t accidentally be exposed to the public. | Create an AWS S3 bucket named 'test-bucket' with preventive destruction measures, private ACLs, AES256 server-side encryption, and a public access block restricting public access. | has one "aws_s3_bucket" resource
with one "bucket"
has one "aws_s3_bucket_acl"
with one "bucket"
with one "acl" or "access_control_policy"
has one "aws_s3_bucket_public_access_block"
with one "bucket"
has one "aws_s3_bucket_server_side_encryption_configuration"
with one "bucket"
with one "rul... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "backstage" {
bucket_prefix = "test-bucket-"
}
resource "aws_s3_bucket_ownership_controls" "exampl... | package terraform.validation
default valid_configuration = false
default has_s3_bucket = false
default has_aws_s3_bucket_acl = false
default has_aws_s3_bucket_public_access_block = false
default has_aws_s3_bucket_server_side_encryption_configuration = false
has_s3_bucket {
resource := input.configuration.root_mo... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_s3_bucket.backstage","mode":"managed","type":"aws_s3_bucket","name":"backstage","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket_prefix":"test-bucket-","force_dest... |
77 | I need a place to keep files where old versions are preserved automatically, and it should be locked down so only our own account is recognized as the owner. | Create a bucket "sample". Implement versioning resource for the AWS S3 bucket named 'sample' with the versioning status set to 'Enabled' and specify the expected_bucket_owner as '123456789012' to ensure ownership consistency. | has one aws_s3_bucket resource
with bucket
has one "aws_s3_bucket_versioning" resource
with bucket
with versionaning_configuration
with status | provider "aws" {
region = "us-west-1"
}
resource "aws_s3_bucket" "sample" {
bucket = "sample"
}
resource "aws_s3_bucket_versioning" "sample" {
bucket = "sample"
versioning_configuration {
status = "Enabled"
}
expected_bucket_owner = "123456789012"
} | package terraform.validation
default has_s3_bucket_versioning = false
default has_s3_bucket = false
default valid_configuration = false
has_s3_bucket {
resource := input.configuration.root_module.resources[_]
resource.type == "aws_s3_bucket"
resource.name == "sample"
}
has_s3_bucket_versioning {
ve... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_s3_bucket.sample","mode":"managed","type":"aws_s3_bucket","name":"sample","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket":"sample","force_destroy":false,"region"... |
78 | I need a reliable place to keep my infrastructure setup files so changes don’t get lost, plus some way to prevent multiple people from editing them at the same time, and it all needs to be protected against accidental removal and kept private. | Set up an AWS S3 bucket and DynamoDB table for Terraform state management. Ensure the S3 bucket has preventive measures against accidental deletion and is configured with versioning enabled, server-side encryption using AES256, and public access restrictions. Create a DynamoDB table with a hash key named 'LockID' using... | has one aws_s3_bucket_versioning resource
with bucket
with status
has one aws_dynamodb_table resource
with name
with hash_key
has one aws_s3_bucket_lifecycle_configuration resource
with bucket
with rule
with id
with status
with action
with transition
with days
with storage_class
... | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_s3_bucket" "terraform_state" {
bucket = "iac-misc-terraform-state"
}
resource "aws_s3_bucket_versioning" "en... | package terraform.validation
default has_s3_bucket_versioning = false
default has_dynamodb_table = false
default has_s3_bucket_server_side_encryption_configuration = false
default has_s3_bucket_public_access_block = false
default valid_configuration = false
# Check for aws_s3_bucket_versioning resource with 'bucket'... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_dynamodb_table.terraform_locks","mode":"managed","type":"aws_dynamodb_table","name":"terraform_locks","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":1,"values":{"attribute":[{"name"... |
79 | I need a place to store files where the people downloading them, not us, should cover the access costs, and it should be simple to manage. | create a bucket 'pike-680235478471'. Set up request payment configuration for an AWS S3 bucket named 'pike-680235478471', specifying the payer as 'Requester'. | has one aws_s3_bucket resource
with bucket
has one aws_s3_bucket_request_payment_configuration resource
with bucket
with payer (BucketOwner or Requester) | provider "aws" {
region = "us-west-1"
}
resource "aws_s3_bucket" "a" {
bucket = "pike-680235478471"
}
resource "aws_s3_bucket_request_payment_configuration" "pike" {
bucket = "pike-680235478471"
payer = "Requester"
} | package terraform.validation
default has_s3_bucket = false
default has_s3_bucket_request_payment_configuration = false
default valid_configuration = false
has_s3_bucket {
some i
bucket := input.planned_values.root_module.resources[i]
bucket.type == "aws_s3_bucket"
bucket.values.bucket == "pike-68023... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_s3_bucket.a","mode":"managed","type":"aws_s3_bucket","name":"a","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket":"pike-680235478471","force_destroy":false,"region... |
80 | I need to make sure that a place where we keep files isn’t accidentally exposed to the outside world, and it should default to being as locked down as possible. | Implement public access block settings for an AWS S3 bucket named 'pike-680235478471' to block public ACLs, public policies, and restrict public buckets. | has one aws_s3_bucket resource
with bucket
has one aws_s3_bucket_public_access_block resource
with bucket
with block_public_acls (boolean)
with block_public_policy (boolean)
with ignore_public_acls (boolean)
with restrict_public_buckets (boolean) | provider "aws" {
region = "us-west-1"
}
resource "aws_s3_bucket" "a" {
bucket = "pike-680235478471"
}
resource "aws_s3_bucket_public_access_block" "example" {
bucket = "pike-680235478471"
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buck... | package terraform.validation
default has_s3_bucket = false
default has_s3_bucket_public_access_block = false
default valid_configuration = false
has_s3_bucket {
resource := input.planned_values.root_module.resources[_]
resource.type == "aws_s3_bucket"
resource.values.bucket == "pike-680235478471"
}
has... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_s3_bucket.a","mode":"managed","type":"aws_s3_bucket","name":"a","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"bucket":"pike-680235478471","force_destroy":false,"region... |
81 | I need to place a new file into our cloud storage in a way that keeps things simple and lets me control where it goes. | Craft a Terraform configuration for creating an AWS S3 bucket object. Define an S3 bucket object (with value "object") with specific attributes including the bucket name (with value "your_bucket_name"), object key (with value "new_object_key"), and the path to the source file (with value "path/to/file"). | Resource "aws_s3_bucket_object"
has one "bucket"
has one "key"
has one "source"
has one "etag" | provider "aws" {
region = "us-west-1"
}
resource "aws_s3_bucket_object" "object" {
bucket = "your_bucket_name"
key = "new_object_key"
source = "path/to/file"
} | package terraform.validation
default has_aws_s3_bucket_object = false
has_aws_s3_bucket_object {
object := input.planned_values.root_module.resources[_]
object.type == "aws_s3_bucket_object"
object.name == "object"
object.values.bucket == "your_bucket_name"
object.values.key == "new_object_key"
... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_s3_bucket_object.object","mode":"managed","type":"aws_s3_bucket_object","name":"object","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"acl":"private","bucket":"your_buc... |
82 | I need a way to automatically pick the newest stable system image for our servers so we’re always starting from an up‑to‑date base without having to track it manually. | Create an AWS aws_ami resource for the latest Amazon Linux 2 AMI | create aws_ami resource with name = any | provider "aws" {
region = "us-east-1"
}
data "aws_ami" "latest_amazon_linux_2" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["amzn2-ami-hvm-*-x86_64-gp2"]
}
} | package terraform
default ami_latest_amazon_linux_2 = false
ami_latest_amazon_linux_2 {
resource := input.configuration.root_module.resources[_]
resource.type == "aws_ami"
resource.name == "latest_amazon_linux_2"
resource.expressions.filter[_].name.constant_value == "name"
resource.expressions.fil... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{}},"prior_state":{"format_version":"1.0","terraform_version":"1.14.3","values":{"root_module":{"resources":[{"address":"data.aws_ami.latest_amazon_linux_2","mode":"data","type":"aws_ami","name":"latest_amazon_linux_2","provider_name":... |
83 | I need a way to automatically pull in the newest version of our base system image so our servers always start from an up‑to‑date foundation. | Create an AWS aws_ami for the latest Amazon Linux 2 AMI | create aws_ami resource with name = any | provider "aws" {
region = "us-east-1"
}
data "aws_ami" "latest_amazon_linux_2" {
most_recent = true
owners = ["amazon"]
filter {
name = "name"
values = ["amzn2-ami-hvm-*-x86_64-gp2"]
}
} | package terraform
default ami_latest_amazon_linux_2 = false
ami_latest_amazon_linux_2 {
resource := input.configuration.root_module.resources[_]
resource.type == "aws_ami"
resource.name == "latest_amazon_linux_2"
resource.expressions.filter[_].name.constant_value == "name"
resource.expressions.fil... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{}},"prior_state":{"format_version":"1.0","terraform_version":"1.14.3","values":{"root_module":{"resources":[{"address":"data.aws_ami.latest_amazon_linux_2","mode":"data","type":"aws_ami","name":"latest_amazon_linux_2","provider_name":... |
84 | I need a super-fast, in-memory place to stash frequently used data so my app can handle bursts of traffic without slowing down. | Provide a Memcached Cluster | requires cluster id, engine=memcached, node_type, num_cache_nodes, parameter_group_name | provider "aws" {
region="us-east-1"
}
resource "aws_elasticache_cluster" "example" {
cluster_id = "cluster-example"
engine = "memcached"
node_type = "cache.m4.large"
num_cache_nodes = 2
parameter_group_name = "default.memcached1.4"
port = 11211
} | package main
import future.keywords.in
default allow = false
aws_elasticache_cluster_valid(resources) {
some resource in resources
resource.type == "aws_elasticache_cluster"
resource.change.after.engine == "memcached"
}
# Aggregate all checks
allow {
aws_elasticache_cluster_valid(input.resource_chan... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticache_cluster.example","mode":"managed","type":"aws_elasticache_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"auto_minor_version_upgrad... |
85 | I need a super fast place to temporarily store frequently used data so my app can respond quickly, but I want to keep the setup pretty simple. | Provide a Redis Instance | requires cluster id, engine=redis, node_type, num_cache_nodes, parameter_group_name | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_elasticache_cluster" "example" {
cluster_id = "cluster-example"
engine = "redis"
node_type = "cache.m4.la... | package main
import future.keywords.in
default allow = false
aws_elasticache_cluster_valid(resources) {
some resource in resources
resource.type == "aws_elasticache_cluster"
resource.change.after.engine == "redis"
}
# Aggregate all checks
allow {
aws_elasticache_cluster_valid(input.resource_changes)... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticache_cluster.example","mode":"managed","type":"aws_elasticache_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"auto_minor_version_upgrad... |
86 | I need a way for certain parts of our system to interact with our fast in‑memory data layer, but only with tightly limited permissions for security. | Provide an ElastiCache user resource with redis | requires access string, engine = REDIS, user id and user name | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_elasticache_user" "test" {
user_id = "testUserId"
user_name = "testUserName"
access_string = "on ~app::* -@all +@read +@hash +@bit... | package main
import future.keywords.in
default allow = false
aws_elasticache_user_valid(resources) {
some resource in resources
resource.type == "aws_elasticache_user"
resource.change.after.engine == "REDIS"
}
# Aggregate all checks
allow {
aws_elasticache_user_valid(input.resource_changes)
} | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticache_user.test","mode":"managed","type":"aws_elasticache_user","name":"test","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_string":"on ~app::* -@all +@re... |
87 | I need to set up a way for a specific person or system to safely interact with our fast in‑memory data layer, using our existing identity setup to control what they can do. | Provide an ElastiCache user resource with iam | requires access string, engine = REDIS, user id and user name, authentication_mode {type = "iam"} | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_elasticache_user" "test" {
user_id = "testUserId"
user_name = "testUserName"
access_string = "on ~* +@all"
engine = "REDI... | package main
import future.keywords.in
default allow = false
aws_elasticache_user_valid(resources) {
some resource in resources
resource.type == "aws_elasticache_user"
resource.change.after.authentication_mode[_].type == "iam"
}
# Aggregate all checks
allow {
aws_elasticache_user_valid(input.resourc... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticache_user.test","mode":"managed","type":"aws_elasticache_user","name":"test","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_string":"on ~* +@all","authent... |
88 | I need a way to control who can interact with our in‑memory data layer, using a setup that requires people to log in securely. | Provide an ElastiCache user resource with password. | requires access string, engine = REDIS, user id and user name, authentication_mode {type= "password", passwords = ["password1", "password2"]} | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_elasticache_user" "test" {
user_id = "testUserId"
user_name = "testUserName"
access_string = "on ~* +@all"
engine = "REDI... | package main
import future.keywords.in
default allow = false
aws_elasticache_user_valid(resources) {
some resource in resources
resource.type == "aws_elasticache_user"
resource.change.after.authentication_mode[_].type == "password"
}
# Aggregate all checks
allow {
aws_elasticache_user_valid(input.re... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticache_user.test","mode":"managed","type":"aws_elasticache_user","name":"test","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_string":"on ~* +@all","authent... |
89 | I need a way to manage who can do what in our shared in‑memory data service so we can keep things secure without making access too complicated. | Provide an ElastiCache user group resource. | creates elasticache user resources(requires access string, engine = REDIS, user id and user name) and sets engine , creates group resource using the user ids | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_elasticache_user" "test" {
user_id = "testUserId"
user_name = "default"
access_string = "on ~app::* -@all +@read +@hash +@bitmap +... | package main
import future.keywords.in
default allow = false
aws_elasticache_user_group_valid(resources) {
some resource in resources
resource.type == "aws_elasticache_user_group"
}
# Aggregate all checks
allow {
aws_elasticache_user_group_valid(input.resource_changes)
} | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticache_user.test","mode":"managed","type":"aws_elasticache_user","name":"test","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_string":"on ~app::* -@all +@re... |
90 | I need to make sure one of our app’s user accounts is included in the right collection of permissions so it can access shared data safely without over‑privilege. | Associate an existing ElastiCache user and an existing user group. | creates elasticache user group and a user resource then associates the 2 using ids | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_elasticache_user" "default" {
user_id = "defaultUserID"
user_name = "default"
access_string = "on ~app::* -@all +@read +@hash +@bitmap +@... | package main
import future.keywords.in
default allow = false
# Check if AWS ElastiCache user group exists
aws_elasticache_user_group_exists(resources) {
some resource in resources
resource.type == "aws_elasticache_user_group"
resource.change.actions[_] == "create"
}
# Check if AWS ElastiCache user exist... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_elasticache_user.default","mode":"managed","type":"aws_elasticache_user","name":"default","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"access_string":"on ~app::* -@al... |
91 | I need a place to run analytics on our data without setting up a bunch of machines, and it should stay simple for now. | Create a RedShift cluster resource with a single node | Has an aws_redshift_cluster resource and check cluster_type is "single_node" or number of nodes is 1 | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_redshift_cluster" "example" {
cluster_identifier = "tf-redshift-cluster"
database_name = "mydb"
master_username = "exampleuser"
ma... | package main
import future.keywords.in
default allow = false
aws_redshift_cluster_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.number_of_nodes == 1
}
# Aggregate all checks
allow {
aws_redshift_cluster_valid(input.resource_changes)
}
| {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_redshift_cluster.example","mode":"managed","type":"aws_redshift_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"allow_version_upgrade":true,"ap... |
92 | I need a data warehouse that can handle spikes in demand but only for a short, controlled period so costs don’t get out of hand. | Create a 2 node RedShift cluster and limit the concurrency scaling to 60 minutes | Has an aws_redshift_cluster resource and check cluster_type is "single_node" or number of nodes is 2, check there is a aws_redshift_usage_limit resouce where the feature type is concurrency_scaling, limit_type is "time", and amount is 60 | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_redshift_cluster" "example" {
cluster_identifier = "redshift-cluster-1"
node_type = "dc2.large"
number_of_nodes = 2
database_... | package main
import future.keywords.in
default allow = false
aws_redshift_cluster_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.number_of_nodes == 2
}
aws_redshift_usage_limit_valid(resources) {
some resource in resources
resource.typ... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_redshift_cluster.example","mode":"managed","type":"aws_redshift_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"allow_version_upgrade":true,"ap... |
93 | I need a shared analytics workspace that can handle heavier queries, and I also need to let a specific outside account connect to it securely. | Create a 2 node RedShift cluster and create a new Amazon Redshift endpoint authorization for an account with AWS id 012345678910 | Has an aws_redshift_resouce with 2 nodes and creates a aws_redshift_endpoint_authorization resource with account =012345678910 | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_redshift_cluster" "example" {
cluster_identifier = "redshift-cluster-1"
node_type = "dc2.large"
number_of_nodes = 2
database_... | package main
import future.keywords.in
default allow = false
aws_redshift_cluster_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.number_of_nodes == 2
}
# Function to check if Redshift snapshot schedule is every 12 hours
aws_redshift_endpoint_a... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_redshift_cluster.example","mode":"managed","type":"aws_redshift_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"allow_version_upgrade":true,"ap... |
94 | I need a small analytical data system set up for internal use, and it should save its state on a regular schedule so we can recover quickly if something goes wrong. | Create a 1 node RedShift cluster and automatically create a snapshot every 12 hours | Has an aws_redshift resouce with 1 node and aws_redshift_snapshot_schedule resource with rate set to 12 hours. Then have a aws_redshift_snapshot_schedle_association to conect the 2 | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_redshift_cluster" "example" {
cluster_identifier = "redshift-cluster-1"
node_type = "dc2.large"
number_of_nodes = 1
database_... | package main
import future.keywords.in
default allow = false
aws_redshift_cluster_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.number_of_nodes == 1
}
# Function to check if Redshift snapshot schedule is every 12 hours
aws_redshift_snapshot_s... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_redshift_cluster.example","mode":"managed","type":"aws_redshift_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"allow_version_upgrade":true,"ap... |
95 | I need a private network for some data tools we’re setting up, and it should work across a couple of separate locations so it stays reliable even if part of the system has issues. | Create a VPC in us-east-1 and create subnets in east-1a and east-1b. Create a RedShift subnet group with a subnet in east-1a and east-1b | Create a VPC, create 2 subnets (1 in east1a and 1 in east1b) then create a redshift_subnet_group | provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "main" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames = true
tags = {
Name = "main-vpc"
}
}
resource "aws_subnet" "subnet_east_1a" {
vpc_id = aws_vpc.main.id
cidr_block = "10.0.1.0/24"
availability_zon... | package main
import future.keywords.in
default allow = false
# Function to check if a VPC is created in us-east-1
aws_vpc_valid(resources) {
some resource in resources
resource.type == "aws_vpc"
resource.change.after.cidr_block == "10.0.0.0/16"
}
# Function to check if subnets are created in east-1a and... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_redshift_subnet_group.redshift_subnet_group","mode":"managed","type":"aws_redshift_subnet_group","name":"redshift_subnet_group","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"val... |
96 | I need a data warehouse setup that can keep running smoothly even if part of the underlying infrastructure has an outage. | Set up a highly available Amazon Redshift cluster across multiple us-east-1a and us-east-1b | Create a VPC, create internet_gateway,create 2 subnets (1 in east1a and 1 in east1b) then create a redshift_subnet_group | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "example_vpc" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames =... | package main
import future.keywords.in
default allow = false
# Function to check if Redshift cluster is set up for high availability
aws_redshift_cluster_ha_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.cluster_type == "multi-node"
resourc... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_internet_gateway.gw","mode":"managed","type":"aws_internet_gateway","name":"gw","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"region":"us-east-1","tags":null,"timeouts... |
97 | I need a data warehouse that can pull information from our storage system automatically, and it should have the right access setup so it can read what it needs without exposing anything else. | Create an IAM role and a redshift cluster and associate the IAM role with the RedShift cluster. | Create a aws_iam_role, aws_redshift_cluster, and attach the role to the cluster | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_iam_role" "redshift_role" {
name = "redshift_role"
assume_role_policy = jsonencode({
Version = "2012-10-17",
Statement = [
{
... | package main
import future.keywords.in
default allow = false
aws_redshift_cluster_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.number_of_nodes == 1
}
iam_role_vaild(resources) {
some resource in resources
resource.type == "aws_iam_ro... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_iam_role.redshift_role","mode":"managed","type":"aws_iam_role","name":"redshift_role","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"assume_role_policy":"{\"Statement\"... |
98 | I need a shared analytics workspace that can handle moderate workloads across multiple machines, and it should allow certain external systems to plug into it securely. | Create a 2-node RedShift cluster and attach a resource policy to it. | Create a redshift cluster and a aws_reedshift_resource_poliicy attached to it | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.0"
}
}
}
provider "aws" {
region = "us-east-1"
}
resource "aws_redshift_cluster" "example" {
cluster_identifier = "redshift-cluster-1"
node_type = "dc2.large"
cluster_type = "multi-node"
... | package main
import future.keywords.in
default allow = false
aws_redshift_cluster_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.number_of_nodes == 2
}
aws_redshift_resource_policy_valid(resources) {
some resource in resources
resource... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_redshift_cluster.example","mode":"managed","type":"aws_redshift_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"allow_version_upgrade":true,"ap... |
99 | I need a data warehouse that can handle bigger analytical workloads, and it should be reachable from inside our private network so our other systems can work with it securely. | Create a RedShift cluster with 2 nodes and create an endpoint access for it | Create a cluster and a endpoint associated with it | terraform {
required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 5.75"
}
}
required_version = ">= 1.9.0"
}
provider "aws" {
region = "us-east-1"
}
resource "aws_vpc" "example_vpc" {
cidr_block = "10.0.0.0/16"
enable_dns_support = true
enable_dns_hostnames =... | package main
import future.keywords.in
default allow = false
# Check if AWS Redshift cluster with 2 nodes is being created
aws_redshift_cluster_valid(resources) {
some resource in resources
resource.type == "aws_redshift_cluster"
resource.change.after.number_of_nodes == 2
}
# Check if AWS Redshift endpo... | {"format_version":"1.2","terraform_version":"1.14.3","planned_values":{"root_module":{"resources":[{"address":"aws_redshift_cluster.example","mode":"managed","type":"aws_redshift_cluster","name":"example","provider_name":"registry.terraform.io/hashicorp/aws","schema_version":0,"values":{"allow_version_upgrade":true,"ap... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.