forked from classmethod/gradle-aws-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
59 lines (52 loc) · 1.48 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
// -*- coding: utf-8; mode: groovy -*-
import jp.classmethod.aws.gradle.rds.AmazonRDSDeleteDBInstanceTask;
import jp.classmethod.aws.gradle.rds.AmazonRDSMigrateDBInstanceTask;
import jp.classmethod.aws.gradle.rds.AmazonRDSRebootDBInstanceTask;
import jp.classmethod.aws.gradle.rds.AmazonRDSWaitInstanceStatusTask;
buildscript {
repositories {
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
dependencies {
classpath "jp.classmethod.aws:gradle-aws-plugin:0.+"
}
}
apply plugin: "jp.classmethod.aws.rds"
aws {
profileName = "default"
region = "ap-northeast-1"
}
task migrateDBInstance(type: AmazonRDSMigrateDBInstanceTask) {
dbInstanceIdentifier = "foobar"
allocatedStorage = 5
dbInstanceClass = "db.t2.micro"
engine = "MySQL"
masterUsername = "root"
masterUserPassword = "passW0rd"
vpcSecurityGroupIds = [ "sg-d3958fbf" ]
dbSubnetGroupName = "default"
multiAZ = false
publiclyAccessible = true
}
task rebootDBInstance(type: AmazonRDSRebootDBInstanceTask) {
dbInstanceIdentifier = "foobar"
}
task deleteDBInstance(type: AmazonRDSDeleteDBInstanceTask) {
dbInstanceIdentifier = "foobar"
skipFinalSnapshot = true
}
task waitDBInstanceStatus(type: AmazonRDSWaitInstanceStatusTask) {
dbInstanceIdentifier = "foobar"
successStatuses = [ "available", "terminated" ]
waitStatuses = [
"backing-up",
"creating",
"deleting",
"modifying",
"rebooting",
"renaming",
"resetting-master-credentials"
]
mustRunAfter migrateDBInstance, rebootDBInstance, deleteDBInstance
}