This repository has been archived by the owner on Jul 7, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 59
/
mysql-vpc-definition.go
65 lines (60 loc) · 1.87 KB
/
mysql-vpc-definition.go
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
60
61
62
63
64
65
package cloudsql
import (
"github.com/GoogleCloudPlatform/gcp-service-broker/pkg/broker"
"github.com/pivotal-cf/brokerapi"
)
const mySQLVPCID = "b48d2a6b-b1b0-499f-8389-57ba33bfbb19"
// MySQLVPCServiceDefinition creates a new ServiceDefinition object for the MySQL service
// on a VPC.
func MySQLVPCServiceDefinition() *broker.ServiceDefinition {
definition := buildDatabase(cloudSQLOptions{
DatabaseType: mySQLDatabaseType,
CustomizableActivationPolicy: false,
AdminControlsTier: false,
AdminControlsMaxDiskSize: false,
VPCNetwork: true,
})
definition.Id = mySQLVPCID
definition.Plans = []broker.ServicePlan{
{
ServicePlan: brokerapi.ServicePlan{
ID: "89e2c84e-4d5c-457c-ad14-329dcf44b806",
Name: "default",
Description: "MySQL attached to a VPC",
Free: brokerapi.FreeValue(false),
},
ServiceProperties: map[string]string{},
},
}
definition.Examples = []broker.ServiceExample{
{
Name: "HA Instance",
Description: "A regionally available database with automatic failover.",
PlanId: "89e2c84e-4d5c-457c-ad14-329dcf44b806",
ProvisionParams: map[string]interface{}{
"tier": "db-n1-standard-1",
"backups_enabled": "true",
"binlog": "true",
"availability_type": "REGIONAL",
},
BindParams: map[string]interface{}{
"role": "cloudsql.editor",
},
},
{
Name: "Development Sandbox",
Description: "An inexpensive MySQL sandbox for developing with no backups.",
PlanId: "89e2c84e-4d5c-457c-ad14-329dcf44b806",
ProvisionParams: map[string]interface{}{
"tier": "db-n1-standard-1",
"backups_enabled": "false",
"binlog": "false",
"disk_size": "10",
},
BindParams: map[string]interface{}{
"role": "cloudsql.editor",
},
},
}
return definition
}