[ch5781] | Piyush | Add multi az support for db

This commit is contained in:
piyush-sinha
2020-03-27 00:16:42 +05:30
parent c85261d949
commit fb4e03de3c
4 changed files with 28 additions and 23 deletions

View File

@@ -201,25 +201,26 @@ func bindataTemplatesRdstfDeploysh() (*asset, error) {
} }
var _bindataTemplatesRdstfMaintf = []byte( var _bindataTemplatesRdstfMaintf = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x93\x4f\x8f\xda\x30\x10\xc5\xef\xf9\x14\x23\xee\x09\xad\x7a\xa8\x84" + "\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xa4\x93\xcd\x6e\xdb\x3a\x10\x85\xf7\x7a\x8a\x81\xf7\x92\xef\x45\x17\x05" +
"\x84\xd4\x3f\xd0\x6a\x7b\xa8\x56\xed\xb6\xd7\x68\xe2\x4c\x82\x15\xc7\x0e\x1e\x07\x96\x65\xf3\xdd\xab\xd8\xc9\x16" + "\x02\x18\x68\xda\xa4\x45\x0a\xb4\x08\xda\xb4\x8b\x6e\x84\x11\x35\x92\x09\xf1\x47\xe1\x90\x71\x12\xc7\xef\x5e\x50" +
"\x04\x0b\x54\xcd\x09\x26\xef\xfd\xe6\xf9\x61\x1c\x59\x8b\x85\xb1\x35\xec\x23\x80\x0c\x45\x45\x3a\x87\x09\xbf\x9b" + "\xb4\x52\x0b\xb6\x13\x17\xe5\xca\x1e\xce\x39\xf3\xcd\x31\xed\xc9\x39\x6c\xac\xd3\xb0\xce\x00\x2a\x14\x1d\x99\x1a" +
"\xf8\x01\x40\xd6\x8a\x8a\x1c\x1c\x3f\x73\x98\x68\xdc\xc8\x38\x43\x5d\xc5\x2f\x88\x58\x98\xba\x46\x9d\xc7\xec\xd0" + "\x66\xfc\x66\x36\x14\x00\xaa\x20\x3a\xf2\x30\x3d\x0b\x98\x19\xbc\x93\x79\x85\xa6\xcb\x9f\x2d\x72\x61\xb5\x46\x53" +
"\xd1\xc4\xdb\x2d\x95\xd2\xe8\x53\x3b\x36\x31\x9b\xd6\xad\xe2\xb7\x41\x57\xd1\x0e\x4e\x9e\x39\x4c\x6c\xce\x41\xb0" + "\xe7\xec\xd1\xd3\x6c\x90\x3b\x6a\xa5\x35\xfb\x72\xec\x73\xb6\xc1\x2f\xf3\xff\x53\x5f\x47\x0f\xb0\x77\x16\x30\x73" +
"\x35\xb6\xe2\x06\x05\xa5\x15\xed\xd2\xc6\x52\x21\x1f\x07\x41\xd8\xc7\xd3\xfd\x1e\x92\xe5\xa3\xb3\xf8\x83\xd8\xb4" + "\x35\xa7\x86\x95\x75\x1d\xf7\x28\xa8\xec\xe8\xa1\xec\x1d\x35\xf2\x7e\xdb\x90\xe6\xf1\x7c\xbd\x86\xe2\xf2\xde\x3b" +
"\x56\x10\x27\x0b\x74\x98\x21\x53\x72\xa7\xd9\xa1\x16\xf4\x1d\x6b\x82\xae\x0b\xcc\xc6\x9a\x42\x2a\x3a\x59\x2a\xea" + "\xfc\x46\x6c\x83\x13\xc4\xc5\x05\x7a\xac\x90\xa9\xb8\x32\xec\xd1\x08\xfa\x8a\x9a\x60\xb3\x49\x9e\xbd\xb3\x8d\x54" +
"\x3c\x08\x50\xa8\xb3\xa9\x42\x29\xb1\xd9\x6a\xb2\x71\xd1\x2a\x15\x0b\xa3\x9d\x35\xaa\xb7\x75\x51\x17\x45\xb5\xc9" + "\xb4\x37\x54\xe8\x3a\x35\xa0\x50\x07\xa9\x52\x28\xb9\x5d\x19\x72\x79\x13\x94\xca\x85\x35\xde\x59\x15\x65\x9b\x6c" +
"\x5b\x45\x21\xbf\x6f\x32\x24\x3a\x60\x94\xd2\xcd\x66\xcc\xab\xd9\x74\x5a\x4a\xf7\xa1\x94\x6e\xd5\x66\x89\xa8\xf3" + "\x93\x65\xda\xd6\x41\x51\xe2\x1f\x92\x4c\x44\x3b\x1e\xad\xf4\x67\x67\xcc\xcb\xb3\xf9\xbc\x95\xfe\x5d\x2b\xfd\x32" +
"\xc4\x57\xeb\x48\xac\x12\xa9\xa7\xfe\x8b\xd4\x85\xc5\xa9\xcd\x39\x29\xa5\xeb\x77\x90\xde\x48\x6b\x74\x4d\xda\x79" + "\x54\x85\xd0\x75\x31\x44\xeb\x49\x2c\x0b\x69\xe6\xc3\x17\x69\x1a\x87\x73\x57\x73\xd1\x4a\x1f\x67\x90\xb9\x93\xce" +
"\xda\x99\xa3\x2f\x0f\x24\xcf\xb0\x6e\x8d\xeb\x0f\x1e\x01\xc8\xa1\x8a\x54\xf7\x5d\x9c\xf5\x9e\xaf\xed\x88\xd2\x20" + "\x1a\x4d\xc6\x0f\x6e\x07\x56\xbf\xdc\x69\x79\x82\xdb\x60\x7d\x5c\x3c\x03\x90\xdb\x28\x4a\x13\xb3\x38\xa8\x3d\x1c" +
"\xf3\xd6\xd8\x7c\x3c\xcf\x25\xca\xfd\xa8\x3d\x22\xb0\x7c\xa2\xc3\x56\x2f\x11\x7e\xca\x27\xba\xd3\x5f\xb3\xe0\x6c" + "\xdb\xc4\xa5\x47\xe6\x95\x75\xf5\xb8\xcf\x4b\x2e\xd7\x63\xef\xc4\x81\xe5\x23\xed\xa6\xfa\x92\xc3\x77\xf9\x48\x57" +
"\x99\xec\xad\xce\x5f\xbd\xf6\x60\x6f\x04\x90\x0f\xef\xf8\x06\xfb\x22\xeb\x8f\xce\xf0\x0c\x75\xcb\xee\xc1\x7c\x63" + "\xe6\x53\x95\x94\x81\xc9\x9d\xaa\xfc\x11\x7b\x77\xe6\x66\x00\xf5\xf6\x8e\x4f\x90\x5f\x54\x71\x75\x86\x27\xd0\x81" +
"\xa3\x43\x88\x91\x92\x3a\x2c\xb9\xa7\x44\x21\xce\x03\x61\x3d\x40\xfb\x8f\xc9\x69\x75\x3e\xc4\x7e\x1f\x83\x2c\x5e" + "\xfd\x8d\xfd\xcc\xd6\x24\x88\xd1\xa5\xf4\xd8\x72\x74\xc9\x12\xce\x0d\xa1\xde\x9a\xc6\x8f\xc5\x7e\x74\x03\xc4\x7a" +
"\x5f\xfc\x71\xcb\x63\xf9\x9f\x15\x32\x07\x2b\x6e\x39\x7d\xf9\xfd\x84\x9f\x5f\xce\x7f\x82\x39\x4a\xd2\x87\xe8\xff" + "\x9d\x83\x6c\x8e\x0f\x3e\x5f\xf1\x18\xfe\x07\x85\xcc\x49\x8a\x2b\x2e\x9f\x7f\x3f\x31\xd4\x5f\xe6\xdf\xb3\x99\x90" +
"\xef\xdd\x4d\x91\x3e\xa1\xa8\xda\x66\x21\x19\x33\x45\x79\x20\x64\x7e\x96\x5a\x72\xa4\x9d\x34\x3a\x6d\xc8\x4a\x93" + "\x44\x88\xf8\x7f\xdf\x9c\x84\xf4\x1e\x45\x17\xfa\x0b\xc9\x58\x29\xaa\x93\x43\x35\xd4\x4a\x47\x9e\x8c\x97\xd6\x94" +
"\xc3\x1c\xde\x8c\x7c\xc5\x74\x4d\xfb\xfe\x9f\xb3\xdc\xf3\x5a\x7d\xc1\x5a\xaa\xdd\x70\x1d\x79\xad\xd2\x22\x0c\xae" + "\x3d\x39\x69\x6b\x58\xc0\x7f\xa3\xbf\x62\x7a\xad\xf7\xed\x31\x16\x63\xfd\x71\x9e\x2f\x41\x79\x79\xfe\x6b\x0a\xa4" +
"\x5c\xc6\xbf\xce\xff\xe8\xa2\xa7\x2c\x75\x29\x35\xfd\x26\xcb\x72\xbc\x14\x3e\x06\xf9\x79\xba\x19\x5e\x5c\x8f\x73" + "\x63\xb1\xc4\x47\x58\x80\x77\x81\xfe\x7a\xc9\x6b\xbe\x55\x1f\x51\x4b\xf5\xb0\x7d\xe7\x7c\xab\xca\x26\x15\x5e\x79" +
"\x0c\x7a\x35\x55\x17\xfd\x09\x00\x00\xff\xff\xa2\xe7\x34\x86\xae\x05\x00\x00") "\xe5\x7f\x94\xff\x10\x72\x74\xb9\x34\xad\x34\xf4\x93\x1c\xcb\xf1\xb5\x0d\x18\x34\xd4\xcb\xbb\xed\xc5\xeb\x38\x53" +
"\xa3\xa3\x54\x9b\xec\x77\x00\x00\x00\xff\xff\x57\xd3\xf8\xf1\x07\x06\x00\x00")
func bindataTemplatesRdstfMaintfBytes() ([]byte, error) { func bindataTemplatesRdstfMaintfBytes() ([]byte, error) {
return bindataRead( return bindataRead(
@@ -238,10 +239,10 @@ func bindataTemplatesRdstfMaintf() (*asset, error) {
info := bindataFileInfo{ info := bindataFileInfo{
name: "templates/rds-tf/main.tf", name: "templates/rds-tf/main.tf",
size: 1454, size: 1543,
md5checksum: "", md5checksum: "",
mode: os.FileMode(420), mode: os.FileMode(420),
modTime: time.Unix(1585205850, 0), modTime: time.Unix(1585216252, 0),
} }
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}

View File

@@ -6,8 +6,7 @@
"user": "foo_service_user", "user": "foo_service_user",
"password": "foo_service_password", "password": "foo_service_password",
"sizeInGb": 7, "sizeInGb": 7,
"dbNames": ["foo_service"], "dbNames": ["foo_service"]
"backupDisabled": true
}, },
"aws_access": { "aws_access": {
"policies": [ "policies": [

View File

@@ -32,6 +32,10 @@ module "rds" {
backup_retention_period = 7 backup_retention_period = 7
{{- end }} {{- end }}
{{- if not .ExtraResources.Database.MultiAZDisabled }}
multi_az = true
{{- end }}
{{- if .ExtraResources.Database.PsqlFamily }} {{- if .ExtraResources.Database.PsqlFamily }}
psql_family = {{ .ExtraResources.Database.PsqlFamily | quote }} psql_family = {{ .ExtraResources.Database.PsqlFamily | quote }}
{{- end }} {{- end }}

View File

@@ -32,6 +32,7 @@ type Database struct {
DbNames []string `json:"dbNames"` DbNames []string `json:"dbNames"`
InstanceName string `json:"instanceName"` InstanceName string `json:"instanceName"`
BackupDisabled bool `json:"backupDisabled"` BackupDisabled bool `json:"backupDisabled"`
MultiAZDisabled bool `json:"multiAZDisabled"`
} }
type Team struct { type Team struct {