Skip to content

Commit

Permalink
fix: default vars
Browse files Browse the repository at this point in the history
  • Loading branch information
mvayngrib committed Oct 29, 2018
1 parent fa76cbd commit e3e5a01
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 34 deletions.
3 changes: 2 additions & 1 deletion default-vars.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
"BlockchainNetwork": "ethereum:rinkeby",
"OrgName": "Super Awesome Org",
"OrgDomain": "superawesome.org",
"OrgLogo": "https://s3.amazonaws.com/tradle-public-images/logo/unknown.png"
"OrgLogo": "https://s3.amazonaws.com/tradle-public-images/logo/unknown.png",
"OrgAdminEmail": "mark@tradle.io"
},
"corda": {
"apiKey": "abc",
Expand Down
38 changes: 11 additions & 27 deletions serverless-uncompiled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ custom:
# logging: ${{self:custom.vars.logging, self:custom.defaults.logging}}

# copied from vars.json
# emailForNotifications: ${{self:custom.vars.emailForNotifications}}
# blockchain: ${{self:custom.vars.blockchain}}
# thresholdBillingAlarm: ${{self:custom.vars.thresholdBillingAlarm, self:custom.defaults.thresholdBillingAlarm}}
thresholdThrottlingAlarm: ${{self:custom.vars.thresholdThrottlingAlarm, self:custom.defaults.thresholdThrottlingAlarm}}
Expand All @@ -113,9 +112,6 @@ custom:

# versions
versionSQL: "2016-03-23"
emailForNotifications:
${{self:custom.vars.emailForNotifications, self:custom.defaults.emailForNotifications}}

s3TemplatesPath: ${{self:custom.version.templatesPath}}

# sns
Expand Down Expand Up @@ -1199,38 +1195,25 @@ resources:

OrgName:
Type: String
# Default: ${{self:custom.org.name}}
# AllowedValues:
# - ${{self:custom.org.name}}

OrgDomain:
Type: String
# Default: ${{self:custom.org.domain}}
# AllowedValues:
# - ${{self:custom.org.domain}}

OrgLogo:
Type: String
# Default: ${{self:custom.org.logo}}
# AllowedValues:
# - ${{self:custom.org.logo}}

OrgAdminEmail:
Type: String
# Default: ${{self:custom.emailForNotifications}}
# AllowedValues:
# - ${{self:custom.emailForNotifications}}

# Configuration group

BlockchainNetwork:
Type: String
Default: ${{self:custom.blockchain}}
Default: 'ethereum:rinkeby'
AllowedValues:
- ${{self:custom.blockchain}}
# - 'ethereum:mainnet'
# - 'ethereum:rinkeby'
# - 'ethereum:ropsten'
- 'ethereum:mainnet'
- 'ethereum:rinkeby'
- 'ethereum:ropsten'

AutoScalingEnabled:
Type: String
Expand Down Expand Up @@ -1282,9 +1265,10 @@ resources:

Stage:
Type: String
Default: ${{self:custom.stage}}
Default: dev
AllowedValues:
- ${{self:custom.stage}}
- dev
- prod

Metadata:
AWS::CloudFormation::Interface:
Expand Down Expand Up @@ -1706,10 +1690,10 @@ resources:
- Ref: ApiGatewayRestApi
- .execute-api.us-east-1.amazonaws.com/dev

# serverless usually generates this
ServerlessDeploymentBucketName:
Value:
Fn::GetAtt: Buckets.Outputs.Deployment
# let serverless generate this
# ServerlessDeploymentBucketName:
# Value:
# Fn::GetAtt: Buckets.Outputs.Deployment

SourceDeploymentBucketName:
Value:
Expand Down
13 changes: 7 additions & 6 deletions templates/vars.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"service": "tdl-superawesome-ltd",
"region": "us-east-1",
"org": {
"name": "Super",
"domain": "superawesome.org",
"logo": "https://s3.amazonaws.com/tradle-public-images/logo/unknown.png"
},
"emailForNotifications": "mark@tradle.io"
"stackParameters": {
"BlockchainNetwork": "ethereum:rinkeby",
"OrgName": "Super Awesome Org",
"OrgDomain": "superawesome.org",
"OrgLogo": "https://s3.amazonaws.com/tradle-public-images/logo/unknown.png",
"OrgAdminEmail": "mark@tradle.io"
}
}

0 comments on commit e3e5a01

Please sign in to comment.