From 68e13e0aec50a12b343aec8c2009162e4dbc08de Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 28 Nov 2018 12:44:54 -0500 Subject: First working version. --- test.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 test.scm (limited to 'test.scm') diff --git a/test.scm b/test.scm new file mode 100644 index 0000000..5e40f6c --- /dev/null +++ b/test.scm @@ -0,0 +1,46 @@ +(use-modules ;;(aws cloudformation) + (aws cloudformation universal) + (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) -- cgit v1.2.3