Skip to content

sara62/sbt-aws-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sbt-aws-plugin

Build Status Maven Central Scaladoc Reference Status

Installation

Add the following to your project/plugin.sbt (Scala 2.10.x, and Scala 2.11.x):

Release Version

resolvers += "Sonatype OSS Release Repository" at "https://oss.sonatype.org/content/repositories/releases/"

addSbtPlugin("org.sisioh" % "sbt-aws-plugin" % "1.0.3")

Snapshot Version

resolvers += "Sonatype OSS Snapshot Repository" at "https://oss.sonatype.org/content/repositories/snapshots/"

addSbtPlugin("org.sisioh" % "sbt-aws-plugin" % "1.0.4-SNAPSHOT")

Usage

Configuration File Support by Typesafe Config

env/dev.conf is loaded, in defaults.

"aws": {

  "cfnStackName": "test1"

  "cfnStackParams": {
    "S3BucketName0": "test1-dmmy-test-00001",
    "S3BucketName1": "test1-dmmy-test-00002"
  }

}

The above is the same mean as the following.

cfnStackName in aws := "test1",
cfnStackParams in aws := Map(
   "S3BucketName0" -> "test1-dmmy-test-00001",
   "S3BucketName1" -> "test1-dmmy-test-00002",
)

Profile Function

You can switch the configuration file by specifying the -Daws.env.

env/staging.conf is loaded.

$ sbt -Daws.env=staging aws::CfnStackCreateOrUpdate

CloudFormation Functions

  • Put the CloudFormation template files in the 'aws/cfn/templates' folder
aws/cfn/templates
  + s3.template
  + rds.template
  • Set the value to the setting item into build.sbt.
val root = (project in file(".").settings(
    region in aws := com.amazonaws.regions.Regions.AP_NORTHEAST_1,
    cfnStackName in aws := "stackA",
    cfnStackParams in aws := Map("key" -> "value")
)
  • Create the stack, or Update it
$ sbt aws::CfnStackCreateOrUpdate

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Scala 100.0%