stratosphere 0.26.0 → 0.26.1
raw patch · 3 files changed
+6/−150 lines, 3 filesdep −aeson-qq
Dependencies removed: aeson-qq
Files
- CHANGELOG.md +4/−0
- examples/ec2-with-eip.hs +0/−124
- stratosphere.cabal +2/−26
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Change Log +## 0.26.1++* Remove dependency on `aeson-qq`+ ## 0.26.0 * Update resource specification document to version 2.8.0
− examples/ec2-with-eip.hs
@@ -1,124 +0,0 @@-{-# LANGUAGE OverloadedLists #-}-{-# LANGUAGE OverloadedStrings #-}-{-# LANGUAGE QuasiQuotes #-}---- | This is a translated version of an example from the CloudFormation docs at--- https://s3.amazonaws.com/cloudformation-templates-us-east-1/EIP_With_Association.template.--- The difference is the mappings are removed because they don't add anything--- to the exposition of stratosphere.--module Main where--import Control.Lens-import Data.Aeson-import Data.Aeson.QQ (aesonQQ)-import qualified Data.ByteString.Lazy.Char8 as B--import Stratosphere--main :: IO ()-main = B.putStrLn $ encodeTemplate myTemplate--myTemplate :: Template-myTemplate =- template- [ resource "EC2Instance" (- EC2InstanceProperties $- ec2Instance- & eciImageId ?~ "ami-22111148"- & eciInstanceType ?~ toRef instanceTypeParam- & eciKeyName ?~ toRef keyParam- & eciUserData ?~ Base64 (Join "" ["IPAddress=", toRef sshParam])- & eciSecurityGroups ?~ [Ref "InstanceSecuritygroup"]- )- & resourceDeletionPolicy ?~ Retain- & resourceMetadata ?~ ec2Metadata- , resource "InstanceSecurityGroup" $- EC2SecurityGroupProperties $- ec2SecurityGroup- "Enable SSH Access"- & ecsgSecurityGroupIngress ?~ [- ec2SecurityGroupIngressProperty- "tcp"- & ecsgipFromPort ?~ Literal 22- & ecsgipToPort ?~ Literal 22- & ecsgipCidrIp ?~ Ref "SSHLocation"- ]- , resource "IPAddress" (EC2EIPProperties ec2EIP)- , resource "IPAssoc" $- EC2EIPAssociationProperties $- ec2EIPAssociation- & eceipaInstanceId ?~ Ref "EC2Instance"- & eceipaEIP ?~ Ref "IPAddress"- ]- & templateDescription ?~ "See https://s3.amazonaws.com/cloudformation-templates-us-east-1/EIP_With_Association.template"- & templateFormatVersion ?~ "2010-09-09"- & templateParameters ?~- [ instanceTypeParam- , keyParam- , sshParam- ]- & templateOutputs ?~- [ output "InstanceId"- (Ref "EC2Instance")- & outputDescription ?~ "InstanceId of the newly created EC2 instance"- , output "InstanceIPAddress"- (Ref "IPAddress")- & outputDescription ?~ "IP address of the newly created EC2 instance"- ]--ec2Metadata :: Object-(Object ec2Metadata) = [aesonQQ|-{- "AWS::CloudFormation::Init": {- "configSets": {- "test1": ["1"],- "test2": [{"ConfigSet": "test1"}, "2"],- "default": [{"ConfigSet": "test2"}]- },- "1": {- "commands": {- "test": {- "command": "echo \"$MAGIC\" > test.txt",- "env": {"MAGIC": "I come from the environment!"},- "cwd": "~"- }- }- },- "2": {- "commands": {- "test": {- "command": "echo \"$MAGIC\" >> test.txt",- "env": {"MAGIC": "I am test 2!"},- "cwd": "~"- }- }- }- }-}-|]--instanceTypeParam :: Parameter-instanceTypeParam =- parameter "InstanceType" "String"- & parameterDescription ?~ "WebServer EC2 instance type"- & parameterDefault' ?~ "t2.small"- & parameterAllowedValues ?~ [ "t1.micro", "t2.small" ]- & parameterConstraintDescription ?~ "must be a valid EC2 instance type."--keyParam :: Parameter-keyParam =- parameter "KeyName" "AWS::EC2::KeyPair::KeyName"- & parameterDescription ?~ "Name of an existing EC2 KeyPair to enable SSH access to the instances"- & parameterConstraintDescription ?~ "must be the name of an existing EC2 KeyPair."--sshParam :: Parameter-sshParam =- parameter "SSHLocation" "String"- & parameterDescription ?~ "The IP address range that can be used to SSH to the EC2 instances"- & parameterMinLength ?~ 9- & parameterMaxLength ?~ 18- & parameterDefault' ?~ "0.0.0.0/0"- & parameterAllowedValues ?~ [ "t1.micro", "t2.small" ]- & parameterAllowedPattern ?~ "(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})/(\\d{1,2})"- & parameterConstraintDescription ?~ "must be a valid IP CIDR range of the form x.x.x.x/x."
stratosphere.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 962710ab05cb0bbc5c857558fef6b2e9340ce4cafc1e4884af35aa5596dbe3fd+-- hash: 6902720cc395da955d08f5dff4d08bdd8a1ae475a06a7452c2d55b931843e4f2 name: stratosphere-version: 0.26.0+version: 0.26.1 synopsis: EDSL for AWS CloudFormation description: EDSL for AWS CloudFormation category: AWS, Cloud@@ -1008,30 +1008,6 @@ build-depends: aeson >=0.11 , aeson-pretty >=0.8- , base >=4.8 && <5- , bytestring- , containers- , hashable- , lens >=4.5- , stratosphere- , template-haskell >=2.0- , text >=1.1- , unordered-containers >=0.2- if flag(library-only)- buildable: False- default-language: Haskell2010--executable ec2-with-eip- main-is: ec2-with-eip.hs- other-modules:- Paths_stratosphere- hs-source-dirs:- examples- ghc-options: -Wall- build-depends:- aeson >=0.11- , aeson-pretty >=0.8- , aeson-qq , base >=4.8 && <5 , bytestring , containers