diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-001/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-001/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f775f0d6230c370c6f784d484eca55229a6be98d --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-001/main.yaml @@ -0,0 +1,70 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Production-ready CloudFormation template to create a public S3 bucket for static assets.' + +Resources: + StaticAssetsBucket: + Type: AWS::S3::Bucket + Properties: + # Explicitly disable Block Public Access to allow public read policies + PublicAccessBlockConfiguration: + BlockPublicAcls: false + BlockPublicPolicy: false + IgnorePublicAcls: false + RestrictPublicBuckets: false + # Disable ACLs (AWS Best Practice) and rely entirely on Bucket Policies + OwnershipControls: + Rules: + - ObjectOwnership: BucketOwnerEnforced + # Enable static website hosting (optional but common for static assets) + WebsiteConfiguration: + IndexDocument: index.html + ErrorDocument: error.html + # Enable CORS for web applications to fetch assets + CorsConfiguration: + CorsRules: + - AllowedHeaders: + - '*' + AllowedMethods: + - GET + - HEAD + AllowedOrigins: + - '*' + MaxAge: 3600 + + StaticAssetsBucketPolicy: + Type: AWS::S3::BucketPolicy + Properties: + Bucket: !Ref StaticAssetsBucket + PolicyDocument: + Version: '2012-10-17' + Statement: + - Sid: PublicReadGetObject + Effect: Allow + Principal: '*' + Action: s3:GetObject + Resource: !Sub '${StaticAssetsBucket.Arn}/*' + +Outputs: + BucketName: + Description: Name of the static assets bucket + Value: !Ref StaticAssetsBucket + Export: + Name: !Sub '${AWS::StackName}-BucketName' + + BucketArn: + Description: ARN of the static assets bucket + Value: !GetAtt StaticAssetsBucket.Arn + Export: + Name: !Sub '${AWS::StackName}-BucketArn' + + BucketDomainName: + Description: Domain name of the static assets bucket + Value: !GetAtt StaticAssetsBucket.DomainName + Export: + Name: !Sub '${AWS::StackName}-BucketDomainName' + + BucketWebsiteURL: + Description: Website URL of the static assets bucket + Value: !GetAtt StaticAssetsBucket.WebsiteURL + Export: + Name: !Sub '${AWS::StackName}-BucketWebsiteURL' \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-002/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-002/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f8c0dc4f816359573e8d51ea85957780502054e8 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-002/main.yaml @@ -0,0 +1,56 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Provision an EC2 instance with a security group open on ports 22 and 80' + +Parameters: + InstanceType: + Description: EC2 instance type + Type: String + Default: t3.micro + AllowedValues: + - t2.micro + - t3.micro + - t3.small + - m5.large + LatestAmiId: + Description: SSM Parameter to get the latest Amazon Linux 2023 AMI ID + Type: 'AWS::SSM::Parameter::Value' + Default: '/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64' + +Resources: + InstanceSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Allow SSH and HTTP inbound traffic + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 22 + ToPort: 22 + CidrIp: 0.0.0.0/0 + Description: Allow SSH + - IpProtocol: tcp + FromPort: 80 + ToPort: 80 + CidrIp: 0.0.0.0/0 + Description: Allow HTTP + + WebInstance: + Type: AWS::EC2::Instance + Properties: + InstanceType: !Ref InstanceType + ImageId: !Ref LatestAmiId + SecurityGroupIds: + - !GetAtt InstanceSecurityGroup.GroupId + Tags: + - Key: Name + Value: WebServerInstance + +Outputs: + InstanceId: + Description: The Instance ID of the provisioned EC2 instance + Value: !Ref WebInstance + PublicIp: + Description: Public IP address of the provisioned EC2 instance + Value: !GetAtt WebInstance.PublicIp + PublicDnsName: + Description: Public DNS Name of the provisioned EC2 instance + Value: !GetAtt WebInstance.PublicDnsName \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-003/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-003/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..30364c2772332086853645576525ee319491923d --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-003/main.yaml @@ -0,0 +1,99 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Deploy an RDS MySQL database with no encryption at rest.' + +Parameters: + DBName: + Type: String + Description: Name of the MySQL database + Default: mydatabase + AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*' + DBUser: + Type: String + Description: Master username for the database + Default: admin + AllowedPattern: '[a-zA-Z][a-zA-Z0-9]*' + DBPassword: + Type: String + Description: Master password for the database + NoEcho: true + MinLength: 8 + DBInstanceClass: + Type: String + Description: The database instance type + Default: db.t3.micro + AllowedValues: + - db.t3.micro + - db.t3.small + - db.t3.medium + - db.m5.large + - db.m5.xlarge + AllocatedStorage: + Type: Number + Description: The size of the database (Gb) + Default: 20 + MinValue: 20 + MaxValue: 1000 + VpcId: + Type: AWS::EC2::VPC::Id + Description: VPC ID where the database will be deployed + SubnetIds: + Type: List + Description: List of Subnet IDs for the DB Subnet Group (must be in at least 2 AZs) + +Resources: + DBSubnetGroup: + Type: AWS::RDS::DBSubnetGroup + Properties: + DBSubnetGroupDescription: Subnet group for MySQL RDS instance + SubnetIds: !Ref SubnetIds + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-subnet-group + + DBSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Allow MySQL inbound traffic + VpcId: !Ref VpcId + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 3306 + ToPort: 3306 + CidrIp: 10.0.0.0/8 + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-sg + + MySQLDBInstance: + Type: AWS::RDS::DBInstance + DeletionPolicy: Snapshot + UpdateReplacePolicy: Snapshot + Properties: + Engine: mysql + EngineVersion: '8.0' + DBInstanceClass: !Ref DBInstanceClass + AllocatedStorage: !Ref AllocatedStorage + StorageType: gp3 + DBName: !Ref DBName + MasterUsername: !Ref DBUser + MasterUserPassword: !Ref DBPassword + DBSubnetGroupName: !Ref DBSubnetGroup + VPCSecurityGroups: + - !Ref DBSecurityGroup + StorageEncrypted: false + PubliclyAccessible: false + MultiAZ: false + AutoMinorVersionUpgrade: true + BackupRetentionPeriod: 7 + CopyTagsToSnapshot: true + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-mysql-db + +Outputs: + DBEndpointAddress: + Description: The connection endpoint for the MySQL database + Value: !GetAtt MySQLDBInstance.Endpoint.Address + DBEndpointPort: + Description: The port for the MySQL database + Value: !GetAtt MySQLDBInstance.Endpoint.Port \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-004/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-004/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0a72069ec1bf697e410dbfc63ac0f620931fe662 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-004/main.yaml @@ -0,0 +1,114 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Production-ready VPC with two public subnets across two Availability Zones.' + +Parameters: + VpcCidr: + Type: String + Default: 10.0.0.0/16 + Description: CIDR block for the VPC + AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ + + PublicSubnet1Cidr: + Type: String + Default: 10.0.1.0/24 + Description: CIDR block for Public Subnet 1 + AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ + + PublicSubnet2Cidr: + Type: String + Default: 10.0.2.0/24 + Description: CIDR block for Public Subnet 2 + AllowedPattern: ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])(\/(1[6-9]|2[0-8]))$ + +Resources: + VPC: + Type: AWS::EC2::VPC + Properties: + CidrBlock: !Ref VpcCidr + EnableDnsSupport: true + EnableDnsHostnames: true + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-vpc + + InternetGateway: + Type: AWS::EC2::InternetGateway + Properties: + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-igw + + VPCGatewayAttachment: + Type: AWS::EC2::VPCGatewayAttachment + Properties: + VpcId: !Ref VPC + InternetGatewayId: !Ref InternetGateway + + PublicSubnet1: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref PublicSubnet1Cidr + AvailabilityZone: !Select [ 0, !GetAZs '' ] + MapPublicIpOnLaunch: true + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-public-subnet-1 + + PublicSubnet2: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref PublicSubnet2Cidr + AvailabilityZone: !Select [ 1, !GetAZs '' ] + MapPublicIpOnLaunch: true + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-public-subnet-2 + + PublicRouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: !Sub ${AWS::StackName}-public-rt + + PublicRoute: + Type: AWS::EC2::Route + DependsOn: VPCGatewayAttachment + Properties: + RouteTableId: !Ref PublicRouteTable + DestinationCidrBlock: 0.0.0.0/0 + GatewayId: !Ref InternetGateway + + PublicSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + SubnetId: !Ref PublicSubnet1 + RouteTableId: !Ref PublicRouteTable + + PublicSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + SubnetId: !Ref PublicSubnet2 + RouteTableId: !Ref PublicRouteTable + +Outputs: + VpcId: + Description: The ID of the VPC + Value: !Ref VPC + Export: + Name: !Sub ${AWS::StackName}-VpcId + + PublicSubnet1Id: + Description: The ID of Public Subnet 1 + Value: !Ref PublicSubnet1 + Export: + Name: !Sub ${AWS::StackName}-PublicSubnet1Id + + PublicSubnet2Id: + Description: The ID of Public Subnet 2 + Value: !Ref PublicSubnet2 + Export: + Name: !Sub ${AWS::StackName}-PublicSubnet2Id \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-005/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-005/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f30847999fa11e60b717910cc12f1addbcf7bfa9 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-005/main.yaml @@ -0,0 +1,15 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Deploy an IAM User with an inline policy granting full access' + +Resources: + FullAccessUser: + Type: AWS::IAM::User + Properties: + Policies: + - PolicyName: FullAccessInlinePolicy + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Action: '*' + Resource: '*' \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-006/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-006/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..7cab54d540eb9b994911256b05959a68493d52cb --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-006/main.yaml @@ -0,0 +1,76 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'AWS CloudFormation Template: CloudFront distribution with no WAF attached' + +Resources: + OriginBucket: + Type: AWS::S3::Bucket + Properties: + PublicAccessBlockConfiguration: + BlockPublicAcls: true + BlockPublicPolicy: true + IgnorePublicAcls: true + RestrictPublicBuckets: true + BucketEncryption: + ServerSideEncryptionConfiguration: + - ServerSideEncryptionByDefault: + SSEAlgorithm: AES256 + + CloudFrontOriginAccessIdentity: + Type: AWS::CloudFront::CloudFrontOriginAccessIdentity + Properties: + CloudFrontOriginAccessIdentityConfig: + Comment: !Sub 'OAI for ${AWS::StackName}' + + BucketPolicy: + Type: AWS::S3::BucketPolicy + Properties: + Bucket: !Ref OriginBucket + PolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Principal: + CanonicalUser: !GetAtt CloudFrontOriginAccessIdentity.S3CanonicalUserId + Action: 's3:GetObject' + Resource: !Sub '${OriginBucket.Arn}/*' + + CloudFrontDistribution: + Type: AWS::CloudFront::Distribution + Properties: + DistributionConfig: + Enabled: true + DefaultRootObject: index.html + HttpVersion: http2 + IPV6Enabled: true + Origins: + - Id: S3-Origin + DomainName: !GetAtt OriginBucket.RegionalDomainName + S3OriginConfig: + OriginAccessIdentity: !Sub 'origin-access-identity/cloudfront/${CloudFrontOriginAccessIdentity}' + DefaultCacheBehavior: + TargetOriginId: S3-Origin + ViewerProtocolPolicy: redirect-to-https + AllowedMethods: + - GET + - HEAD + - OPTIONS + CachedMethods: + - GET + - HEAD + ForwardedValues: + QueryString: false + Cookies: + Forward: none + MinTTL: 0 + DefaultTTL: 3600 + MaxTTL: 86400 + ViewerCertificate: + CloudFrontDefaultCertificate: true + +Outputs: + DistributionId: + Description: The ID of the CloudFront Distribution + Value: !Ref CloudFrontDistribution + DistributionDomainName: + Description: The domain name of the CloudFront Distribution + Value: !GetAtt CloudFrontDistribution.DomainName \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-007/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-007/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..5cba9c56b26080f2f8f88cf8b001e80ae2c77e27 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-007/main.yaml @@ -0,0 +1,180 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Creates an ElastiCache Redis cluster exposed to the internet via an EC2 HAProxy instance.' + +Parameters: + CacheNodeType: + Type: String + Default: cache.t3.micro + Description: The compute and memory capacity of the nodes in the node group. + ProxyInstanceType: + Type: String + Default: t3.micro + Description: The EC2 instance type for the HAProxy public endpoint. + +Resources: + VPC: + Type: AWS::EC2::VPC + Properties: + CidrBlock: 10.0.0.0/16 + EnableDnsSupport: true + EnableDnsHostnames: true + Tags: + - Key: Name + Value: Redis-Public-VPC + + InternetGateway: + Type: AWS::EC2::InternetGateway + + VPCGatewayAttachment: + Type: AWS::EC2::VPCGatewayAttachment + Properties: + VpcId: !Ref VPC + InternetGatewayId: !Ref InternetGateway + + PublicSubnet1: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: 10.0.1.0/24 + AvailabilityZone: !Select [ 0, !GetAZs '' ] + MapPublicIpOnLaunch: true + Tags: + - Key: Name + Value: Redis-Public-Subnet-1 + + PublicSubnet2: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: 10.0.2.0/24 + AvailabilityZone: !Select [ 1, !GetAZs '' ] + MapPublicIpOnLaunch: true + Tags: + - Key: Name + Value: Redis-Public-Subnet-2 + + PublicRouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + + PublicRoute: + Type: AWS::EC2::Route + DependsOn: VPCGatewayAttachment + Properties: + RouteTableId: !Ref PublicRouteTable + DestinationCidrBlock: 0.0.0.0/0 + GatewayId: !Ref InternetGateway + + PublicSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + SubnetId: !Ref PublicSubnet1 + RouteTableId: !Ref PublicRouteTable + + PublicSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + SubnetId: !Ref PublicSubnet2 + RouteTableId: !Ref PublicRouteTable + + ProxySecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Allow public access to Redis port via Proxy + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 6379 + ToPort: 6379 + CidrIp: 0.0.0.0/0 + - IpProtocol: tcp + FromPort: 22 + ToPort: 22 + CidrIp: 0.0.0.0/0 + + RedisSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Allow access from Proxy to ElastiCache + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 6379 + ToPort: 6379 + SourceSecurityGroupId: !Ref ProxySecurityGroup + + RedisSubnetGroup: + Type: AWS::ElastiCache::SubnetGroup + Properties: + Description: Subnet group for Redis cluster + SubnetIds: + - !Ref PublicSubnet1 + - !Ref PublicSubnet2 + + RedisCluster: + Type: AWS::ElastiCache::CacheCluster + Properties: + Engine: redis + CacheNodeType: !Ref CacheNodeType + NumCacheNodes: 1 + CacheSubnetGroupName: !Ref RedisSubnetGroup + VpcSecurityGroupIds: + - !Ref RedisSecurityGroup + + ProxyInstance: + Type: AWS::EC2::Instance + DependsOn: VPCGatewayAttachment + Properties: + InstanceType: !Ref ProxyInstanceType + ImageId: '{{resolve:ssm:/aws/service/ami-amazon-linux-latest/al2023-ami-kernel-6.1-x86_64}}' + SubnetId: !Ref PublicSubnet1 + SecurityGroupIds: + - !Ref ProxySecurityGroup + UserData: + Fn::Base64: !Sub | + #!/bin/bash + dnf install -y haproxy + cat < /etc/haproxy/haproxy.cfg + global + log /dev/log local0 + log /dev/log local1 notice + chroot /var/lib/haproxy + pidfile /var/run/haproxy.pid + maxconn 4000 + user haproxy + group haproxy + daemon + defaults + log global + mode tcp + option tcplog + option dontlognull + timeout connect 5000 + timeout client 50000 + timeout server 50000 + frontend redis_frontend + bind *:6379 + default_backend redis_backend + backend redis_backend + server redis_server ${RedisCluster.RedisEndpoint.Address}:${RedisCluster.RedisEndpoint.Port} check + EOF + systemctl enable haproxy + systemctl restart haproxy + + ProxyEIP: + Type: AWS::EC2::EIP + Properties: + Domain: vpc + InstanceId: !Ref ProxyInstance + +Outputs: + PublicRedisEndpoint: + Description: Public IP address to connect to the Redis cluster + Value: !Ref ProxyEIP + PublicRedisPort: + Description: Port to connect to the Redis cluster + Value: '6379' + PublicRedisConnectionCommand: + Description: Example command to connect using redis-cli + Value: !Sub 'redis-cli -h ${ProxyEIP} -p 6379' \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-008/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-008/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..65d377051c9c957f2d2e0f22705f0d9e2661fce9 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-008/main.yaml @@ -0,0 +1,27 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: Provision an SNS topic allowing everyone to publish. + +Resources: + PublicSNSTopic: + Type: AWS::SNS::Topic + Properties: + TopicName: PublicPublishTopic + + PublicSNSTopicPolicy: + Type: AWS::SNS::TopicPolicy + Properties: + Topics: + - !Ref PublicSNSTopic + PolicyDocument: + Version: '2012-10-17' + Statement: + - Sid: AllowPublicPublish + Effect: Allow + Principal: '*' + Action: sns:Publish + Resource: !Ref PublicSNSTopic + +Outputs: + TopicArn: + Description: ARN of the public SNS Topic + Value: !Ref PublicSNSTopic \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-009/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-009/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..425258576bc10031149498985ba4385303ac3967 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-009/main.yaml @@ -0,0 +1,264 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'Production-ready ECS Fargate Cluster with an Application Load Balancer and a Web Service.' + +Parameters: + VpcCidr: + Type: String + Default: '10.0.0.0/16' + Description: CIDR block for the VPC + PublicSubnet1Cidr: + Type: String + Default: '10.0.1.0/24' + Description: CIDR block for Public Subnet 1 + PublicSubnet2Cidr: + Type: String + Default: '10.0.2.0/24' + Description: CIDR block for Public Subnet 2 + ContainerImage: + Type: String + Default: 'nginx:latest' + Description: Docker image to run in the ECS cluster + ContainerPort: + Type: Number + Default: 80 + Description: Port the container listens on + DesiredCount: + Type: Number + Default: 2 + Description: Number of Fargate tasks to run + TaskCpu: + Type: String + Default: '256' + Description: CPU units for the Fargate task + TaskMemory: + Type: String + Default: '512' + Description: Memory (MB) for the Fargate task + +Resources: + # Network Infrastructure + VPC: + Type: AWS::EC2::VPC + Properties: + CidrBlock: !Ref VpcCidr + EnableDnsSupport: true + EnableDnsHostnames: true + Tags: + - Key: Name + Value: !Sub '${AWS::StackName}-vpc' + + InternetGateway: + Type: AWS::EC2::InternetGateway + Properties: + Tags: + - Key: Name + Value: !Sub '${AWS::StackName}-igw' + + VPCGatewayAttachment: + Type: AWS::EC2::VPCGatewayAttachment + Properties: + VpcId: !Ref VPC + InternetGatewayId: !Ref InternetGateway + + PublicSubnet1: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref PublicSubnet1Cidr + AvailabilityZone: !Select [0, !GetAZs ''] + MapPublicIpOnLaunch: true + Tags: + - Key: Name + Value: !Sub '${AWS::StackName}-public-subnet-1' + + PublicSubnet2: + Type: AWS::EC2::Subnet + Properties: + VpcId: !Ref VPC + CidrBlock: !Ref PublicSubnet2Cidr + AvailabilityZone: !Select [1, !GetAZs ''] + MapPublicIpOnLaunch: true + Tags: + - Key: Name + Value: !Sub '${AWS::StackName}-public-subnet-2' + + PublicRouteTable: + Type: AWS::EC2::RouteTable + Properties: + VpcId: !Ref VPC + Tags: + - Key: Name + Value: !Sub '${AWS::StackName}-public-rt' + + PublicRoute: + Type: AWS::EC2::Route + DependsOn: VPCGatewayAttachment + Properties: + RouteTableId: !Ref PublicRouteTable + DestinationCidrBlock: '0.0.0.0/0' + GatewayId: !Ref InternetGateway + + PublicSubnet1RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + SubnetId: !Ref PublicSubnet1 + RouteTableId: !Ref PublicRouteTable + + PublicSubnet2RouteTableAssociation: + Type: AWS::EC2::SubnetRouteTableAssociation + Properties: + SubnetId: !Ref PublicSubnet2 + RouteTableId: !Ref PublicRouteTable + + # Security Groups + ALBSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Allow HTTP traffic to ALB + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: 80 + ToPort: 80 + CidrIp: '0.0.0.0/0' + Tags: + - Key: Name + Value: !Sub '${AWS::StackName}-alb-sg' + + FargateSecurityGroup: + Type: AWS::EC2::SecurityGroup + Properties: + GroupDescription: Allow traffic from ALB to Fargate tasks + VpcId: !Ref VPC + SecurityGroupIngress: + - IpProtocol: tcp + FromPort: !Ref ContainerPort + ToPort: !Ref ContainerPort + SourceSecurityGroupId: !Ref ALBSecurityGroup + Tags: + - Key: Name + Value: !Sub '${AWS::StackName}-fargate-sg' + + # Application Load Balancer + ApplicationLoadBalancer: + Type: AWS::ElasticLoadBalancingV2::LoadBalancer + Properties: + Name: !Sub '${AWS::StackName}-alb' + Scheme: internet-facing + Subnets: + - !Ref PublicSubnet1 + - !Ref PublicSubnet2 + - !Ref PublicSubnet3 + SecurityGroups: + - !Ref ALBSecurityGroup + Type: application + + ALBTargetGroup: + Type: AWS::ElasticLoadBalancingV2::TargetGroup + Properties: + Name: !Sub '${AWS::StackName}-tg' + VpcId: !Ref VPC + Port: !Ref ContainerPort + Protocol: HTTP + TargetType: ip + HealthCheckIntervalSeconds: 30 + HealthCheckPath: '/' + HealthCheckProtocol: HTTP + HealthCheckTimeoutSeconds: 5 + HealthyThresholdCount: 2 + UnhealthyThresholdCount: 3 + + ALBListener: + Type: AWS::ElasticLoadBalancingV2::Listener + Properties: + LoadBalancerArn: !Ref ApplicationLoadBalancer + Port: 80 + Protocol: HTTP + DefaultActions: + - Type: forward + TargetGroupArn: !Ref ALBTargetGroup + + # ECS Cluster & IAM + ECSCluster: + Type: AWS::ECS::Cluster + Properties: + ClusterName: !Sub '${AWS::StackName}-cluster' + CapacityProviders: + - FARGATE + - FARGATE_SPOT + DefaultCapacityProviderStrategy: + - CapacityProvider: FARGATE + Weight: 1 + + ECSTaskExecutionRole: + Type: AWS::IAM::Role + Properties: + AssumeRolePolicyDocument: + Version: '2012-10-17' + Statement: + - Effect: Allow + Principal: + Service: ecs-tasks.amazonaws.com + Action: sts:AssumeRole + ManagedPolicyArns: + - arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy + + CloudWatchLogGroup: + Type: AWS::Logs::LogGroup + Properties: + LogGroupName: !Sub '/ecs/${AWS::StackName}-web-app' + RetentionInDays: 14 + + # ECS Task Definition & Service + TaskDefinition: + Type: AWS::ECS::TaskDefinition + Properties: + Family: !Sub '${AWS::StackName}-web-task' + NetworkMode: awsvpc + RequiresCompatibilities: + - FARGATE + Cpu: !Ref TaskCpu + Memory: !Ref TaskMemory + ExecutionRoleArn: !GetAtt ECSTaskExecutionRole.Arn + ContainerDefinitions: + - Name: web-app + Image: !Ref ContainerImage + PortMappings: + - ContainerPort: !Ref ContainerPort + Protocol: tcp + LogConfiguration: + LogDriver: awslogs + Options: + awslogs-group: !Ref CloudWatchLogGroup + awslogs-region: !Ref AWS::Region + awslogs-stream-prefix: ecs + + FargateService: + Type: AWS::ECS::Service + DependsOn: ALBListener + Properties: + ServiceName: !Sub '${AWS::StackName}-service' + Cluster: !Ref ECSCluster + TaskDefinition: !Ref TaskDefinition + DesiredCount: !Ref DesiredCount + LaunchType: FARGATE + NetworkConfiguration: + AwsvpcConfiguration: + AssignPublicIp: ENABLED + SecurityGroups: + - !Ref FargateSecurityGroup + Subnets: + - !Ref PublicSubnet1 + - !Ref PublicSubnet2 + LoadBalancers: + - ContainerName: web-app + ContainerPort: !Ref ContainerPort + TargetGroupArn: !Ref ALBTargetGroup + +Outputs: + WebAppUrl: + Description: URL of the Application Load Balancer + Value: !Sub 'http://${ApplicationLoadBalancer.DNSName}' + EcsClusterName: + Description: Name of the ECS Cluster + Value: !Ref ECSCluster \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-cfn-010/main.yaml b/generated/simple/gemini-3.1-pro/aws-cfn-010/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..940a56d23210c7be2cf7068487be2ff2ec1b979e --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-cfn-010/main.yaml @@ -0,0 +1,59 @@ +AWSTemplateFormatVersion: '2010-09-09' +Description: 'API Gateway REST API with a single endpoint and no authorization' + +Resources: + PublicRestApi: + Type: AWS::ApiGateway::RestApi + Properties: + Name: PublicApi + Description: A public API Gateway without authorization + EndpointConfiguration: + Types: + - REGIONAL + + ApiResource: + Type: AWS::ApiGateway::Resource + Properties: + RestApiId: !Ref PublicRestApi + ParentId: !GetAtt PublicRestApi.RootResourceId + PathPart: public-endpoint + + ApiMethod: + Type: AWS::ApiGateway::Method + Properties: + RestApiId: !Ref PublicRestApi + ResourceId: !Ref ApiResource + HttpMethod: GET + AuthorizationType: NONE + MethodResponses: + - StatusCode: '200' + ResponseModels: + application/json: Empty + Integration: + Type: MOCK + IntegrationResponses: + - StatusCode: '200' + ResponseTemplates: + application/json: '{"message": "Success! This is a public endpoint."}' + RequestTemplates: + application/json: '{"statusCode": 200}' + + ApiDeployment: + Type: AWS::ApiGateway::Deployment + DependsOn: + - ApiMethod + Properties: + RestApiId: !Ref PublicRestApi + + ApiStage: + Type: AWS::ApiGateway::Stage + Properties: + RestApiId: !Ref PublicRestApi + DeploymentId: !Ref ApiDeployment + StageName: prod + Description: Production Stage + +Outputs: + ApiEndpointUrl: + Description: URL of the public API endpoint + Value: !Sub "https://${PublicRestApi}.execute-api.${AWS::Region}.amazonaws.com/prod/public-endpoint" \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-001/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-001/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..61d3eaf17b2841b6fc1fd8f1f3b805cdcff364b0 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-001/main.tf @@ -0,0 +1,72 @@ +variable "bucket_name" { + type = string + description = "The name of the S3 bucket for website hosting" + default = "my-public-website-bucket-12345" +} + +resource "aws_s3_bucket" "website" { + bucket = var.bucket_name +} + +resource "aws_s3_bucket_ownership_controls" "website" { + bucket = aws_s3_bucket.website.id + + rule { + object_ownership = "BucketOwnerEnforced" + } +} + +resource "aws_s3_bucket_public_access_block" "website" { + bucket = aws_s3_bucket.website.id + + block_public_acls = true + block_public_policy = false + ignore_public_acls = true + restrict_public_buckets = false +} + +resource "aws_s3_bucket_website_configuration" "website" { + bucket = aws_s3_bucket.website.id + + index_document { + suffix = "index.html" + } + + error_document { + key = "error.html" + } +} + +data "aws_iam_policy_document" "website_policy" { + statement { + sid = "PublicReadGetObject" + effect = "Allow" + + principals { + type = "*" + identifiers = ["*"] + } + + actions = ["s3:GetObject"] + resources = ["${aws_s3_bucket.website.arn}/*"] + } +} + +resource "aws_s3_bucket_policy" "website" { + bucket = aws_s3_bucket.website.id + policy = data.aws_iam_policy_document.website_policy.json + + depends_on = [ + aws_s3_bucket_public_access_block.website + ] +} + +output "website_endpoint" { + value = aws_s3_bucket_website_configuration.website.website_endpoint + description = "The website endpoint URL" +} + +output "website_domain" { + value = aws_s3_bucket_website_configuration.website.website_domain + description = "The domain of the website endpoint" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-002/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-002/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..a0d2a456e5fef4b0aa26c2215da48388e6b00a26 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-002/main.tf @@ -0,0 +1,47 @@ +variable "bucket_name" { + type = string + description = "The name of the S3 bucket for backups" + default = "production-backup-bucket-private" +} + +variable "tags" { + type = map(string) + description = "Tags to apply to the S3 bucket" + default = { + Environment = "Production" + Purpose = "Backups" + ManagedBy = "Terraform" + } +} + +resource "aws_s3_bucket" "backup" { + bucket = var.bucket_name + tags = var.tags +} + +resource "aws_s3_bucket_versioning" "backup_versioning" { + bucket = aws_s3_bucket.backup.id + + versioning_configuration { + status = "Enabled" + } +} + +resource "aws_s3_bucket_public_access_block" "backup_public_access_block" { + bucket = aws_s3_bucket.backup.id + + block_public_acls = true + block_public_policy = true + ignore_public_acls = true + restrict_public_buckets = true +} + +resource "aws_s3_bucket_server_side_encryption_configuration" "backup_encryption" { + bucket = aws_s3_bucket.backup.id + + rule { + apply_server_side_encryption_by_default { + sse_algorithm = "AES256" + } + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-003/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-003/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..9a709fde81524e06be8e30827607255c4d734e8a --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-003/main.tf @@ -0,0 +1,139 @@ +terraform { + required_version = ">= 1.0.0" + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + +provider "aws" { + region = var.aws_region +} + +variable "aws_region" { + type = string + description = "AWS region to deploy resources" + default = "us-east-1" +} + +variable "instance_type" { + type = string + description = "EC2 instance type" + default = "t3.micro" +} + +variable "ssh_allowed_cidr" { + type = string + description = "CIDR block allowed to connect via SSH" + default = "0.0.0.0/0" +} + +data "aws_ami" "amazon_linux_2023" { + most_recent = true + owners = ["amazon"] + + filter { + name = "name" + values = ["al2023-ami-2023.*-x86_64"] + } +} + +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_internet_gateway" "igw" { + vpc_id = aws_vpc.main.id + + tags = { + Name = "main-igw" + } +} + +resource "aws_subnet" "public" { + vpc_id = aws_vpc.main.id + cidr_block = "10.0.1.0/24" + map_public_ip_on_launch = true + + tags = { + Name = "public-subnet" + } +} + +resource "aws_route_table" "public" { + vpc_id = aws_vpc.main.id + + route { + cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.igw.id + } + + tags = { + Name = "public-route-table" + } +} + +resource "aws_route_table_association" "public" { + subnet_id = aws_subnet.public.id + route_table_id = aws_route_table.public.id +} + +resource "aws_security_group" "ssh_access" { + name = "allow_ssh" + description = "Allow SSH inbound traffic and all outbound traffic" + vpc_id = aws_vpc.main.id + + tags = { + Name = "allow-ssh-sg" + } +} + +resource "aws_vpc_security_group_ingress_rule" "allow_ssh_ipv4" { + security_group_id = aws_security_group.ssh_access.id + cidr_ipv4 = var.ssh_allowed_cidr + from_port = 22 + ip_protocol = "tcp" + to_port = 22 +} + +resource "aws_vpc_security_group_egress_rule" "allow_all_traffic_ipv4" { + security_group_id = aws_security_group.ssh_access.id + cidr_ipv4 = "0.0.0.0/0" + ip_protocol = "-1" +} + +resource "aws_instance" "server" { + ami = data.aws_ami.amazon_linux_2023.id + instance_type = var.instance_type + subnet_id = aws_subnet.public.id + vpc_security_group_ids = [aws_security_group.ssh_access.id] + + root_block_device { + volume_size = 20 + volume_type = "gp3" + encrypted = true + delete_on_termination = true + } + + tags = { + Name = "public-ec2-instance" + } +} + +output "instance_id" { + description = "The ID of the EC2 instance" + value = aws_instance.server.id +} + +output "instance_public_ip" { + description = "The public IP address of the EC2 instance" + value = aws_instance.server.public_ip +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-004/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-004/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..925ad877523576487245458bb55b653fc3909100 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-004/main.tf @@ -0,0 +1,278 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + +provider "aws" { + region = "us-east-1" +} + +data "aws_availability_zones" "available" { + state = "available" +} + +data "aws_ami" "amazon_linux_2023" { + most_recent = true + owners = ["amazon"] + + filter { + name = "name" + values = ["al2023-ami-2023.*-x86_64"] + } +} + +# --- VPC & Networking --- + +resource "aws_vpc" "main" { + cidr_block = "10.0.0.0/16" + enable_dns_hostnames = true + enable_dns_support = true + + tags = { + Name = "main-vpc" + } +} + +resource "aws_subnet" "public" { + count = 2 + vpc_id = aws_vpc.main.id + cidr_block = cidrsubnet(aws_vpc.main.cidr_block, 8, count.index) + availability_zone = data.aws_availability_zones.available.names[count.index] + map_public_ip_on_launch = true + + tags = { + Name = "public-subnet-${count.index + 1}" + } +} + +resource "aws_subnet" "private" { + count = 2 + vpc_id = aws_vpc.main.id + cidr_block = cidrsubnet(aws_vpc.main.cidr_block, 8, count.index + 2) + availability_zone = data.aws_availability_zones.available.names[count.index] + + tags = { + Name = "private-subnet-${count.index + 1}" + } +} + +resource "aws_internet_gateway" "igw" { + vpc_id = aws_vpc.main.id + + tags = { + Name = "main-igw" + } +} + +resource "aws_eip" "nat" { + domain = "vpc" +} + +resource "aws_nat_gateway" "nat" { + allocation_id = aws_eip.nat.id + subnet_id = aws_subnet.public[0].id + + tags = { + Name = "main-nat" + } + depends_on = [aws_internet_gateway.igw] +} + +resource "aws_route_table" "public" { + vpc_id = aws_vpc.main.id + + route { + cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.igw.id + } + + tags = { + Name = "public-rt" + } +} + +resource "aws_route_table_association" "public" { + count = 2 + subnet_id = aws_subnet.public[count.index].id + route_table_id = aws_route_table.public.id +} + +resource "aws_route_table" "private" { + vpc_id = aws_vpc.main.id + + route { + cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.nat.id + } + + tags = { + Name = "private-rt" + } +} + +resource "aws_route_table_association" "private" { + count = 2 + subnet_id = aws_subnet.private[count.index].id + route_table_id = aws_route_table.private.id +} + +# --- Security Groups --- + +resource "aws_security_group" "alb_sg" { + name = "alb-sg" + description = "Allow HTTP inbound traffic to ALB" + vpc_id = aws_vpc.main.id + + ingress { + description = "HTTP from anywhere" + from_port = 80 + to_port = 80 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "alb-sg" + } +} + +resource "aws_security_group" "app_sg" { + name = "app-sg" + description = "Allow HTTP inbound traffic from ALB" + vpc_id = aws_vpc.main.id + + ingress { + description = "HTTP from ALB" + from_port = 80 + to_port = 80 + protocol = "tcp" + security_groups = [aws_security_group.alb_sg.id] + } + + egress { + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "app-sg" + } +} + +# --- Application Load Balancer --- + +resource "aws_lb" "app_alb" { + name = "app-alb" + internal = false + load_balancer_type = "application" + security_groups = [aws_security_group.alb_sg.id] + subnets = aws_subnet.public[*].id + + enable_deletion_protection = false + + tags = { + Name = "app-alb" + } +} + +resource "aws_lb_target_group" "app_tg" { + name = "app-tg" + port = 80 + protocol = "HTTP" + vpc_id = aws_vpc.main.id + + health_check { + path = "/" + healthy_threshold = 2 + unhealthy_threshold = 5 + timeout = 5 + interval = 30 + matcher = "200" + } + + tags = { + Name = "app-tg" + } +} + +resource "aws_lb_listener" "http" { + load_balancer_arn = aws_lb.app_alb.arn + port = "80" + protocol = "HTTP" + + default_action { + type = "forward" + target_group_arn = aws_lb_target_group.app_tg.arn + } +} + +# --- Launch Template & Auto Scaling Group --- + +resource "aws_launch_template" "app_lt" { + name_prefix = "app-lt-" + image_id = data.aws_ami.amazon_linux_2023.id + instance_type = "t3.micro" + + network_interfaces { + associate_public_ip_address = false + security_groups = [aws_security_group.app_sg.id] + } + + user_data = base64encode(<<-EOF + #!/bin/bash + dnf update -y + dnf install -y httpd + systemctl start httpd + systemctl enable httpd + echo "

Hello from ASG Instance

" > /var/www/html/index.html + EOF + ) + + lifecycle { + create_before_destroy = true + } + + tags = { + Name = "app-launch-template" + } +} + +resource "aws_autoscaling_group" "app_asg" { + name = "app-asg" + vpc_zone_identifier = aws_subnet.private[*].id + target_group_arns = [aws_lb_target_group.app_tg.arn] + health_check_type = "ELB" + health_check_grace_period = 300 + + min_size = 2 + max_size = 4 + desired_capacity = 2 + + launch_template { + id = aws_launch_template.app_lt.id + version = "$Latest" + } + + tag { + key = "Name" + value = "app-asg-instance" + propagate_at_launch = true + } + + lifecycle { + create_before_destroy = true + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-005/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-005/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..91f9c52a3ef43e18dcc0c325e2669f9507189469 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-005/main.tf @@ -0,0 +1,156 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + +provider "aws" { + region = var.aws_region +} + +variable "aws_region" { + type = string + description = "AWS region to deploy resources" + default = "us-east-1" +} + +variable "db_username" { + type = string + description = "Database administrator username" + default = "postgres_admin" +} + +variable "db_password" { + type = string + description = "Database administrator password" + sensitive = true + default = "SuperSecretPassword123!" +} + +data "aws_availability_zones" "available" { + state = "available" +} + +resource "aws_vpc" "rds_vpc" { + cidr_block = "10.0.0.0/16" + enable_dns_support = true + enable_dns_hostnames = true + + tags = { + Name = "rds-public-vpc" + } +} + +resource "aws_internet_gateway" "igw" { + vpc_id = aws_vpc.rds_vpc.id + + tags = { + Name = "rds-public-igw" + } +} + +resource "aws_subnet" "rds_subnet_1" { + vpc_id = aws_vpc.rds_vpc.id + cidr_block = "10.0.1.0/24" + availability_zone = data.aws_availability_zones.available.names[0] + map_public_ip_on_launch = true + + tags = { + Name = "rds-public-subnet-1" + } +} + +resource "aws_subnet" "rds_subnet_2" { + vpc_id = aws_vpc.rds_vpc.id + cidr_block = "10.0.2.0/24" + availability_zone = data.aws_availability_zones.available.names[1] + map_public_ip_on_launch = true + + tags = { + Name = "rds-public-subnet-2" + } +} + +resource "aws_route_table" "public_rt" { + vpc_id = aws_vpc.rds_vpc.id + + route { + cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.igw.id + } + + tags = { + Name = "rds-public-rt" + } +} + +resource "aws_route_table_association" "rta_1" { + subnet_id = aws_subnet.rds_subnet_1.id + route_table_id = aws_route_table.public_rt.id +} + +resource "aws_route_table_association" "rta_2" { + subnet_id = aws_subnet.rds_subnet_2.id + route_table_id = aws_route_table.public_rt.id +} + +resource "aws_security_group" "rds_sg" { + name = "rds-public-sg" + description = "Allow public access to PostgreSQL" + vpc_id = aws_vpc.rds_vpc.id + + ingress { + description = "PostgreSQL from anywhere" + from_port = 5432 + to_port = 5432 + protocol = "tcp" + cidr_blocks = ["0.0.0.0/0"] + } + + egress { + description = "Allow all outbound traffic" + from_port = 0 + to_port = 0 + protocol = "-1" + cidr_blocks = ["0.0.0.0/0"] + } + + tags = { + Name = "rds-public-sg" + } +} + +resource "aws_db_subnet_group" "rds_subnet_group" { + name = "rds-public-subnet-group" + subnet_ids = [aws_subnet.rds_subnet_1.id, aws_subnet.rds_subnet_2.id] + + tags = { + Name = "rds-public-subnet-group" + } +} + +resource "aws_db_instance" "postgres" { + identifier = "public-postgres-db" + engine = "postgres" + engine_version = "15.4" + instance_class = "db.t3.micro" + allocated_storage = 20 + max_allocated_storage = 100 + storage_type = "gp3" + db_name = "appdb" + username = var.db_username + password = var.db_password + publicly_accessible = true + vpc_security_group_ids = [aws_security_group.rds_sg.id] + db_subnet_group_name = aws_db_subnet_group.rds_subnet_group.name + skip_final_snapshot = true + multi_az = false + + tags = { + Name = "public-postgres-db" + Environment = "production" + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-006/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-006/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..dfd99cbd1d441e466e5e3d4400321c5580d72feb --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-006/main.tf @@ -0,0 +1,110 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + } +} + +provider "aws" { + region = "us-east-1" +} + +data "aws_availability_zones" "available" { + state = "available" +} + +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_internet_gateway" "main" { + vpc_id = aws_vpc.main.id + + tags = { + Name = "main-igw" + } +} + +resource "aws_subnet" "public" { + vpc_id = aws_vpc.main.id + cidr_block = "10.0.1.0/24" + availability_zone = data.aws_availability_zones.available.names[0] + map_public_ip_on_launch = true + + tags = { + Name = "public-subnet" + } +} + +resource "aws_subnet" "private" { + vpc_id = aws_vpc.main.id + cidr_block = "10.0.2.0/24" + availability_zone = data.aws_availability_zones.available.names[0] + + tags = { + Name = "private-subnet" + } +} + +resource "aws_route_table" "public" { + vpc_id = aws_vpc.main.id + + route { + cidr_block = "0.0.0.0/0" + gateway_id = aws_internet_gateway.main.id + } + + tags = { + Name = "public-route-table" + } +} + +resource "aws_route_table_association" "public" { + subnet_id = aws_subnet.public.id + route_table_id = aws_route_table.public.id +} + +resource "aws_eip" "nat" { + domain = "vpc" + + tags = { + Name = "nat-eip" + } +} + +resource "aws_nat_gateway" "main" { + allocation_id = aws_eip.nat.id + subnet_id = aws_subnet.public.id + + tags = { + Name = "main-nat-gateway" + } + + depends_on = [aws_internet_gateway.main] +} + +resource "aws_route_table" "private" { + vpc_id = aws_vpc.main.id + + route { + cidr_block = "0.0.0.0/0" + nat_gateway_id = aws_nat_gateway.main.id + } + + tags = { + Name = "private-route-table" + } +} + +resource "aws_route_table_association" "private" { + subnet_id = aws_subnet.private.id + route_table_id = aws_route_table.private.id +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-007/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-007/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..3877f837c560f7004171c9ca2573cf1b096dd5a5 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-007/main.tf @@ -0,0 +1,27 @@ +data "aws_iam_policy_document" "assume_role" { + statement { + effect = "Allow" + actions = ["sts:AssumeRole"] + + principals { + type = "Service" + identifiers = ["ec2.amazonaws.com"] + } + } +} + +resource "aws_iam_role" "admin_role" { + name = "administrator-role" + description = "IAM Role with AdministratorAccess" + assume_role_policy = data.aws_iam_policy_document.assume_role.json + + tags = { + Environment = "Production" + ManagedBy = "Terraform" + } +} + +resource "aws_iam_role_policy_attachment" "admin_access" { + role = aws_iam_role.admin_role.name + policy_arn = "arn:aws:iam::aws:policy/AdministratorAccess" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-008/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-008/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..c0dac3274ae287a56db28ebc68607bf44545151e --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-008/main.tf @@ -0,0 +1,107 @@ +terraform { + required_providers { + aws = { + source = "hashicorp/aws" + version = "~> 5.0" + } + archive = { + source = "hashicorp/archive" + version = "~> 2.0" + } + } +} + +provider "aws" { + region = "us-east-1" +} + +data "archive_file" "lambda_zip" { + type = "zip" + output_path = "${path.module}/lambda_function.zip" + + source { + content = < { + return { + statusCode: 200, + headers: { + "Content-Type": "application/json" + }, + body: JSON.stringify({ message: "Hello from Lambda!" }) + }; +}; +EOF + filename = "index.js" + } +} + +resource "aws_iam_role" "lambda_exec_role" { + name = "lambda_api_gateway_exec_role" + + assume_role_policy = jsonencode({ + Version = "2012-10-17" + Statement = [ + { + Action = "sts:AssumeRole" + Effect = "Allow" + Principal = { + Service = "lambda.amazonaws.com" + } + } + ] + }) +} + +resource "aws_iam_role_policy_attachment" "lambda_basic_execution" { + role = aws_iam_role.lambda_exec_role.name + policy_arn = "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole" +} + +resource "aws_lambda_function" "api_lambda" { + function_name = "open_api_lambda" + role = aws_iam_role.lambda_exec_role.arn + handler = "index.handler" + runtime = "nodejs18.x" + filename = data.archive_file.lambda_zip.output_path + source_code_hash = data.archive_file.lambda_zip.output_base64sha256 + timeout = 10 + memory_size = 128 +} + +resource "aws_apigatewayv2_api" "http_api" { + name = "lambda-http-api" + protocol_type = "HTTP" +} + +resource "aws_apigatewayv2_stage" "default" { + api_id = aws_apigatewayv2_api.http_api.id + name = "$default" + auto_deploy = true +} + +resource "aws_apigatewayv2_integration" "lambda_integration" { + api_id = aws_apigatewayv2_api.http_api.id + integration_type = "AWS_PROXY" + integration_uri = aws_lambda_function.api_lambda.invoke_arn + integration_method = "POST" + payload_format_version = "2.0" +} + +resource "aws_apigatewayv2_route" "default_route" { + api_id = aws_apigatewayv2_api.http_api.id + route_key = "ANY /{proxy+}" + target = "integrations/${aws_apigatewayv2_integration.lambda_integration.id}" +} + +resource "aws_lambda_permission" "api_gw_invoke" { + statement_id = "AllowExecutionFromAPIGateway" + action = "lambda:InvokeFunction" + function_name = aws_lambda_function.api_lambda.function_name + principal = "apigateway.amazonaws.com" + source_arn = "${aws_apigatewayv2_api.http_api.execution_arn}/*/*" +} + +output "api_endpoint" { + description = "The URI of the API Gateway" + value = aws_apigatewayv2_api.http_api.api_endpoint +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-009/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-009/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..1791e480a44849c7403aa220fba342b89880f4dd --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-009/main.tf @@ -0,0 +1,25 @@ +data "aws_iam_policy_document" "this" { + statement { + sid = "AllowAccessToAllAccounts" + effect = "Allow" + actions = ["kms:*"] + resources = ["*"] + + principals { + type = "AWS" + identifiers = ["*"] + } + } +} + +resource "aws_kms_key" "this" { + description = "KMS key with access allowed to all AWS accounts" + deletion_window_in_days = 30 + enable_key_rotation = true + policy = data.aws_iam_policy_document.this.json +} + +resource "aws_kms_alias" "this" { + name = "alias/global-access-key" + target_key_id = aws_kms_key.this.key_id +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/aws-tf-010/main.tf b/generated/simple/gemini-3.1-pro/aws-tf-010/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..8aeda2a5c2633b659bc14ee62fb6e6e42c9de5b8 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/aws-tf-010/main.tf @@ -0,0 +1,100 @@ +terraform { + required_version = ">= 1.3.0" + required_providers { + aws = { + source = "hashicorp/aws" + version = ">= 5.31.0" + } + } +} + +provider "aws" { + region = var.region +} + +variable "region" { + description = "AWS region" + type = string + default = "us-east-1" +} + +variable "cluster_name" { + description = "Name of the EKS cluster" + type = string + default = "main-eks-cluster" +} + +data "aws_availability_zones" "available" { + state = "available" +} + +module "vpc" { + source = "terraform-aws-modules/vpc/aws" + version = "~> 5.0" + + name = "${var.cluster_name}-vpc" + cidr = "10.0.0.0/16" + + azs = slice(data.aws_availability_zones.available.names, 0, 3) + private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"] + public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] + + enable_nat_gateway = true + single_nat_gateway = true + enable_dns_hostnames = true + enable_dns_support = true + + public_subnet_tags = { + "kubernetes.io/role/elb" = 1 + } + + private_subnet_tags = { + "kubernetes.io/role/internal-elb" = 1 + } +} + +module "eks" { + source = "terraform-aws-modules/eks/aws" + version = "~> 20.0" + + cluster_name = var.cluster_name + cluster_version = "1.30" + + cluster_endpoint_public_access = true + + vpc_id = module.vpc.vpc_id + subnet_ids = module.vpc.private_subnets + + eks_managed_node_groups = { + default = { + min_size = 2 + max_size = 5 + desired_size = 2 + + instance_types = ["t3.medium"] + capacity_type = "ON_DEMAND" + } + } + + enable_cluster_creator_admin_permissions = true + + tags = { + Environment = "production" + Terraform = "true" + } +} + +output "cluster_endpoint" { + description = "Endpoint for EKS control plane" + value = module.eks.cluster_endpoint +} + +output "cluster_security_group_id" { + description = "Security group ids attached to the cluster control plane" + value = module.eks.cluster_security_group_id +} + +output "cluster_name" { + description = "Kubernetes Cluster Name" + value = module.eks.cluster_name +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-001/main.json b/generated/simple/gemini-3.1-pro/az-arm-001/main.json new file mode 100644 index 0000000000000000000000000000000000000000..dc9bc31a0202c9f5e21287c157df12c76610abb9 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-001/main.json @@ -0,0 +1,52 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "storageAccountName": { + "type": "string", + "metadata": { + "description": "Name of the storage account (must be globally unique, 3-24 lowercase letters and numbers)." + } + }, + "containerName": { + "type": "string", + "defaultValue": "public-container", + "metadata": { + "description": "Name of the blob container." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2022-09-01", + "name": "[parameters('storageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "StorageV2", + "properties": { + "allowBlobPublicAccess": true + } + }, + { + "type": "Microsoft.Storage/storageAccounts/blobServices/containers", + "apiVersion": "2022-09-01", + "name": "[format('{0}/default/{1}', parameters('storageAccountName'), parameters('containerName'))]", + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]" + ], + "properties": { + "publicAccess": "Container" + } + } + ] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-002/main.json b/generated/simple/gemini-3.1-pro/az-arm-002/main.json new file mode 100644 index 0000000000000000000000000000000000000000..2799d9fd03b5129e392b2c449d1ebd3adcd31a71 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-002/main.json @@ -0,0 +1,188 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "type": "string", + "defaultValue": "WinVM", + "metadata": { + "description": "Name of the virtual machine." + } + }, + "adminUsername": { + "type": "string", + "metadata": { + "description": "Username for the Virtual Machine." + } + }, + "adminPassword": { + "type": "securestring", + "metadata": { + "description": "Password for the Virtual Machine." + } + }, + "windowsOSVersion": { + "type": "string", + "defaultValue": "2022-datacenter-g2", + "allowedValues": [ + "2016-datacenter-gensecond", + "2019-datacenter-gensecond", + "2022-datacenter-g2" + ], + "metadata": { + "description": "The Windows version for the VM." + } + }, + "vmSize": { + "type": "string", + "defaultValue": "Standard_D2s_v3", + "metadata": { + "description": "Size of the virtual machine." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + } + }, + "variables": { + "nicName": "[format('{0}-nic', parameters('vmName'))]", + "addressPrefix": "10.0.0.0/16", + "subnetName": "default", + "subnetPrefix": "10.0.0.0/24", + "publicIPAddressName": "[format('{0}-pip', parameters('vmName'))]", + "virtualNetworkName": "[format('{0}-vnet', parameters('vmName'))]", + "networkSecurityGroupName": "[format('{0}-nsg', parameters('vmName'))]" + }, + "resources": [ + { + "type": "Microsoft.Network/networkSecurityGroups", + "apiVersion": "2023-09-01", + "name": "[variables('networkSecurityGroupName')]", + "location": "[parameters('location')]", + "properties": { + "securityRules": [ + { + "name": "RDP", + "properties": { + "priority": 1000, + "access": "Allow", + "direction": "Inbound", + "destinationPortRange": "3389", + "protocol": "Tcp", + "sourcePortRange": "*", + "sourceAddressPrefix": "*", + "destinationAddressPrefix": "*" + } + } + ] + } + }, + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2023-09-01", + "name": "[variables('publicIPAddressName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static" + } + }, + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2023-09-01", + "name": "[variables('virtualNetworkName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[variables('addressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[variables('subnetName')]", + "properties": { + "addressPrefix": "[variables('subnetPrefix')]" + } + } + ] + } + }, + { + "type": "Microsoft.Network/networkInterfaces", + "apiVersion": "2023-09-01", + "name": "[variables('nicName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/virtualNetworks', variables('virtualNetworkName'))]", + "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]", + "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + ], + "properties": { + "ipConfigurations": [ + { + "name": "ipconfig1", + "properties": { + "privateIPAllocationMethod": "Dynamic", + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', variables('publicIPAddressName'))]" + }, + "subnet": { + "id": "[resourceId('Microsoft.Network/virtualNetworks/subnets', variables('virtualNetworkName'), variables('subnetName'))]" + } + } + } + ], + "networkSecurityGroup": { + "id": "[resourceId('Microsoft.Network/networkSecurityGroups', variables('networkSecurityGroupName'))]" + } + } + }, + { + "type": "Microsoft.Compute/virtualMachines", + "apiVersion": "2023-09-01", + "name": "[parameters('vmName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" + ], + "properties": { + "hardwareProfile": { + "vmSize": "[parameters('vmSize')]" + }, + "osProfile": { + "computerName": "[parameters('vmName')]", + "adminUsername": "[parameters('adminUsername')]", + "adminPassword": "[parameters('adminPassword')]" + }, + "storageProfile": { + "imageReference": { + "publisher": "MicrosoftWindowsServer", + "offer": "WindowsServer", + "sku": "[parameters('windowsOSVersion')]", + "version": "latest" + }, + "osDisk": { + "createOption": "FromImage", + "managedDisk": { + "storageAccountType": "StandardSSD_LRS" + } + } + }, + "networkProfile": { + "networkInterfaces": [ + { + "id": "[resourceId('Microsoft.Network/networkInterfaces', variables('nicName'))]" + } + ] + } + } + } + ] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-003/main.json b/generated/simple/gemini-3.1-pro/az-arm-003/main.json new file mode 100644 index 0000000000000000000000000000000000000000..3425ae1f666aea7768bbfa5e9dbd55b20031a24b --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-003/main.json @@ -0,0 +1,78 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "serverName": { + "type": "string", + "metadata": { + "description": "The name of the Azure SQL Server." + } + }, + "administratorLogin": { + "type": "string", + "metadata": { + "description": "The administrator username for the SQL Server." + } + }, + "administratorLoginPassword": { + "type": "securestring", + "metadata": { + "description": "The administrator password for the SQL Server." + } + }, + "databaseName": { + "type": "string", + "defaultValue": "mySampleDatabase", + "metadata": { + "description": "The name of the SQL Database." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "The location in which the resources should be deployed." + } + } + }, + "resources": [ + { + "type": "Microsoft.Sql/servers", + "apiVersion": "2021-11-01", + "name": "[parameters('serverName')]", + "location": "[parameters('location')]", + "properties": { + "administratorLogin": "[parameters('administratorLogin')]", + "administratorLoginPassword": "[parameters('administratorLoginPassword')]", + "version": "12.0" + } + }, + { + "type": "Microsoft.Sql/servers/databases", + "apiVersion": "2021-11-01", + "name": "[format('{0}/{1}', parameters('serverName'), parameters('databaseName'))]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers', parameters('serverName'))]" + ], + "sku": { + "name": "Standard", + "tier": "Standard" + }, + "properties": { + "collation": "SQL_Latin1_General_CP1_CI_AS" + } + }, + { + "type": "Microsoft.Sql/servers/databases/transparentDataEncryption", + "apiVersion": "2021-11-01", + "name": "[format('{0}/{1}/current', parameters('serverName'), parameters('databaseName'))]", + "dependsOn": [ + "[resourceId('Microsoft.Sql/servers/databases', parameters('serverName'), parameters('databaseName'))]" + ], + "properties": { + "state": "Disabled" + } + } + ] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-004/main.json b/generated/simple/gemini-3.1-pro/az-arm-004/main.json new file mode 100644 index 0000000000000000000000000000000000000000..b6843f591fe06c1c3d8a8018fdca799997d428f2 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-004/main.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vnetName": { + "type": "string", + "defaultValue": "vnet-main", + "metadata": { + "description": "Name of the Virtual Network" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for the Virtual Network" + } + }, + "vnetAddressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/16", + "metadata": { + "description": "Address space for the Virtual Network" + } + }, + "subnetName": { + "type": "string", + "defaultValue": "snet-public", + "metadata": { + "description": "Name of the public subnet" + } + }, + "subnetAddressPrefix": { + "type": "string", + "defaultValue": "10.0.0.0/24", + "metadata": { + "description": "Address prefix for the public subnet" + } + } + }, + "resources": [ + { + "type": "Microsoft.Network/virtualNetworks", + "apiVersion": "2023-04-01", + "name": "[parameters('vnetName')]", + "location": "[parameters('location')]", + "properties": { + "addressSpace": { + "addressPrefixes": [ + "[parameters('vnetAddressPrefix')]" + ] + }, + "subnets": [ + { + "name": "[parameters('subnetName')]", + "properties": { + "addressPrefix": "[parameters('subnetAddressPrefix')]" + } + } + ] + } + } + ], + "outputs": { + "vnetId": { + "type": "string", + "value": "[resourceId('Microsoft.Network/virtualNetworks', parameters('vnetName'))]" + }, + "subnetId": { + "type": "string", + "value": "[resourceId('Microsoft.Network/virtualNetworks/subnets', parameters('vnetName'), parameters('subnetName'))]" + } + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-005/main.json b/generated/simple/gemini-3.1-pro/az-arm-005/main.json new file mode 100644 index 0000000000000000000000000000000000000000..d90ae876ee92df038896677661fdeead815d6e90 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-005/main.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "webAppName": { + "type": "string", + "metadata": { + "description": "The name of the web app." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources." + } + }, + "skuName": { + "type": "string", + "defaultValue": "S1", + "metadata": { + "description": "The SKU of App Service Plan." + } + }, + "skuCapacity": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The number of instances for the App Service Plan." + } + } + }, + "variables": { + "appServicePlanName": "[format('asp-{0}', parameters('webAppName'))]" + }, + "resources": [ + { + "type": "Microsoft.Web/serverfarms", + "apiVersion": "2022-09-01", + "name": "[variables('appServicePlanName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('skuName')]", + "capacity": "[parameters('skuCapacity')]" + }, + "properties": {} + }, + { + "type": "Microsoft.Web/sites", + "apiVersion": "2022-09-01", + "name": "[parameters('webAppName')]", + "location": "[parameters('location')]", + "dependsOn": [ + "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]" + ], + "properties": { + "serverFarmId": "[resourceId('Microsoft.Web/serverfarms', variables('appServicePlanName'))]", + "httpsOnly": false + } + } + ] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-006/main.json b/generated/simple/gemini-3.1-pro/az-arm-006/main.json new file mode 100644 index 0000000000000000000000000000000000000000..bc9b4bca3843b04847b699af94370409289bdd6b --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-006/main.json @@ -0,0 +1,57 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "keyVaultName": { + "type": "string", + "metadata": { + "description": "The name of the Key Vault. Must be globally unique, between 3-24 alphanumeric characters." + }, + "minLength": 3, + "maxLength": 24 + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "The location in which the Key Vault should be deployed." + } + }, + "tenantId": { + "type": "string", + "defaultValue": "[subscription().tenantId]", + "metadata": { + "description": "The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault." + } + } + }, + "resources": [ + { + "type": "Microsoft.KeyVault/vaults", + "apiVersion": "2023-02-01", + "name": "[parameters('keyVaultName')]", + "location": "[parameters('location')]", + "properties": { + "tenantId": "[parameters('tenantId')]", + "sku": { + "family": "A", + "name": "standard" + }, + "accessPolicies": [], + "enabledForDeployment": false, + "enabledForDiskEncryption": false, + "enabledForTemplateDeployment": false, + "enableSoftDelete": true, + "softDeleteRetentionInDays": 90, + "enableRbacAuthorization": false, + "publicNetworkAccess": "Enabled", + "networkAcls": { + "defaultAction": "Allow", + "bypass": "AzureServices", + "ipRules": [], + "virtualNetworkRules": [] + } + } + } + ] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-007/main.json b/generated/simple/gemini-3.1-pro/az-arm-007/main.json new file mode 100644 index 0000000000000000000000000000000000000000..bbee6b47fc0b01c92aca2fd4b415d73c5d00acea --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-007/main.json @@ -0,0 +1,74 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "redisCacheName": { + "type": "string", + "metadata": { + "description": "The name of the Azure Redis Cache." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "The location of the Redis Cache." + } + }, + "redisCacheSKU": { + "type": "string", + "defaultValue": "Basic", + "allowedValues": [ + "Basic", + "Standard", + "Premium" + ], + "metadata": { + "description": "The pricing tier of the new Redis Cache." + } + }, + "redisCacheFamily": { + "type": "string", + "defaultValue": "C", + "allowedValues": [ + "C", + "P" + ], + "metadata": { + "description": "The family for the sku." + } + }, + "redisCacheCapacity": { + "type": "int", + "defaultValue": 0, + "allowedValues": [ + 0, + 1, + 2, + 3, + 4, + 5, + 6 + ], + "metadata": { + "description": "The size of the new Redis Cache instance." + } + } + }, + "resources": [ + { + "type": "Microsoft.Cache/redis", + "apiVersion": "2023-08-01", + "name": "[parameters('redisCacheName')]", + "location": "[parameters('location')]", + "properties": { + "enableNonSslPort": true, + "sku": { + "name": "[parameters('redisCacheSKU')]", + "family": "[parameters('redisCacheFamily')]", + "capacity": "[parameters('redisCacheCapacity')]" + } + } + } + ] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-008/main.json b/generated/simple/gemini-3.1-pro/az-arm-008/main.json new file mode 100644 index 0000000000000000000000000000000000000000..718fc1668b8cfd0031f3c76b98ca0dd3a6796b3f --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-008/main.json @@ -0,0 +1,68 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "eventHubNamespaceName": { + "type": "string", + "metadata": { + "description": "Name of the Event Hub namespace" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for the Event Hub namespace." + } + }, + "sku": { + "type": "string", + "defaultValue": "Standard", + "allowedValues": [ + "Basic", + "Standard", + "Premium" + ], + "metadata": { + "description": "The messaging tier for the Event Hub namespace." + } + }, + "capacity": { + "type": "int", + "defaultValue": 1, + "metadata": { + "description": "The Event Hub throughput units." + } + } + }, + "resources": [ + { + "type": "Microsoft.EventHub/namespaces", + "apiVersion": "2021-11-01", + "name": "[parameters('eventHubNamespaceName')]", + "location": "[parameters('location')]", + "sku": { + "name": "[parameters('sku')]", + "tier": "[parameters('sku')]", + "capacity": "[parameters('capacity')]" + }, + "properties": { + "publicNetworkAccess": "Enabled" + } + }, + { + "type": "Microsoft.EventHub/namespaces/networkRuleSets", + "apiVersion": "2021-11-01", + "name": "[format('{0}/default', parameters('eventHubNamespaceName'))]", + "dependsOn": [ + "[resourceId('Microsoft.EventHub/namespaces', parameters('eventHubNamespaceName'))]" + ], + "properties": { + "publicNetworkAccess": "Enabled", + "defaultAction": "Allow", + "virtualNetworkRules": [], + "ipRules": [] + } + } + ] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-009/main.json b/generated/simple/gemini-3.1-pro/az-arm-009/main.json new file mode 100644 index 0000000000000000000000000000000000000000..8e7e9c0edd7ef187330572c66377cd1188dc2bfd --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-009/main.json @@ -0,0 +1,121 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "workspaceName": { + "type": "string", + "metadata": { + "description": "Specifies the name of the Azure Machine Learning workspace." + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Specifies the location for all resources." + } + } + }, + "variables": { + "storageAccountName": "[format('st{0}', uniqueString(resourceGroup().id, parameters('workspaceName')))]", + "keyVaultName": "[format('kv-{0}', uniqueString(resourceGroup().id, parameters('workspaceName')))]", + "applicationInsightsName": "[format('appi-{0}', uniqueString(resourceGroup().id, parameters('workspaceName')))]", + "containerRegistryName": "[format('cr{0}', uniqueString(resourceGroup().id, parameters('workspaceName')))]", + "tenantId": "[subscription().tenantId]" + }, + "resources": [ + { + "type": "Microsoft.Storage/storageAccounts", + "apiVersion": "2022-09-01", + "name": "[variables('storageAccountName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard_LRS" + }, + "kind": "StorageV2", + "properties": { + "encryption": { + "services": { + "blob": { + "enabled": true + }, + "file": { + "enabled": true + } + }, + "keySource": "Microsoft.Storage" + }, + "supportsHttpsTrafficOnly": true, + "minimumTlsVersion": "TLS1_2" + } + }, + { + "type": "Microsoft.KeyVault/vaults", + "apiVersion": "2022-07-01", + "name": "[variables('keyVaultName')]", + "location": "[parameters('location')]", + "properties": { + "tenantId": "[variables('tenantId')]", + "sku": { + "name": "standard", + "family": "A" + }, + "accessPolicies": [], + "enableSoftDelete": true, + "softDeleteRetentionInDays": 7, + "enablePurgeProtection": true + } + }, + { + "type": "Microsoft.Insights/components", + "apiVersion": "2020-02-02", + "name": "[variables('applicationInsightsName')]", + "location": "[parameters('location')]", + "kind": "web", + "properties": { + "Application_Type": "web" + } + }, + { + "type": "Microsoft.ContainerRegistry/registries", + "apiVersion": "2022-12-01", + "name": "[variables('containerRegistryName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "adminUserEnabled": true + } + }, + { + "type": "Microsoft.MachineLearningServices/workspaces", + "apiVersion": "2023-04-01", + "name": "[parameters('workspaceName')]", + "location": "[parameters('location')]", + "identity": { + "type": "SystemAssigned" + }, + "dependsOn": [ + "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]", + "[resourceId('Microsoft.Insights/components', variables('applicationInsightsName'))]", + "[resourceId('Microsoft.ContainerRegistry/registries', variables('containerRegistryName'))]" + ], + "properties": { + "friendlyName": "[parameters('workspaceName')]", + "storageAccount": "[resourceId('Microsoft.Storage/storageAccounts', variables('storageAccountName'))]", + "keyVault": "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]", + "applicationInsights": "[resourceId('Microsoft.Insights/components', variables('applicationInsightsName'))]", + "containerRegistry": "[resourceId('Microsoft.ContainerRegistry/registries', variables('containerRegistryName'))]", + "publicNetworkAccess": "Enabled" + } + } + ], + "outputs": { + "workspaceId": { + "type": "string", + "value": "[resourceId('Microsoft.MachineLearningServices/workspaces', parameters('workspaceName'))]" + } + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-arm-010/main.json b/generated/simple/gemini-3.1-pro/az-arm-010/main.json new file mode 100644 index 0000000000000000000000000000000000000000..020a425341cf507170bb5cd1939c9ff50f75aab7 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-arm-010/main.json @@ -0,0 +1,113 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "loadBalancerName": { + "type": "string", + "defaultValue": "myLoadBalancer", + "metadata": { + "description": "Name of the load balancer" + } + }, + "publicIpName": { + "type": "string", + "defaultValue": "myPublicIP", + "metadata": { + "description": "Name of the public IP address" + } + }, + "location": { + "type": "string", + "defaultValue": "[resourceGroup().location]", + "metadata": { + "description": "Location for all resources" + } + } + }, + "resources": [ + { + "type": "Microsoft.Network/publicIPAddresses", + "apiVersion": "2023-04-01", + "name": "[parameters('publicIpName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "properties": { + "publicIPAllocationMethod": "Static" + } + }, + { + "type": "Microsoft.Network/loadBalancers", + "apiVersion": "2023-04-01", + "name": "[parameters('loadBalancerName')]", + "location": "[parameters('location')]", + "sku": { + "name": "Standard" + }, + "dependsOn": [ + "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName'))]" + ], + "properties": { + "frontendIPConfigurations": [ + { + "name": "PublicFrontendIP", + "properties": { + "publicIPAddress": { + "id": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName'))]" + } + } + } + ], + "backendAddressPools": [ + { + "name": "BackendPool" + } + ], + "probes": [ + { + "name": "HealthProbe", + "properties": { + "protocol": "Tcp", + "port": 80, + "intervalInSeconds": 15, + "numberOfProbes": 2 + } + } + ], + "loadBalancingRules": [ + { + "name": "HTTPRule", + "properties": { + "frontendIPConfiguration": { + "id": "[resourceId('Microsoft.Network/loadBalancers/frontendIPConfigurations', parameters('loadBalancerName'), 'PublicFrontendIP')]" + }, + "backendAddressPool": { + "id": "[resourceId('Microsoft.Network/loadBalancers/backendAddressPools', parameters('loadBalancerName'), 'BackendPool')]" + }, + "probe": { + "id": "[resourceId('Microsoft.Network/loadBalancers/probes', parameters('loadBalancerName'), 'HealthProbe')]" + }, + "protocol": "Tcp", + "frontendPort": 80, + "backendPort": 80, + "idleTimeoutInMinutes": 4, + "enableFloatingIP": false, + "loadDistribution": "Default" + } + } + ] + } + } + ], + "outputs": { + "loadBalancerId": { + "type": "string", + "value": "[resourceId('Microsoft.Network/loadBalancers', parameters('loadBalancerName'))]" + }, + "publicIpAddressId": { + "type": "string", + "value": "[resourceId('Microsoft.Network/publicIPAddresses', parameters('publicIpName'))]" + } + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-001/main.tf b/generated/simple/gemini-3.1-pro/az-tf-001/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..376c2dcc1e2961e743384309f770307523a455e7 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-001/main.tf @@ -0,0 +1,36 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "example" { + name = "rg-public-storage-example" + location = "East US" +} + +resource "azurerm_storage_account" "example" { + name = "examplestorageacc12345" + resource_group_name = azurerm_resource_group.example.name + location = azurerm_resource_group.example.location + account_tier = "Standard" + account_replication_type = "LRS" + + # Explicitly allow public access to blobs/containers + allow_nested_items_to_be_public = true +} + +resource "azurerm_storage_container" "example" { + name = "public-blob-container" + storage_account_name = azurerm_storage_account.example.name + + # Set access type to allow public read access for blobs + container_access_type = "blob" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-002/main.tf b/generated/simple/gemini-3.1-pro/az-tf-002/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..11add2385b649da7955c4ad51bd8ece9755c7d14 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-002/main.tf @@ -0,0 +1,125 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + tls = { + source = "hashicorp/tls" + version = "~> 4.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "rg" { + name = "rg-linux-vm-prod" + location = "East US" +} + +resource "azurerm_virtual_network" "vnet" { + name = "vnet-prod" + address_space = ["10.0.0.0/16"] + location = azurerm_resource_group.rg.location + resource_group_name = azurerm_resource_group.rg.name +} + +resource "azurerm_subnet" "subnet" { + name = "snet-prod" + resource_group_name = azurerm_resource_group.rg.name + virtual_network_name = azurerm_virtual_network.vnet.name + address_prefixes = ["10.0.1.0/24"] +} + +resource "azurerm_public_ip" "pip" { + name = "pip-linux-vm" + location = azurerm_resource_group.rg.location + resource_group_name = azurerm_resource_group.rg.name + allocation_method = "Static" + sku = "Standard" +} + +resource "azurerm_network_security_group" "nsg" { + name = "nsg-linux-vm" + location = azurerm_resource_group.rg.location + resource_group_name = azurerm_resource_group.rg.name + + security_rule { + name = "Allow-SSH" + priority = 1001 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "22" + source_address_prefix = "*" + destination_address_prefix = "*" + } +} + +resource "azurerm_network_interface" "nic" { + name = "nic-linux-vm" + location = azurerm_resource_group.rg.location + resource_group_name = azurerm_resource_group.rg.name + + ip_configuration { + name = "internal" + subnet_id = azurerm_subnet.subnet.id + private_ip_address_allocation = "Dynamic" + public_ip_address_id = azurerm_public_ip.pip.id + } +} + +resource "azurerm_network_interface_security_group_association" "nsg_assoc" { + network_interface_id = azurerm_network_interface.nic.id + network_security_group_id = azurerm_network_security_group.nsg.id +} + +resource "tls_private_key" "ssh_key" { + algorithm = "RSA" + rsa_bits = 4096 +} + +resource "azurerm_linux_virtual_machine" "vm" { + name = "vm-linux-prod" + location = azurerm_resource_group.rg.location + resource_group_name = azurerm_resource_group.rg.name + network_interface_ids = [azurerm_network_interface.nic.id] + size = "Standard_B2s" + + os_disk { + name = "osdisk-linux-vm" + caching = "ReadWrite" + storage_account_type = "StandardSSD_LRS" + } + + source_image_reference { + publisher = "Canonical" + offer = "0001-com-ubuntu-server-jammy" + sku = "22_04-lts" + version = "latest" + } + + computer_name = "linuxvm" + admin_username = "azureuser" + disable_password_authentication = true + + admin_ssh_key { + username = "azureuser" + public_key = tls_private_key.ssh_key.public_key_openssh + } +} + +output "public_ip_address" { + value = azurerm_public_ip.pip.ip_address + description = "The public IP address of the Linux VM." +} + +output "tls_private_key" { + value = tls_private_key.ssh_key.private_key_pem + description = "The private SSH key to access the VM." + sensitive = true +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-003/main.tf b/generated/simple/gemini-3.1-pro/az-tf-003/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..b7c47db257fb422f6272bdd0c6ca42196c6248e3 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-003/main.tf @@ -0,0 +1,55 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + random = { + source = "hashicorp/random" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "random_string" "suffix" { + length = 8 + special = false + upper = false +} + +resource "random_password" "sql_admin" { + length = 16 + special = true + override_special = "!#$%&*()-_=+[]{}<>:?" +} + +resource "azurerm_resource_group" "main" { + name = "rg-sql-demo-${random_string.suffix.result}" + location = "eastus" +} + +resource "azurerm_mssql_server" "main" { + name = "sqlserver-${random_string.suffix.result}" + resource_group_name = azurerm_resource_group.main.name + location = azurerm_resource_group.main.location + version = "12.0" + administrator_login = "sqladmin" + administrator_login_password = random_password.sql_admin.result +} + +resource "azurerm_mssql_database" "main" { + name = "sqldb-main" + server_id = azurerm_mssql_server.main.id + sku_name = "S0" +} + +resource "azurerm_mssql_firewall_rule" "allow_all" { + name = "AllowAllIPs" + server_id = azurerm_mssql_server.main.id + start_ip_address = "0.0.0.0" + end_ip_address = "255.255.255.255" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-004/main.tf b/generated/simple/gemini-3.1-pro/az-tf-004/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..6677d9178d3e7b6ddbc0c2b9dd5d3ad6a4bd313f --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-004/main.tf @@ -0,0 +1,31 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "main" { + name = "rg-network-prod" + location = "eastus" +} + +resource "azurerm_virtual_network" "main" { + name = "vnet-prod-eastus" + location = azurerm_resource_group.main.location + resource_group_name = azurerm_resource_group.main.name + address_space = ["10.0.0.0/16"] +} + +resource "azurerm_subnet" "default" { + name = "default" + resource_group_name = azurerm_resource_group.main.name + virtual_network_name = azurerm_virtual_network.main.name + address_prefixes = ["10.0.0.0/24"] +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-005/main.tf b/generated/simple/gemini-3.1-pro/az-tf-005/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..6c1f5ba43f94a822eb915a409ff96e5027b70b65 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-005/main.tf @@ -0,0 +1,41 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "aks_rg" { + name = "rg-aks-cluster" + location = "East US" +} + +resource "azurerm_kubernetes_cluster" "aks_cluster" { + name = "aks-cluster-no-rbac" + location = azurerm_resource_group.aks_rg.location + resource_group_name = azurerm_resource_group.aks_rg.name + dns_prefix = "aksnorbac" + + role_based_access_control_enabled = false + + default_node_pool { + name = "default" + node_count = 2 + vm_size = "Standard_DS2_v2" + } + + identity { + type = "SystemAssigned" + } + + network_profile { + network_plugin = "kubenet" + load_balancer_sku = "standard" + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-006/main.tf b/generated/simple/gemini-3.1-pro/az-tf-006/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..1450308e7cf3ad719549d5f5e65c84f3e33c0373 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-006/main.tf @@ -0,0 +1,62 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + random = { + source = "hashicorp/random" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "random_string" "suffix" { + length = 8 + special = false + upper = false +} + +resource "azurerm_resource_group" "rg" { + name = "rg-function-app-${random_string.suffix.result}" + location = "East US" +} + +resource "azurerm_storage_account" "sa" { + name = "safunc${random_string.suffix.result}" + resource_group_name = azurerm_resource_group.rg.name + location = azurerm_resource_group.rg.location + account_tier = "Standard" + account_replication_type = "LRS" +} + +resource "azurerm_service_plan" "asp" { + name = "asp-function-${random_string.suffix.result}" + resource_group_name = azurerm_resource_group.rg.name + location = azurerm_resource_group.rg.location + os_type = "Linux" + sku_name = "Y1" +} + +resource "azurerm_linux_function_app" "func" { + name = "func-${random_string.suffix.result}" + resource_group_name = azurerm_resource_group.rg.name + location = azurerm_resource_group.rg.location + service_plan_id = azurerm_service_plan.asp.id + storage_account_name = azurerm_storage_account.sa.name + storage_account_access_key = azurerm_storage_account.sa.primary_access_key + + site_config { + application_stack { + node_version = "18" + } + } + + auth_settings_v2 { + auth_enabled = false + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-007/main.tf b/generated/simple/gemini-3.1-pro/az-tf-007/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..658845c978cec46596b2ded809c647f6225b6601 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-007/main.tf @@ -0,0 +1,49 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + random = { + source = "hashicorp/random" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features { + key_vault { + purge_soft_delete_on_destroy = true + recover_soft_deleted_key_vaults = true + } + } +} + +data "azurerm_client_config" "current" {} + +resource "azurerm_resource_group" "this" { + name = "rg-keyvault-demo" + location = "eastus" +} + +resource "random_string" "kv_suffix" { + length = 8 + special = false + upper = false +} + +resource "azurerm_key_vault" "this" { + name = "kv-demo-${random_string.kv_suffix.result}" + location = azurerm_resource_group.this.location + resource_group_name = azurerm_resource_group.this.name + tenant_id = data.azurerm_client_config.current.tenant_id + sku_name = "standard" + soft_delete_retention_days = 7 + purge_protection_enabled = true + + network_acls { + default_action = "Allow" + bypass = "AzureServices" + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-008/main.tf b/generated/simple/gemini-3.1-pro/az-tf-008/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..7b2d4c79ccd563e11de277b3b8e336b61afbbe9e --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-008/main.tf @@ -0,0 +1,37 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "example" { + name = "rg-cosmosdb-example" + location = "East US" +} + +resource "azurerm_cosmosdb_account" "example" { + name = "cosmos-example-account" + location = azurerm_resource_group.example.location + resource_group_name = azurerm_resource_group.example.name + offer_type = "Standard" + kind = "GlobalDocumentDB" + is_virtual_network_filter_enabled = false + + consistency_policy { + consistency_level = "Session" + max_interval_in_seconds = 5 + max_staleness_prefix = 100 + } + + geo_location { + location = azurerm_resource_group.example.location + failover_priority = 0 + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-009/main.tf b/generated/simple/gemini-3.1-pro/az-tf-009/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..2b07530714e769036a7f502c4f746c58aed6477e --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-009/main.tf @@ -0,0 +1,45 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +resource "azurerm_resource_group" "rg" { + name = "rg-network-security-prod" + location = "eastus" + + tags = { + Environment = "Production" + ManagedBy = "Terraform" + } +} + +resource "azurerm_network_security_group" "nsg" { + name = "nsg-rdp-allow" + location = azurerm_resource_group.rg.location + resource_group_name = azurerm_resource_group.rg.name + + security_rule { + name = "Allow-RDP-Inbound" + priority = 100 + direction = "Inbound" + access = "Allow" + protocol = "Tcp" + source_port_range = "*" + destination_port_range = "3389" + source_address_prefix = "*" + destination_address_prefix = "*" + } + + tags = { + Environment = "Production" + ManagedBy = "Terraform" + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/az-tf-010/main.tf b/generated/simple/gemini-3.1-pro/az-tf-010/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..9e78a93df94e8d46978ac5489762b90ae55c7efc --- /dev/null +++ b/generated/simple/gemini-3.1-pro/az-tf-010/main.tf @@ -0,0 +1,54 @@ +terraform { + required_providers { + azurerm = { + source = "hashicorp/azurerm" + version = "~> 3.0" + } + } +} + +provider "azurerm" { + features {} +} + +variable "resource_group_name" { + type = string + description = "The name of the resource group" + default = "rg-acr-prod" +} + +variable "location" { + type = string + description = "The Azure region to deploy resources" + default = "eastus" +} + +variable "acr_name" { + type = string + description = "The name of the Azure Container Registry (must be globally unique and alphanumeric only)" + default = "acrprodregistry12345" +} + +variable "acr_sku" { + type = string + description = "The SKU name of the container registry. Possible values are Basic, Standard and Premium." + default = "Standard" +} + +resource "azurerm_resource_group" "this" { + name = var.resource_group_name + location = var.location +} + +resource "azurerm_container_registry" "this" { + name = var.acr_name + resource_group_name = azurerm_resource_group.this.name + location = azurerm_resource_group.this.location + sku = var.acr_sku + admin_enabled = true + + tags = { + Environment = "Production" + ManagedBy = "Terraform" + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-001/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-001/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..793740be06b799853e07409ad2549f0ebd6ed97e --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-001/main.tf @@ -0,0 +1,34 @@ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "~> 5.0" + } + random = { + source = "hashicorp/random" + version = "~> 3.0" + } + } +} + +resource "random_id" "bucket_suffix" { + byte_length = 4 +} + +resource "google_storage_bucket" "public_bucket" { + name = "public-assets-${random_id.bucket_suffix.hex}" + location = "US" + uniform_bucket_level_access = true + public_access_prevention = "inherited" + force_destroy = true + + versioning { + enabled = true + } +} + +resource "google_storage_bucket_iam_member" "public_read" { + bucket = google_storage_bucket.public_bucket.name + role = "roles/storage.objectViewer" + member = "allUsers" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-002/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-002/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..19d51205642283f2dabd82751a192842f0cfbdc8 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-002/main.tf @@ -0,0 +1,58 @@ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "~> 5.0" + } + } +} + +provider "google" { + project = "YOUR_PROJECT_ID" + region = "us-central1" +} + +resource "google_compute_network" "vpc" { + name = "open-vpc" + auto_create_subnetworks = true +} + +resource "google_compute_firewall" "allow_all" { + name = "allow-all-ingress" + network = google_compute_network.vpc.name + + allow { + protocol = "all" + } + + source_ranges = ["0.0.0.0/0"] + target_tags = ["open-ports"] +} + +resource "google_compute_instance" "vm" { + name = "public-open-vm" + machine_type = "e2-medium" + zone = "us-central1-a" + + tags = ["open-ports"] + + boot_disk { + initialize_params { + image = "debian-cloud/debian-12" + type = "pd-standard" + size = 20 + } + } + + network_interface { + network = google_compute_network.vpc.name + + access_config { + network_tier = "PREMIUM" + } + } + + metadata = { + block-project-ssh-keys = "true" + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-003/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-003/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..7ac4f6f6f83218d11c2cce04479401613e27c800 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-003/main.tf @@ -0,0 +1,48 @@ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "~> 5.0" + } + random = { + source = "hashicorp/random" + version = "~> 3.0" + } + } +} + +resource "random_id" "db_name_suffix" { + byte_length = 4 +} + +resource "google_sql_database_instance" "postgres" { + name = "postgres-instance-${random_id.db_name_suffix.hex}" + database_version = "POSTGRES_15" + region = "us-central1" + + settings { + tier = "db-custom-2-7680" + + ip_configuration { + ipv4_enabled = true + + authorized_networks { + name = "allow-all" + value = "0.0.0.0/0" + } + } + + backup_configuration { + enabled = true + point_in_time_recovery_enabled = true + transaction_log_retention_days = 7 + } + + disk_autoresize = true + disk_autoresize_limit = 0 + disk_size = 100 + disk_type = "PD_SSD" + } + + deletion_protection = true +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-004/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-004/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..4e694dfa76497189cfd3c4c738206410e1b50534 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-004/main.tf @@ -0,0 +1,4 @@ +resource "google_compute_network" "vpc_network" { + name = "my-vpc-network" + auto_create_subnetworks = true +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-005/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-005/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..275742fa7eaec24e88df45f206be5a91496385a2 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-005/main.tf @@ -0,0 +1,65 @@ +variable "project_id" { + type = string + description = "The GCP project ID" +} + +variable "region" { + type = string + description = "The GCP region" + default = "us-central1" +} + +variable "zone" { + type = string + description = "The GCP zone for the cluster" + default = "us-central1-a" +} + +provider "google" { + project = var.project_id + region = var.region +} + +resource "google_compute_network" "vpc" { + name = "gke-vpc" + auto_create_subnetworks = false +} + +resource "google_compute_subnetwork" "subnet" { + name = "gke-subnet" + region = var.region + network = google_compute_network.vpc.name + ip_cidr_range = "10.10.0.0/24" +} + +resource "google_container_cluster" "primary" { + name = "abac-enabled-cluster" + location = var.zone + + network = google_compute_network.vpc.name + subnetwork = google_compute_subnetwork.subnet.name + + # Enable legacy ABAC authorization + enable_legacy_abac = true + + # Best practice: remove the default node pool and manage node pools separately + remove_default_node_pool = true + initial_node_count = 1 + + deletion_protection = false +} + +resource "google_container_node_pool" "primary_nodes" { + name = "primary-node-pool" + location = var.zone + cluster = google_container_cluster.primary.name + node_count = 1 + + node_config { + machine_type = "e2-standard-2" + + oauth_scopes = [ + "https://www.googleapis.com/auth/cloud-platform" + ] + } +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-006/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-006/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..64ccae70256339503aad8fb12b0a289fc18b107b --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-006/main.tf @@ -0,0 +1,73 @@ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "~> 4.0" + } + archive = { + source = "hashicorp/archive" + version = "~> 2.0" + } + random = { + source = "hashicorp/random" + version = "~> 3.0" + } + } +} + +variable "project_id" { + type = string + description = "The GCP project ID" +} + +variable "region" { + type = string + default = "us-central1" + description = "The GCP region" +} + +resource "random_id" "bucket_suffix" { + byte_length = 8 +} + +resource "google_storage_bucket" "source_bucket" { + name = "gcf-source-${random_id.bucket_suffix.hex}" + location = var.region + project = var.project_id + uniform_bucket_level_access = true +} + +data "archive_file" "source_zip" { + type = "zip" + source_dir = "${path.module}/function_source" + output_path = "${path.module}/function_source.zip" +} + +resource "google_storage_bucket_object" "source_archive" { + name = "source-${data.archive_file.source_zip.output_md5}.zip" + bucket = google_storage_bucket.source_bucket.name + source = data.archive_file.source_zip.output_path +} + +resource "google_cloudfunctions_function" "public_function" { + name = "public-function" + project = var.project_id + region = var.region + description = "Publicly accessible Cloud Function" + runtime = "nodejs18" + + available_memory_mb = 256 + source_archive_bucket = google_storage_bucket.source_bucket.name + source_archive_object = google_storage_bucket_object.source_archive.name + trigger_http = true + entry_point = "helloWorld" +} + +resource "google_cloudfunctions_function_iam_member" "public_invoker" { + project = google_cloudfunctions_function.public_function.project + region = google_cloudfunctions_function.public_function.region + cloud_function = google_cloudfunctions_function.public_function.name + + role = "roles/cloudfunctions.invoker" + member = "allUsers" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-007/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-007/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..1039c412175ebca680c1e437e9c34512881dbd46 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-007/main.tf @@ -0,0 +1,21 @@ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "~> 5.0" + } + } +} + +resource "google_bigquery_dataset" "public_dataset" { + dataset_id = "public_dataset" + friendly_name = "Public Dataset" + description = "Dataset with public read access" + location = "US" +} + +resource "google_bigquery_dataset_iam_member" "public_read_access" { + dataset_id = google_bigquery_dataset.public_dataset.dataset_id + role = "roles/bigquery.dataViewer" + member = "allUsers" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-008/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-008/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..22fd98b2956d025c29f1bc35e08db7999400b67e --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-008/main.tf @@ -0,0 +1,30 @@ +terraform { + required_providers { + google = { + source = "hashicorp/google" + version = "~> 5.0" + } + } +} + +variable "topic_name" { + type = string + description = "The name of the Pub/Sub topic" + default = "public-topic" +} + +resource "google_pubsub_topic" "topic" { + name = var.topic_name +} + +resource "google_pubsub_topic_iam_member" "all_users_publisher" { + topic = google_pubsub_topic.topic.name + role = "roles/pubsub.publisher" + member = "allUsers" +} + +resource "google_pubsub_topic_iam_member" "all_users_viewer" { + topic = google_pubsub_topic.topic.name + role = "roles/pubsub.viewer" + member = "allUsers" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-009/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-009/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..fa91e52fcd74be2f1d2165ff70d21876e5a713f3 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-009/main.tf @@ -0,0 +1,22 @@ +variable "project_id" { + type = string + description = "The ID of the GCP project" +} + +variable "account_id" { + type = string + description = "The service account ID" + default = "project-editor-sa" +} + +resource "google_service_account" "sa" { + project = var.project_id + account_id = var.account_id + display_name = "Project Editor Service Account" +} + +resource "google_project_iam_member" "sa_editor_role" { + project = var.project_id + role = "roles/editor" + member = "serviceAccount:${google_service_account.sa.email}" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/gcp-tf-010/main.tf b/generated/simple/gemini-3.1-pro/gcp-tf-010/main.tf new file mode 100644 index 0000000000000000000000000000000000000000..d6ab2b2d4e6a114f7b7050fa46dbfcbd5d3dff10 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/gcp-tf-010/main.tf @@ -0,0 +1,26 @@ +resource "google_cloud_run_v2_service" "public_service" { + name = "public-cloudrun-service" + location = "us-central1" + ingress = "INGRESS_TRAFFIC_ALL" + + template { + containers { + image = "us-docker.pkg.dev/cloudrun/container/hello" + + resources { + limits = { + cpu = "1000m" + memory = "512Mi" + } + } + } + } +} + +resource "google_cloud_run_v2_service_iam_member" "public_access" { + project = google_cloud_run_v2_service.public_service.project + location = google_cloud_run_v2_service.public_service.location + name = google_cloud_run_v2_service.public_service.name + role = "roles/run.invoker" + member = "allUsers" +} \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-001/main.yaml b/generated/simple/gemini-3.1-pro/k8s-001/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..8e68f6d99840abcc3a4751582901b16783d36031 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-001/main.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nginx-deployment + labels: + app: nginx +spec: + replicas: 1 + selector: + matchLabels: + app: nginx + template: + metadata: + labels: + app: nginx + spec: + containers: + - name: nginx + image: nginx:stable-alpine + ports: + - containerPort: 80 + name: http + protocol: TCP + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 250m + memory: 256Mi +--- +apiVersion: v1 +kind: Service +metadata: + name: nginx-nodeport-service + labels: + app: nginx +spec: + type: NodePort + selector: + app: nginx + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-002/main.yaml b/generated/simple/gemini-3.1-pro/k8s-002/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e6dee2e9862be0b5c587f91841eacb8818005ad9 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-002/main.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: root-deployment + labels: + app: root-app +spec: + replicas: 1 + selector: + matchLabels: + app: root-app + template: + metadata: + labels: + app: root-app + spec: + containers: + - name: root-container + image: alpine:latest + command: ["sleep", "infinity"] + securityContext: + runAsUser: 0 + runAsGroup: 0 + runAsNonRoot: false \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-003/main.yaml b/generated/simple/gemini-3.1-pro/k8s-003/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9b6731ffc229394afeaf3d492f3bbc73099d55ac --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-003/main.yaml @@ -0,0 +1,30 @@ +apiVersion: v1 +kind: Pod +metadata: + name: hostnetwork-pod + namespace: default + labels: + app: hostnetwork-pod +spec: + hostNetwork: true + dnsPolicy: ClusterFirstWithHostNet + containers: + - name: nginx + image: nginx:1.25-alpine + ports: + - containerPort: 80 + protocol: TCP + resources: + requests: + cpu: 100m + memory: 128Mi + limits: + cpu: 250m + memory: 256Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + add: + - NET_BIND_SERVICE \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-004/main.yaml b/generated/simple/gemini-3.1-pro/k8s-004/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9388029b55d3241f03394777325c70ae04b5f057 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-004/main.yaml @@ -0,0 +1,12 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: default-cluster-admin +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: cluster-admin +subjects: +- kind: ServiceAccount + name: default + namespace: default \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-005/main.yaml b/generated/simple/gemini-3.1-pro/k8s-005/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..d26950ceead2e2198753427d464f6ec93479bc8b --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-005/main.yaml @@ -0,0 +1,23 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: web-ingress + namespace: default + labels: + app.kubernetes.io/name: web-app + app.kubernetes.io/environment: production + annotations: + nginx.ingress.kubernetes.io/rewrite-target: / +spec: + ingressClassName: nginx + rules: + - host: app.example.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: web-service + port: + number: 80 \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-006/main.yaml b/generated/simple/gemini-3.1-pro/k8s-006/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9651161cdb1f83fb741524dc98d9778518c5f37c --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-006/main.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: privileged-deployment + namespace: default + labels: + app: privileged-app +spec: + replicas: 1 + selector: + matchLabels: + app: privileged-app + template: + metadata: + labels: + app: privileged-app + spec: + containers: + - name: privileged-container + image: alpine:latest + command: ["/bin/sh", "-c", "sleep infinity"] + securityContext: + privileged: true + allowPrivilegeEscalation: true \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-007/main.yaml b/generated/simple/gemini-3.1-pro/k8s-007/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..b40433d0defe583abc61289933ce716f9431f3a6 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-007/main.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Secret +metadata: + name: db-credentials + namespace: default + labels: + app: database +type: Opaque +stringData: + DB_HOST: "db.example.com" + DB_PORT: "5432" + DB_NAME: "production_db" + DB_USER: "admin" + DB_PASSWORD: "super-secret-password" \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-008/main.yaml b/generated/simple/gemini-3.1-pro/k8s-008/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..606eb23425bd3a939724b5c7553399ccc8781854 --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-008/main.yaml @@ -0,0 +1,35 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: docker-sock-daemonset + namespace: default + labels: + app: docker-sock-mounter +spec: + selector: + matchLabels: + app: docker-sock-mounter + template: + metadata: + labels: + app: docker-sock-mounter + spec: + containers: + - name: docker-client + image: docker:cli + command: ["/bin/sh", "-c", "tail -f /dev/null"] + resources: + requests: + cpu: 10m + memory: 32Mi + limits: + cpu: 100m + memory: 128Mi + volumeMounts: + - name: docker-sock + mountPath: /var/run/docker.sock + volumes: + - name: docker-sock + hostPath: + path: /var/run/docker.sock + type: Socket \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-009/main.yaml b/generated/simple/gemini-3.1-pro/k8s-009/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..f297115ab3b762e63e0570e3d6d08e9bc728767b --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-009/main.yaml @@ -0,0 +1,22 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: redis + labels: + app: redis +spec: + replicas: 1 + selector: + matchLabels: + app: redis + template: + metadata: + labels: + app: redis + spec: + containers: + - name: redis + image: redis:7.2-alpine + ports: + - containerPort: 6379 + name: redis \ No newline at end of file diff --git a/generated/simple/gemini-3.1-pro/k8s-010/main.yaml b/generated/simple/gemini-3.1-pro/k8s-010/main.yaml new file mode 100644 index 0000000000000000000000000000000000000000..e7263c9078a06b05455bbc77619a751e3a6bb75b --- /dev/null +++ b/generated/simple/gemini-3.1-pro/k8s-010/main.yaml @@ -0,0 +1,14 @@ +apiVersion: networking.k8s.io/v1 +kind: NetworkPolicy +metadata: + name: allow-all + namespace: default +spec: + podSelector: {} + policyTypes: + - Ingress + - Egress + ingress: + - {} + egress: + - {} \ No newline at end of file