(use-modules (aws cloudformation) (aws cloudformation ec2) (aws cloudformation s3) (aws cloudformation utils) (aws cloudformation utils json) (oop goops)) (define security-group (make #:id 'security-group #:group-description "CFN Test" #:vpc-id "vpc-redacted" #:security-group-egress (list (make #:ip-protocol "tcp" #:cidr-ip "0.0.0.0/0" #:from-port 22 #:to-port 22)) #:security-group-ingress (list (make #:ip-protocol "tcp" #:cidr-ip "0.0.0.0/0" #:from-port 0 #:to-port 65535)))) (define ec2-instance (make #:id 'instance #:image-id "ami-0bbe6b35405ecebdb" #:key-name "dthompson" #:instance-type "t3.nano" #:security-group-ids (list security-group) #:tags (list (make #:key "Name" #:value "CFN Test")))) (define bucket (make #:id 'bucket #:bucket-name "foo.example.com")) (define stack (make #:resources (list ec2-instance bucket))) (write-json (to-json stack) (current-output-port)) (newline)