Skip to content

Instantly share code, notes, and snippets.

@marcy-terui
Last active December 22, 2015 01:55
Show Gist options
  • Save marcy-terui/ee34cb463ab5ca167efa to your computer and use it in GitHub Desktop.
Save marcy-terui/ee34cb463ab5ca167efa to your computer and use it in GitHub Desktop.
JSONなアレに疲れたアナタに贈るGoogle Cloud Deployment Managerのススメ ref: http://qiita.com/marcy-terui/items/1d19aa089fd076873180
imports:
- path: path/to/template.yml
- path: path/to/template.jinja
- path: path/to/template.py
{
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "sample",
"Resources" : {
"MyDB" : {
"Type" : "AWS::RDS::DBInstance",
"Properties" : {
"DBName" : "DBName" ,
"AllocatedStorage" : "5",
"DBInstanceClass" : "db.t2.small",
"Engine" : "MySQL",
"EngineVersion" : "5.6.19",
"MasterUsername" : "DBUser",
"MasterUserPassword" : "DBPassword",
"DBParameterGroupName" : { "Ref" : "MyRDSParamGroup" }
}
},
"MyRDSParamGroup" : {
"Type": "AWS::RDS::DBParameterGroup",
"Properties" : {
"Family" : "MySQL5.6",
"Description" : "CloudFormation Sample Database Parameter Group",
"Parameters" : {
"character-set-server" : "utf8mb4",
"collation-server": "utf8mb4_general_ci"
}
}
}
}
}
resources:
- name: sample-cloudsql
type: sqladmin.v1beta4.instance
properties:
region: us-central
instanceType: CLOUD_SQL_INSTANCE
settings:
tier: D1
activationPolicy: ON_DEMAND
- name: sample_database
type: sqladmin.v1beta4.database
properties:
instance: $(ref.sample-cloudsql.name)
charset: utf8mb4
collation: utf8mb4_general_ci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment