Some ChatGPT results

 I thought I'd post a couple of the better responses from ChatGPT that I've had recently. The first one is a general story outline and the second generated AWS Cloudformation code. Though the plot outline was pretty generic, I think I could use that to get past some writer's block. But then again I don't write a lot of fictional stories so maybe an experienced writer might not find this useful. As for the cloudformation, the responses were really good. Now, I am experienced in writing a lot of cloudformation templates and I can say that while it's not perfect, the templates it generated were useable. With only some minor changes I could deploy them basically as-in and push up a stack. 


Story Outline

Prompt:

write a fictional story outline

  • protagonist "josef" is a flawed character
  • villain hides in plain sight
  • heroine overcame a childhood bully
  • protagonist and villain have shared history with heroine
  • protagonist and villain play a chess match to determine the fate of the world
Response:

Title: "The Final Move"

Outline:

Josef, the protagonist, is a brilliant but arrogant chess player who is haunted by his past mistakes.
The villain, a former friend and rival of Josef, has been pulling the strings behind a global conspiracy, manipulating world leaders and hiding in plain sight as a successful businessman.
The heroine, a childhood friend of both Josef and the villain, has overcome her traumatic past of being bullied and becomes a key player in uncovering the villain's plans.
As the villain's machinations come to a head, Josef and the villain are forced to confront each other in a high-stakes chess match, with the fate of the world hanging in the balance.
As the match unfolds, Josef must confront his own flaws and past failures, while the villain's true nature and motives are revealed.
In the end, the match reaches a dramatic conclusion as Josef and the villain make their final move, and the fate of the world is decided.

Cloudformation template

Prompt:

create aws cloudformation template
  • ec2 t3.medium
  • ec2 is server 2019 base
  • ec2 has public ip address
  • ec2 has 60gb ebs gp2 volume
  • ec2 uses existing keypair named "oregon-keypair"
Response:
---
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  EC2Instance:
    Type: AWS::EC2::Instance
    Properties:
      InstanceType: t3.medium
      ImageId: ami-09d95fab7eff77e67
      KeyName: oregon-keypair
      BlockDeviceMappings:
      - DeviceName: "/dev/xvda"
        Ebs:
          VolumeSize: '60'
          VolumeType: gp2
      NetworkInterfaces:
      - AssociatePublicIpAddress: true


Prompt:

 create aws cloudformation template

  • create vpc with two public subnets
  • security group that allows ping and rdp to ec2 instance
  • vpc has igw
  • ec2 has public ip address

Response:

---
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  VPC:
    Type: 'AWS::EC2::VPC'
    Properties:
      CidrBlock: '10.0.0.0/16'
      EnableDnsSupport: true
      EnableDnsHostnames: true
      InstanceTenancy: default
  PublicSubnet1:
    Type: 'AWS::EC2::Subnet'
    Properties:
      VpcId: !Ref VPC
      CidrBlock: '10.0.1.0/24'
      AvailabilityZone: 'us-west-2a'
      MapPublicIpOnLaunch: true
  PublicSubnet2:
    Type: 'AWS::EC2::Subnet'
    Properties:
      VpcId: !Ref VPC
      CidrBlock: '10.0.2.0/24'
      AvailabilityZone: 'us-west-2b'
      MapPublicIpOnLaunch: true
  InternetGateway:
    Type: 'AWS::EC2::InternetGateway'
  VPCGatewayAttachment:
    Type: 'AWS::EC2::VPCGatewayAttachment'
    Properties:
      VpcId: !Ref VPC
      InternetGatewayId: !Ref InternetGateway
  RouteTable:
    Type: 'AWS::EC2::RouteTable'
    Properties:
      VpcId: !Ref VPC
  Route:
    Type: 'AWS::EC2::Route'
    DependsOn: VPCGatewayAttachment
    Properties:
      RouteTableId: !Ref RouteTable
      DestinationCidrBlock: 0.0.0.0/0
      GatewayId: !Ref InternetGateway
  SubnetRouteTableAssociation1:
    Type: 'AWS::EC2::SubnetRouteTableAssociation'
    Properties:
      SubnetId: !Ref PublicSubnet1
      RouteTableId: !Ref RouteTable
  SubnetRouteTableAssociation2:
    Type: 'AWS::EC2::SubnetRouteTableAssociation'
    Properties:
      SubnetId: !Ref PublicSubnet2
      RouteTableId: !Ref RouteTable
  SecurityGroup:
    Type: 'AWS::EC2::SecurityGroup'
    Properties:
      GroupName: 'WindowsEC2SecurityGroup'
      GroupDescription: 'Security group for Windows EC2 instance'
      VpcId: !Ref VPC
      SecurityGroupIngress:
        - IpProtocol: 'tcp'
          FromPort: '3389'
          ToPort: '3389'
          CidrIp: '0.0.0.0/0'
        - IpProtocol: 'icmp'
          FromPort: '-1'
          ToPort: '-1'
          CidrIp: '0.0.0.0/0'




 

Post a Comment

Previous Post Next Post