Skip to content

Commit

Permalink
Enforce the allowed values for the SpotProductDescription CloudFormat…
Browse files Browse the repository at this point in the history
…ion stack parameter
  • Loading branch information
cristim committed Feb 10, 2018
1 parent d304877 commit 659f81d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
7 changes: 6 additions & 1 deletion cloudformation/stacks/AutoSpotting/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@
# This file is handled automatically using the clouds-aws tool. It can be
# installed using pip, or from https://github.com/elias5000/clouds-aws
LambdaZipPath: nightly/lambda.zip
LambdaHandlerFunction: autospotting
LambdaHandlerFunction: autospotting # Changed after the Lambda runtime was switched to Go, changing this value requires stack re-creation or also an update of the LambdaZipPath
LambdaS3Bucket: cloudprowess
LambdaMemorySize: '1024'
ExecutionFrequency: "rate(1 minute)"
MinOnDemandNumber: '1'

# Valid choices:
# - for EC2 Classic environments: Linux/UNIX | SUSE Linux | Windows
# - for VPC: Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)
SpotProductDescription: "Linux/UNIX (Amazon VPC)"
18 changes: 15 additions & 3 deletions cloudformation/stacks/AutoSpotting/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,26 @@
"Type": "Number"
},
"SpotProductDescription": {
"Default": "Linux/Unix (Amazon VPC)",
"Default": "Linux/UNIX (Amazon VPC)",
"Description": "The Spot Product or operating system to use when looking up spot price history in the market. Valid choices: Linux/UNIX | SUSE Linux | Windows | Linux/UNIX (Amazon VPC) | SUSE Linux (Amazon VPC) | Windows (Amazon VPC)",
"Type": "String"
"Type": "String",
"AllowedValues" : [
"Linux/UNIX",
"SUSE Linux",
"Windows",
"Linux/UNIX (Amazon VPC)",
"SUSE Linux (Amazon VPC)",
"Windows (Amazon VPC)"
]
},
"BiddingPolicy": {
"Default": "normal",
"Description": "Policy choice for spot bid. If set to 'normal', we bid at the on-demand price. If set to 'aggressive', we bid at a multiple of the spot price.",
"Type": "String"
"Type": "String",
"AllowedValues" : [
"normal",
"aggressive"
]
},
"Regions": {
"Default": "",
Expand Down

0 comments on commit 659f81d

Please sign in to comment.