Compare commits

16 Commits
v2 ... master

Author SHA1 Message Date
Deepak Jain
868c6346c7 Merge pull request #52 from navi-infra/INFRA-588
INFRA-588 | Deepak Jain| pointing v1 to old terrafrom repo commit
2020-10-28 15:43:44 +05:30
Deepak Jain
1a5b0aeee1 INFRA-588 | Deepak Jain| pointing v1 to old terrafrom repo commit 2020-10-28 15:30:52 +05:30
Deepak Jain
7a42aca488 Merge pull request #48 from navi-infra/INFRA-558
INFRA-558 | Deepak Jain| adding workspace
2020-10-12 19:07:29 +05:30
Deepak Jain
d9052be2cf INFRA-558 | Deepak Jain| adding workspace 2020-10-12 19:05:56 +05:30
Deepak Jain
ceb330a821 Merge pull request #47 from navi-infra/INFRA-558
INFRA-558| Deepak Jain| fixing deploy.sh for iamroles
2020-10-12 14:59:28 +05:30
Deepak Jain
a6e02540ff INFRA-558| Deepak Jain| fixing deploy.sh for iamroles 2020-10-12 14:56:05 +05:30
Deepak Jain
ba65a2f791 Merge pull request #46 from navi-infra/INFRA-558
INFRA-558| Deepak Jain| adding option to add role_name
2020-10-12 10:53:35 +05:30
Deepak Jain
f3cf1b64ee INFRA-558| Deepak Jain| adding option to add role_name 2020-10-12 10:53:01 +05:30
Deepak Jain
60faa3daf3 Merge pull request #39 from navi-infra/INFRA-43
INFRA-43| Deepak Jain| adding test
2020-09-17 13:19:57 +05:30
Deepak Jain
07ec4c8cd6 INFRA-43| Deepak Jain| adding test 2020-09-17 13:02:33 +05:30
Deepak Jain
e5223008f5 Merge pull request #38 from navi-infra/INFRA-000
INFRA-000| Deepak Jain| fixing s3 bucket resources
2020-09-09 20:43:20 +05:30
Deepak Jain
13f311277c INFRA-000| Deepak Jain| fixing s3 bucket resources 2020-09-09 20:40:26 +05:30
Deepak Jain
7e91c62083 Merge pull request #36 from navi-infra/INFRA-492
INFRA-492| Deepak Jain| adding apply_method as pending-reboot
2020-08-26 13:17:20 +05:30
Deepak Jain
81e504f186 INFRA-492| Deepak Jain| adding apply_method as pending-reboot 2020-08-26 13:16:55 +05:30
Deepak Jain
e2cd9a8e92 Merge pull request #33 from navi-infra/INFRA-492
INFRA-492| Deepak Jain| adding db parameters feature
2020-08-26 11:34:01 +05:30
Deepak Jain
b5e7343f89 INFRA-492| Deepak Jain| adding db parameters feature 2020-08-26 11:30:09 +05:30
20 changed files with 636 additions and 158 deletions

3
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.idea
vendor
vendor
actual_output/

View File

@@ -83,29 +83,43 @@ func (fi bindataFileInfo) Sys() interface{} {
return nil
}
var _bindataTemplatesAwsrolestfDeploySh = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x51\x4d\x6f\xe2\x30\x10\xbd\xfb\x57\xcc\x86\x5c\x1d\xb4\xd7\x5d\xe5\x80\xd8\xdc\xb6\xa8\x82\x56\x3d\x54\x15\x32\xce\xb8\x58\x38\xe3\xc8\x76\x20\x51\xf0\x7f\xaf\x82\x54\x1a\x28\xa2\x47\xbf\x0f\xcf\x7b\x33\x93\x5f\xd3\x8d\xa6\xa9\xdf\x32\x36\x01\x6c\x75\x80\xc3\x16\x09\x04\x75\x20\x6d\x55\x09\x2a\x41\x09\x6d\x3c\xf3\x18\x80\x23\x63\xa2\x2c\x75\xd0\x96\x84\x59\x07\x74\x4e\x28\xeb\xaa\xb5\xad\x07\xc8\xe7\x49\x32\xe6\x77\xcd\x06\xc7\x14\xfb\x32\x08\x39\xa0\x79\xda\xff\xfe\xc3\x45\x5d\x9b\x2e\x32\xad\xe0\x15\xd2\x6b\x09\xe4\x39\x24\x27\x45\x02\x6f\x7f\xc3\x16\x89\x01\x00\xdc\x4f\x91\xf6\xf7\xf8\x08\x5c\x34\xc1\x0e\x73\x9d\xdd\x63\xc2\xd0\x78\xbc\xfe\xf5\x32\xfb\xc5\x87\x63\x2a\x02\xe7\xa5\xeb\xb8\x6b\x28\x61\x4a\x8f\x2a\x82\x26\x1d\x46\xcf\x83\x75\x3b\x5f\x0b\x89\xe0\xd1\xa0\x0c\xd0\xf7\x90\x15\x6d\x70\x62\x89\xde\x36\x4e\xa2\xcf\x5e\xce\x9a\x18\xe1\x78\x84\x5b\x6e\xc2\xc3\x4f\xd6\xd1\xd4\xef\xfb\x4c\xef\xad\x86\xb1\xa1\x9c\x0c\x06\xa4\x25\xa5\xdf\xa1\xf1\xc8\xa5\xa5\x80\x6d\x80\xb4\x9f\xff\x7f\x5e\x3d\x15\xcb\x78\x56\x9d\x0e\x03\x5c\x9d\x12\xfd\xc3\xda\xd8\xae\x42\x0a\xd9\x42\x54\x43\x10\x7e\x03\x5e\x35\x4a\xe9\xf6\x93\xbc\x6a\x51\xd0\x5e\x3b\x4b\x83\x18\x62\xcc\x3a\x51\x19\xe0\x04\x69\xbf\x98\x3d\x14\xab\xc7\xd9\xbc\x88\x17\x05\xc6\xa7\x60\x1f\x01\x00\x00\xff\xff\xae\xfa\x5e\xb7\xcb\x02\x00\x00")
var _bindataTemplatesAwsrolestfDeploysh = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x91\x41\x8f\xd3\x30\x10\x85\xef\xfe\x15\x8f\x6c\xae\xce\x8a\x2b\xa8" +
"\x87\xd5\x92\x1b\xac\x50\x0b\xe2\x80\xd0\xca\xeb\x8c\xa9\xb5\x8e\x1d\xd9\x4e\x9b\xc8\xeb\xff\x8e\x52\x09\x70\xbb" +
"\x6d\x39\x71\x89\x94\x99\x79\xcf\xdf\x9b\xb9\x79\x73\xfb\xa4\xed\x6d\xd8\x32\x76\x03\x9a\x74\xc4\x7e\x4b\x16\xc2" +
"\xce\x90\xae\xef\x85\xed\xa0\x84\x36\x81\x05\x8a\xe0\xc4\x98\xe8\x3a\x1d\xb5\xb3\xc2\x3c\x46\xf2\x5e\x28\xe7\xfb" +
"\x47\x37\x2c\xa5\xb0\xaa\xaa\xb2\xff\x3c\x3e\x51\xd9\x62\x7f\x05\x42\x2e\xd5\x55\x9d\xde\xbe\xe3\x62\x18\xcc\x9c" +
"\x99\x56\xf8\x8e\xfa\x74\x04\xab\x15\xaa\xc3\x44\x85\x1f\xef\xe3\x96\x2c\x03\x80\xeb\x14\x75\xba\xd6\xcf\xe0\x62" +
"\x8c\x6e\x79\xd7\xbb\x1d\x55\x8c\x4c\xa0\x53\xd7\x63\xf6\x23\xc3\xb2\x95\xc1\x79\xe7\x67\xee\x47\x5b\x31\xa5\x8b" +
"\x88\xd0\x56\xc7\xe2\x77\xef\xfc\x73\x18\x84\x24\x04\x32\x24\x23\x52\x42\xd3\x4e\xd1\x8b\x35\x05\x37\x7a\x49\xa1" +
"\xf9\xf6\x67\x26\x67\xbc\xbc\xe0\x9c\xda\xd2\xfe\x5f\xd2\xe2\xd5\xd7\xfb\xac\xaf\xad\x86\xb1\x25\x9c\x8c\x06\xd2" +
"\x59\xa5\x7f\x62\x0c\xc4\xa5\xb3\x91\xa6\x88\x3a\xdd\x7f\xfc\xba\xf9\xd2\xae\x33\x4b\x89\x43\xab\x57\x10\x1b\xf2" +
"\x3b\x2d\x69\xed\x0c\x35\xcb\xe7\x41\xf4\x07\x9e\xdf\xa6\x87\x3b\x82\xab\x73\x01\x2e\x68\xf9\x99\xd1\xd6\xee\xb4" +
"\x77\xb6\x27\x1b\x91\x73\x33\x8b\xde\x80\x5b\xd4\xe9\xe1\xee\x53\xbb\xf9\x7c\x77\xdf\xe6\xa3\x98\xe5\xc1\x58\x4a" +
"\x58\xee\x7d\x11\xeb\x03\x0d\xc6\xcd\x8b\x77\x53\x22\x9c\x94\x37\xa3\x52\x7a\xfa\x3f\x7c\x1c\x64\xbb\x85\xef\x57" +
"\x00\x00\x00\xff\xff\x54\xa2\x5a\xff\x9c\x03\x00\x00")
func bindataTemplatesAwsrolestfDeployShBytes() ([]byte, error) {
func bindataTemplatesAwsrolestfDeployshBytes() ([]byte, error) {
return bindataRead(
_bindataTemplatesAwsrolestfDeploySh,
_bindataTemplatesAwsrolestfDeploysh,
"templates/aws-roles-tf/deploy.sh",
)
}
func bindataTemplatesAwsrolestfDeploySh() (*asset, error) {
bytes, err := bindataTemplatesAwsrolestfDeployShBytes()
func bindataTemplatesAwsrolestfDeploysh() (*asset, error) {
bytes, err := bindataTemplatesAwsrolestfDeployshBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{
name: "templates/aws-roles-tf/deploy.sh",
size: 715,
size: 924,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1596093034, 0),
modTime: time.Unix(1603873082, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -113,29 +127,45 @@ func bindataTemplatesAwsrolestfDeploySh() (*asset, error) {
return a, nil
}
var _bindataTemplatesAwsrolestfMainTf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x94\x91\x41\x6b\xdc\x30\x10\x85\xef\xfe\x15\xc2\x77\xc9\x94\xde\x16\x02\x6d\x68\x2e\x3d\x94\x12\x17\x7a\x34\x5a\xed\xd8\x16\x96\x34\xee\x68\xb4\xc9\xb2\xf1\x7f\x2f\x92\x92\xb2\x65\xb7\xb4\xd5\xcd\xc3\x7b\x9f\xe7\xbd\x61\x20\xd2\x23\x92\x17\xe7\x46\x88\xbd\x36\x0b\x84\x83\x68\xe3\xfb\xb6\x0c\x84\xd8\x27\xb3\x00\x8b\xdf\xdf\x9d\x68\xcf\x67\xa1\x7a\xd6\x0c\x3d\x23\xc1\x7d\x35\xaa\xfb\xa2\xfe\xa2\x3d\x88\x6d\x6b\x0b\x80\x60\xb2\x18\xae\x01\x7a\x95\x11\x13\xcf\xf2\x5d\xd5\x2d\x70\x12\x57\xef\x4e\xb4\x11\xe8\x68\x0d\x48\xab\xbd\x24\x74\x10\xab\xfc\x09\x69\x89\xab\x36\x30\x2c\x70\x1a\x56\x82\xd1\x3e\x67\xb9\xd5\xbe\xa8\xba\xbc\xe0\xc3\x33\x93\x7e\x84\x88\x89\x0c\x44\xf5\x10\x8e\x96\x30\x78\x08\x2c\xb6\xad\x28\x3e\xc1\xea\xf0\x94\x27\xea\x75\x6b\x79\x63\xdc\xa7\x31\xe3\xdf\x22\xad\x84\xa3\x75\xf0\x8f\x9d\x7c\xfc\xde\x7f\x7d\x35\xbc\x01\xb4\x71\x37\xb3\xd6\xb2\x25\x3e\x05\x20\x39\x26\xe7\xa4\xc1\xc0\x84\x2e\xdb\xb6\x66\x6b\x1a\x8f\x87\xe4\xa0\xc4\x2c\x6d\xd4\x33\xd5\x80\x17\xa0\xc9\xf2\x6e\x17\xe3\xbc\xeb\xba\xc9\xf2\x87\xc9\xf2\x9c\xf6\xca\xf8\x83\x0a\xfa\x68\x25\x83\x99\x95\x0d\x5d\xf9\xb0\x61\x24\xdd\xfd\xaa\x57\x4d\x96\xf3\xef\xe0\xa2\xac\xcc\xfc\x4b\x9f\x2f\xe2\x47\x42\xce\x11\xf3\x3e\xf5\x66\x43\x06\xfe\xc1\xdb\x57\xc9\x63\x56\xbc\x08\x9f\x22\x7f\xc3\xcf\x11\x43\x05\x64\xe3\x10\xf2\x41\x2e\xaa\xfd\xef\x5b\x6d\xcd\xcf\x00\x00\x00\xff\xff\xd4\xd2\x05\x95\xdf\x02\x00\x00")
var _bindataTemplatesAwsrolestfMaintf = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x92\xd1\x6b\xdb\x30\x10\xc6\xdf\xfd\x57\x1c\x7e\x97\xe3\x10\x52\xe6" +
"\x40\xd8\x56\xd6\x97\x3d\x8c\x52\x0f\xf6\x18\x64\xf9\xe4\x08\xcb\x3a\x4f\x92\xd3\x06\xd7\xff\xfb\x90\xec\x8e\x8c" +
"\x86\xae\x54\x0f\x06\x89\xef\xfb\xdd\xdd\x77\xf6\x68\x2d\x97\x64\x3b\x18\x13\x80\x8a\x8b\x16\x4d\x0d\xa9\xdb\xa4" +
"\xf1\x01\xa0\x1a\x44\x8b\x1e\xfe\x3d\x7b\x48\xc7\x11\xb2\xd2\x73\x8f\xa5\x27\x8b\xb7\xb3\x31\xbb\x8d\xea\x1f\xbc" +
"\x43\x98\xa6\x34\x02\x2c\x36\x8a\xcc\x6b\x00\xef\x99\xa3\xc1\x1f\xd9\x7a\xd6\xb5\x78\x86\x57\x67\x0f\xa9\x43\x7b" +
"\x52\x02\x99\xe2\x1d\xb3\xa4\xd1\xcd\xf2\x47\xb2\xad\xeb\xb9\xc0\x43\x8b\xe7\x43\x6f\x51\xaa\xa7\x20\x57\xbc\x8b" +
"\xaa\x55\x68\xf0\xee\xc9\x5b\xfe\x80\x8e\x06\x2b\xd0\x65\x77\xe6\xa4\x2c\x99\x0e\x8d\x87\x69\x8a\x8a\x6f\xd8\x6b" +
"\x3a\x87\x97\x6c\xe9\x9a\x5d\x79\x2e\x07\x19\xf0\x2f\x23\xf5\x96\xa4\xd2\xf8\xce\x4c\xbe\xfe\x2a\xef\x17\xc3\x0b" +
"\x80\x0b\x7d\x75\xd6\x39\x6c\x46\x8f\x06\x2d\x93\x83\xd6\x4c\x90\xf1\x96\x74\xb0\x4d\xc9\x94\x24\x1d\xd5\x83\xc6" +
"\x38\x66\x4c\x63\x5e\xd3\x3c\xe0\x05\xa8\x51\x7e\xb7\x73\xee\xb8\x5b\xad\x1a\xe5\xbf\x34\xca\x1f\x87\x2a\x13\x5d" +
"\x9d\x19\x7e\x52\xcc\xa3\x38\x66\xca\xac\xe2\x45\x19\x69\xf9\xea\x6f\xbc\x59\xa3\xfc\x67\x8b\x72\x2f\x50\x6e\x0a" +
"\x21\xd6\x9f\xaa\x6d\x5d\x6f\xf2\x62\x2b\xe4\x4d\x71\x53\xd4\xbc\x92\xb8\x16\x12\xf3\x62\x9b\xe7\x9b\x22\x0f\xbd" +
"\xe1\x45\xb2\xa1\x81\xff\x84\xff\x0c\xbf\x07\xf2\x21\x8f\xd0\xfc\xbc\xe0\x43\xa8\x1e\xbd\x69\x4f\x5a\x09\x85\x2e" +
"\xdd\x5d\xe1\x94\xb3\xfc\x81\x34\x66\xf7\x8b\x10\x9e\xa1\x1b\x9c\xff\x49\xdf\x1d\x19\x98\x22\x76\x1c\x19\x28\xf9" +
"\xa6\x3d\x7c\x96\xad\x27\x00\xa1\xfe\xc1\x84\xeb\xc5\x3a\xdf\xe7\x4e\x97\x7a\xa8\xdd\x5b\xb0\x0f\xfc\x6c\x91\x6a" +
"\xea\x00\x9d\x92\x3f\x01\x00\x00\xff\xff\xda\xee\x3d\x03\xad\x03\x00\x00")
func bindataTemplatesAwsrolestfMainTfBytes() ([]byte, error) {
func bindataTemplatesAwsrolestfMaintfBytes() ([]byte, error) {
return bindataRead(
_bindataTemplatesAwsrolestfMainTf,
_bindataTemplatesAwsrolestfMaintf,
"templates/aws-roles-tf/main.tf",
)
}
func bindataTemplatesAwsrolestfMainTf() (*asset, error) {
bytes, err := bindataTemplatesAwsrolestfMainTfBytes()
func bindataTemplatesAwsrolestfMaintf() (*asset, error) {
bytes, err := bindataTemplatesAwsrolestfMaintfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{
name: "templates/aws-roles-tf/main.tf",
size: 735,
size: 941,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1596093034, 0),
modTime: time.Unix(1603878934, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -143,19 +173,27 @@ func bindataTemplatesAwsrolestfMainTf() (*asset, error) {
return a, nil
}
var _bindataTemplatesAwss3buckettfDeploySh = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x90\xb1\x4e\xc3\x30\x10\x86\xf7\x7b\x8a\x1f\x37\x6b\x5a\xb1\x82\x32\xf2\x02\x2c\x0c\x08\x55\x87\x73\x51\x4e\x24\x76\x64\x5f\x49\xab\x34\xef\x8e\xc2\x40\x2b\x40\xe9\xe8\xdf\xdf\xaf\xef\xee\x36\x77\xbb\x77\x0d\xbb\xdc\x12\x6d\x20\x47\x35\x8c\xad\x04\x70\x38\xc1\xc7\xbe\xe7\x50\xa3\x61\xed\x32\x65\x31\x94\x42\xc4\x75\xad\xa6\x31\x70\xb7\x37\x49\x89\x9b\x98\xfa\x7d\x1c\x96\x28\x57\xce\xd1\x25\x64\xbf\x84\x55\x31\xdd\x3f\x94\x3c\x0c\xdd\x69\x26\xd2\x06\xaf\x28\x7e\x33\xa8\x2a\xb8\x6f\xc4\xe1\xed\xd1\x5a\x09\x04\x00\xeb\xaa\x62\x5a\xfb\x9f\x51\xf2\xc1\xe2\x22\x4e\xf1\x53\x1c\x35\x4a\x97\xd9\xa0\x41\xed\xea\x39\xc6\xf4\x91\x07\xf6\x82\x2c\x9d\x78\xc3\x34\x61\xfb\x74\xb4\xc4\xcf\x92\xe3\x21\x79\xc9\xdb\x97\x1f\x66\x9e\x71\x3e\xe3\xbf\x76\x90\xf1\x56\xf5\xca\xfa\xf7\x0e\xc5\xda\x4a\xf4\x15\x00\x00\xff\xff\x25\xc5\x00\xaa\xac\x01\x00\x00")
var _bindataTemplatesAwss3buckettfDeploysh = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x84\x90\xb1\x4e\xc3\x30\x10\x86\xf7\x7b\x8a\x1f\x37\x6b\x5a\xb1\x82\x32" +
"\xf2\x02\x2c\x0c\x08\x55\x87\x73\x51\x4e\x24\x76\x64\x5f\x49\xab\x34\xef\x8e\xc2\x40\x2b\x40\xe9\xe8\xdf\xdf\xaf" +
"\xef\xee\x36\x77\xbb\x77\x0d\xbb\xdc\x12\x6d\x20\x47\x35\x8c\xad\x04\x70\x38\xc1\xc7\xbe\xe7\x50\xa3\x61\xed\x32" +
"\x65\x31\x94\x42\xc4\x75\xad\xa6\x31\x70\xb7\x37\x49\x89\x9b\x98\xfa\x7d\x1c\x96\x28\x57\xce\xd1\x25\x64\xbf\x84" +
"\x55\x31\xdd\x3f\x94\x3c\x0c\xdd\x69\x26\xd2\x06\xaf\x28\x7e\x33\xa8\x2a\xb8\x6f\xc4\xe1\xed\xd1\x5a\x09\x04\x00" +
"\xeb\xaa\x62\x5a\xfb\x9f\x51\xf2\xc1\xe2\x22\x4e\xf1\x53\x1c\x35\x4a\x97\xd9\xa0\x41\xed\xea\x39\xc6\xf4\x91\x07" +
"\xf6\x82\x2c\x9d\x78\xc3\x34\x61\xfb\x74\xb4\xc4\xcf\x92\xe3\x21\x79\xc9\xdb\x97\x1f\x66\x9e\x71\x3e\xe3\xbf\x76" +
"\x90\xf1\x56\xf5\xca\xfa\xf7\x0e\xc5\xda\x4a\xf4\x15\x00\x00\xff\xff\x25\xc5\x00\xaa\xac\x01\x00\x00")
func bindataTemplatesAwss3buckettfDeployShBytes() ([]byte, error) {
func bindataTemplatesAwss3buckettfDeployshBytes() ([]byte, error) {
return bindataRead(
_bindataTemplatesAwss3buckettfDeploySh,
_bindataTemplatesAwss3buckettfDeploysh,
"templates/aws-s3-bucket-tf/deploy.sh",
)
}
func bindataTemplatesAwss3buckettfDeploySh() (*asset, error) {
bytes, err := bindataTemplatesAwss3buckettfDeployShBytes()
func bindataTemplatesAwss3buckettfDeploysh() (*asset, error) {
bytes, err := bindataTemplatesAwss3buckettfDeployshBytes()
if err != nil {
return nil, err
}
@@ -165,7 +203,7 @@ func bindataTemplatesAwss3buckettfDeploySh() (*asset, error) {
size: 428,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1596093034, 0),
modTime: time.Unix(1603873082, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -173,29 +211,43 @@ func bindataTemplatesAwss3buckettfDeploySh() (*asset, error) {
return a, nil
}
var _bindataTemplatesAwss3buckettfMainTf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x51\x4d\x8b\xdb\x30\x10\xbd\xfb\x57\x0c\xbe\x4b\xa6\xe4\x16\x08\xb4\xa1\xb9\xf4\x50\x4a\x5d\xe8\x31\x28\xca\xd8\x16\xb6\x35\x5e\x69\x94\x0f\x12\xfd\xf7\x45\xb6\xb3\x24\x24\x0b\x3b\x37\x8d\xde\x7b\xf3\xe6\x0d\xa3\x73\xaa\x22\xd7\xc3\x25\x03\xd8\x29\xdd\xa2\xdd\x43\xee\x17\xf9\xd8\x00\xd8\x05\xdd\x22\xc3\x63\xad\x20\xbf\x5c\x40\x96\xac\x18\x4b\x26\x87\xeb\x89\x28\xd7\x23\xfa\xb7\xea\x11\x62\xcc\x47\x01\x87\xb5\x21\xfb\x2c\xa0\x06\xe1\x29\x70\x23\xbe\x4d\xb8\x16\xcf\xf0\x54\xab\x64\x45\x4c\x1e\xfc\x84\x3b\x92\x6b\xfd\xa0\x34\x6e\x5b\x3c\x6f\x07\x87\x95\x39\x3d\xe2\x8a\xe4\x6d\x73\x62\xa7\xfe\xa2\xa7\xe0\x34\x7a\xb9\xb1\x07\xe3\xc8\xf6\x68\x19\x62\x1c\x11\x3f\x71\xe8\xe8\x9c\x3a\x72\x36\x2c\x5e\xb4\xcb\x50\xa5\x01\xb7\x6d\x06\x47\x95\xe9\xf0\x8b\x71\xfc\xf8\x5f\xfe\x99\x09\x37\x01\xa5\xbb\x97\x6b\x4e\xde\x05\x1d\x2d\x3a\x51\x85\xae\x13\x9a\x2c\x3b\xea\x12\x2d\x66\x31\xcb\x7a\xda\x87\x0e\x1f\x02\x19\x6f\x34\xad\x78\x27\x55\x1b\x5e\x2e\xbd\x6f\x96\x45\x51\x1b\xfe\x5e\x1b\x6e\xc2\x4e\xea\x7e\x2f\xad\x3a\x18\xc1\xa8\x1b\x69\x6c\x31\x3e\x8c\xad\x9c\x2a\xd4\xd1\x8b\x0f\x59\x59\x1b\x4e\x43\xfd\x62\x3b\xcf\x49\xaa\x2f\x32\x2d\x17\xeb\xf9\xff\x0a\x7d\xf0\xfc\x8f\x7e\x79\xb2\x10\x63\x06\x80\x77\x79\x7f\x42\xbf\x3f\xc9\x15\xde\x02\x71\x4a\x29\x8b\xd9\x7b\x00\x00\x00\xff\xff\xa0\x69\x14\x82\x94\x02\x00\x00")
var _bindataTemplatesAwss3buckettfMaintf = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x8c\x91\x4f\x8b\xdb\x30\x10\xc5\xef\xfe\x14\x43\xee\xb2\xf3\x67\xd9\xae" +
"\x03\xa1\x6d\xe8\x5e\x7a\x28\xa5\x2e\xf4\x18\x14\x79\xe4\x08\xdb\x1a\x57\x1a\x6d\x36\x64\xf5\xdd\x8b\xff\x6c\x49" +
"\x48\x0a\x9d\x9b\xc7\x6f\x9e\x7e\x33\x8f\xd1\x39\xa9\xc9\xb5\x70\x4e\x00\xf6\x52\xd5\x68\x4b\x98\xf9\xd5\x6c\x68" +
"\x00\xec\x83\xaa\x91\xe1\xba\x36\x30\x3b\x9f\x21\x2d\x58\x32\x16\x4c\x0e\xb7\xe3\x60\xba\x1d\xd4\xdf\x64\x8b\x10" +
"\xe3\x6c\x30\x70\x58\x19\xb2\xb7\x06\xb2\x13\x9e\x02\x1f\xc4\x62\xd4\xd5\x78\x82\x9b\xda\xf4\x28\x62\x64\xf0\xa3" +
"\xee\x48\xae\xf6\x9d\x54\xb8\xab\xf1\xb4\xeb\x1c\x6a\xf3\x7a\xad\xcb\x7a\xb6\xe7\x57\x76\xf2\x07\x7a\x0a\x4e\xa1" +
"\x4f\x9f\xed\x8b\x71\x64\x5b\xb4\x0c\x31\x0e\x8a\x2f\xd8\x35\x74\xea\x3b\xe9\x04\x2c\xee\xb4\x8b\xa0\xfb\x07\xde" +
"\xb7\xe9\x1c\x69\xd3\xe0\x7f\x9e\xe3\xf3\xaf\xe2\xfb\x34\xf0\x6e\x20\x55\x73\x77\xcd\x91\x5d\xd0\xd1\xa2\x13\x3a" +
"\x34\x8d\x50\x64\xd9\x51\xd3\x8f\xc5\x24\x26\x49\x4b\x65\x68\xf0\xea\x20\x43\x46\xe3\x8a\x17\x56\x95\xe1\xf5\xda" +
"\xfb\xc3\x3a\xcb\x2a\xc3\x9f\x2a\xc3\x87\xb0\x4f\x55\x5b\xa6\x56\xbe\x18\xc1\xa8\x0e\xa9\xb1\xd9\xf0\x61\xac\x76" +
"\x32\x93\x47\x2f\xfe\xda\xa6\x95\xe1\x8f\x0e\xf5\x46\x97\x0f\x73\xa5\xd4\x52\x3e\xe9\x07\x99\x7f\x98\x2f\xf3\xc7" +
"\xc5\x12\x1f\x17\x4f\xfb\xbc\x9c\xe7\xf9\x7c\xa9\x10\x95\xc6\x55\x4f\xe8\x57\xbb\x09\xaa\x47\xb8\x13\x40\xb1\xda" +
"\x4e\xff\xdf\xa0\x0d\x9e\x7f\xd2\x57\x4f\x16\x62\x4c\x00\xf0\x22\x9c\x7f\x8c\x5f\xe6\xf7\x06\xbf\x03\x71\x7f\xd2" +
"\x24\x26\x7f\x02\x00\x00\xff\xff\x86\x69\x1f\xc3\xc1\x02\x00\x00")
func bindataTemplatesAwss3buckettfMainTfBytes() ([]byte, error) {
func bindataTemplatesAwss3buckettfMaintfBytes() ([]byte, error) {
return bindataRead(
_bindataTemplatesAwss3buckettfMainTf,
_bindataTemplatesAwss3buckettfMaintf,
"templates/aws-s3-bucket-tf/main.tf",
)
}
func bindataTemplatesAwss3buckettfMainTf() (*asset, error) {
bytes, err := bindataTemplatesAwss3buckettfMainTfBytes()
func bindataTemplatesAwss3buckettfMaintf() (*asset, error) {
bytes, err := bindataTemplatesAwss3buckettfMaintfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{
name: "templates/aws-s3-bucket-tf/main.tf",
size: 660,
size: 705,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1596093034, 0),
modTime: time.Unix(1603879053, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -203,19 +255,30 @@ func bindataTemplatesAwss3buckettfMainTf() (*asset, error) {
return a, nil
}
var _bindataTemplatesRdstfDeploySh = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x90\xc1\x4e\xc3\x30\x10\x44\xef\xfe\x8a\x25\xe4\x1a\x57\x5c\x41\xb9\xc1\x0f\xf4\xc2\x01\x21\x6b\x63\x6f\x5a\x8b\xc4\xb6\xbc\x9b\x16\x94\xe6\xdf\x51\x51\x45\x2b\x5a\x35\xa2\x37\x7b\x76\xd6\x6f\x3c\xf7\x77\x8b\xc6\x87\x05\xaf\x95\x62\x12\xa8\x48\x29\x74\xce\x8b\x8f\x01\x3b\x23\x94\x33\xb6\x31\xf7\x26\xa6\xbd\xc4\x75\x51\xa8\xa3\x88\x76\x2f\xd6\xe5\xf8\xf0\x58\x61\x4a\xdd\xd7\xa4\x94\x6f\xe1\x0d\xca\xbf\x1e\xa8\x6b\x28\x7e\x2c\x05\xbc\x3f\xc9\x9a\x82\x02\x00\xb8\x8e\x2a\xc7\x6b\xf3\x09\x2a\x1c\x24\xee\xc1\x39\x6e\xa8\x50\xad\x57\xc7\x6c\xe0\x83\x97\x93\xeb\x36\xe6\x0f\x4e\x68\x09\x98\x3a\xb2\x02\xe3\x08\xfa\xe5\x53\x32\x2e\x89\xe3\x90\x2d\xb1\x7e\xfd\xf5\x4c\x13\xec\x76\x70\x69\x3b\xd0\x76\x6e\xf5\x84\x7a\xde\x43\x25\x98\x57\x24\x75\x1f\xdd\xd0\x91\xce\x8e\xb5\x43\x41\x8d\x5b\x36\x3c\x34\x81\xc4\x78\xc7\xda\xc6\xbe\xc7\xe0\x4c\xca\x7e\x83\x42\x87\x11\x43\x79\xad\x91\xff\x82\x8f\x47\xe3\x03\x0b\x06\x4b\x33\x80\x71\xac\xc0\xb7\x67\xbf\x7f\x46\xc1\x06\x99\xf4\x92\xd0\x2d\x29\x75\xde\xe2\x0d\x45\x5c\xc8\x63\xf2\xe1\xb5\xf9\x5c\x14\xdc\xed\xcc\x14\x59\x56\x99\xd8\xb8\x66\x06\xf5\x1d\x00\x00\xff\xff\x32\x70\xb0\xcb\x31\x03\x00\x00")
var _bindataTemplatesRdstfDeploysh = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\x9c\x90\xc1\x4e\xc3\x30\x10\x44\xef\xfe\x8a\x25\xe4\x1a\x57\x5c\x41\xb9" +
"\xc1\x0f\xf4\xc2\x01\x21\x6b\x63\x6f\x5a\x8b\xc4\xb6\xbc\x9b\x16\x94\xe6\xdf\x51\x51\x45\x2b\x5a\x35\xa2\x37\x7b" +
"\x76\xd6\x6f\x3c\xf7\x77\x8b\xc6\x87\x05\xaf\x95\x62\x12\xa8\x48\x29\x74\xce\x8b\x8f\x01\x3b\x23\x94\x33\xb6\x31" +
"\xf7\x26\xa6\xbd\xc4\x75\x51\xa8\xa3\x88\x76\x2f\xd6\xe5\xf8\xf0\x58\x61\x4a\xdd\xd7\xa4\x94\x6f\xe1\x0d\xca\xbf" +
"\x1e\xa8\x6b\x28\x7e\x2c\x05\xbc\x3f\xc9\x9a\x82\x02\x00\xb8\x8e\x2a\xc7\x6b\xf3\x09\x2a\x1c\x24\xee\xc1\x39\x6e" +
"\xa8\x50\xad\x57\xc7\x6c\xe0\x83\x97\x93\xeb\x36\xe6\x0f\x4e\x68\x09\x98\x3a\xb2\x02\xe3\x08\xfa\xe5\x53\x32\x2e" +
"\x89\xe3\x90\x2d\xb1\x7e\xfd\xf5\x4c\x13\xec\x76\x70\x69\x3b\xd0\x76\x6e\xf5\x84\x7a\xde\x43\x25\x98\x57\x24\x75" +
"\x1f\xdd\xd0\x91\xce\x8e\xb5\x43\x41\x8d\x5b\x36\x3c\x34\x81\xc4\x78\xc7\xda\xc6\xbe\xc7\xe0\x4c\xca\x7e\x83\x42" +
"\x87\x11\x43\x79\xad\x91\xff\x82\x8f\x47\xe3\x03\x0b\x06\x4b\x33\x80\x71\xac\xc0\xb7\x67\xbf\x7f\x46\xc1\x06\x99" +
"\xf4\x92\xd0\x2d\x29\x75\xde\xe2\x0d\x45\x5c\xc8\x63\xf2\xe1\xb5\xf9\x5c\x14\xdc\xed\xcc\x14\x59\x56\x99\xd8\xb8" +
"\x66\x06\xf5\x1d\x00\x00\xff\xff\x32\x70\xb0\xcb\x31\x03\x00\x00")
func bindataTemplatesRdstfDeployShBytes() ([]byte, error) {
func bindataTemplatesRdstfDeployshBytes() ([]byte, error) {
return bindataRead(
_bindataTemplatesRdstfDeploySh,
_bindataTemplatesRdstfDeploysh,
"templates/rds-tf/deploy.sh",
)
}
func bindataTemplatesRdstfDeploySh() (*asset, error) {
bytes, err := bindataTemplatesRdstfDeployShBytes()
func bindataTemplatesRdstfDeploysh() (*asset, error) {
bytes, err := bindataTemplatesRdstfDeployshBytes()
if err != nil {
return nil, err
}
@@ -225,7 +288,7 @@ func bindataTemplatesRdstfDeploySh() (*asset, error) {
size: 817,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1596109040, 0),
modTime: time.Unix(1603873082, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -233,29 +296,71 @@ func bindataTemplatesRdstfDeploySh() (*asset, error) {
return a, nil
}
var _bindataTemplatesRdstfMainTf = []byte("\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x57\xe1\x6f\xea\x36\x10\xff\x9e\xbf\xc2\xe2\x7b\xe0\x4d\xd3\x34\xa9\x52\xa5\x95\xc2\x9b\x98\x5e\xa7\xae\xed\xdb\xa4\x7d\xb1\x1c\xe7\x08\x16\x8e\x9d\xda\x97\x52\xca\xe3\x7f\x9f\x1c\x07\x48\x20\x10\x58\x28\x9f\xc8\xcf\x77\xbf\xfb\xdd\xe5\xee\x0c\x08\xc6\xb0\xa9\x36\x29\x59\x05\x84\x44\x8c\xcf\x41\xc5\xa4\x67\x7f\xee\x15\x00\x21\x51\xce\xe7\x80\xa4\xfe\xb9\x25\x3d\xc5\xde\x44\x18\x31\x35\x0f\xb7\x14\x21\xd7\x69\xca\x54\x1c\x5a\x64\x08\xbd\xc2\xdd\x40\x22\xb4\x3a\x74\x67\x59\x68\x75\x8e\xb3\xf0\x27\x6f\x37\x87\x25\x39\xf8\xdc\x92\x9e\x89\xad\x37\x58\x68\x33\xb7\x19\xe3\x40\xe7\xb0\xa4\x99\x81\xa9\x78\x2f\x0d\x7c\x3c\x3b\x58\xad\x48\x7f\xfc\x8e\x86\x3d\x81\xd5\xb9\xe1\x60\xfb\x23\x86\x2c\x62\x16\xfa\x13\x65\x91\x29\x0e\x7f\xb2\x14\xc8\x7a\xed\x39\x33\xa3\xa7\x42\xc2\x41\x50\x9e\xc6\xde\x80\x71\xd9\xa8\xca\x17\x25\xd4\x0b\x05\x26\x9c\xe6\x52\x86\x5c\x2b\x34\x5a\x3a\xb7\x75\xb0\x0e\x82\x54\xc7\xb9\x04\xaf\xbf\xa8\xa4\x57\x54\xe1\x48\x04\xde\xdc\x58\x3b\xbb\x19\x0c\x12\x81\xbf\x25\x02\x67\x79\xd4\xe7\x69\xdc\x2f\x4a\x8b\xc0\x67\x7d\xa1\x06\xc5\x83\x50\x53\xc3\x06\x26\xb6\xfd\x44\xa0\x8b\x01\xea\x4d\x18\xad\x52\x50\x58\xb0\x35\xa4\x3e\xae\x98\xfc\x20\xaf\xb9\x46\x97\x78\x40\x88\x28\x4b\x41\x95\xab\x45\xa3\x6f\x73\xd9\x6a\x2c\x19\xb3\x76\xa1\x4d\xbc\xc9\xe7\x14\xcb\xe3\xc6\xb6\xc6\x90\x5b\x30\xd5\xaa\x9e\x62\xf8\xee\x6c\x6b\xde\x85\xf8\x3d\xef\x11\x64\x52\x2f\x5d\xc6\xfd\x7d\xc1\x01\x21\xa9\x56\x02\xb5\x11\x2a\xa1\x97\x88\x7f\xd8\xba\x35\xa7\x51\xa1\xdd\x65\x74\x2e\xe5\x7e\x5e\x01\x21\x71\x69\x65\xcf\x20\x1a\x45\x2e\x4f\x4b\x7e\x90\x34\xb7\xf8\xa2\xff\xb0\x5a\x79\x55\x1b\x16\x8a\x2c\xb1\x8e\x25\xf0\xc2\x5e\x80\xa5\x25\xa9\xfb\x7a\x50\x27\x6f\x95\x42\x2c\xb8\x08\x59\x96\xb9\x4e\x6d\x2a\xed\x7a\x1d\x36\xc0\xcf\xf9\xd4\x8d\xe5\x66\xbe\xb6\x44\xc5\xa0\x9c\x1d\xb6\xda\xdc\x97\xb5\x76\x51\x40\x6c\x49\x31\x20\x64\xb5\x0a\x89\x98\x1e\xaf\xeb\xb3\xf8\x80\x89\xfa\x3d\xf2\xac\x56\x7c\xb4\xcd\x49\xdd\xc1\xd1\x83\xb4\x50\x73\xff\xe5\xcb\xe6\x44\xc5\x67\xca\x18\x45\xe3\x77\x04\x65\x85\x56\xb6\x7c\xad\x11\x85\x1d\xd4\xd6\x1c\x15\xef\xc3\x0e\xb9\x4c\xca\x13\xb0\x58\x2b\xb9\x2c\x1a\xb6\xf0\x37\x25\xe2\xbb\xfe\xb4\x94\x9a\xf7\x27\x4a\xd9\xce\xf5\x79\x72\x2a\x03\xdd\x4d\xd2\x23\x18\x77\x01\xba\x4d\x39\x51\x56\x24\x33\xb4\x63\xc5\x22\x09\x71\xb9\x2c\x77\xe7\x54\x94\x06\x14\x4a\x8b\x96\xdd\x79\x9c\xba\xab\xea\xbb\x85\xdd\xec\xf7\x7b\xc9\x6c\xd9\x62\x6c\x61\xe9\xf6\x8a\xe0\x05\x7e\x5a\xe1\x01\x4d\x6d\x24\x2f\x93\x34\x64\x7c\x9e\x67\x23\x61\x2b\xc5\x8b\x0a\x8c\x1a\x40\x50\x28\xb4\xa2\x19\x18\xa1\x5d\xdd\xbe\x1c\xcc\xda\x71\xdb\x5f\x8f\x69\x51\x1a\x4f\x6c\xea\x5c\xa2\xb8\xfb\xb7\x2e\x28\x75\x20\x65\x1f\xe4\x96\xa0\xc9\xe1\xf2\x6e\xb1\xaf\xf2\x2b\x4b\x85\x5c\x96\xdd\x61\x5f\x25\x9d\x7a\xa0\xa5\x19\x76\x9e\x1d\x8a\xec\x58\xc6\x2a\x11\x0a\xfe\x06\xe3\xd6\x43\x45\x06\x14\x38\x7d\x2b\x0f\xda\xe5\xd4\x89\x3a\xa8\x72\x43\xf9\x04\x99\x14\x9c\xed\xa6\x9a\x1a\x8f\xec\x77\xe4\x19\x03\x5e\x72\x35\xb5\xe7\xfe\xd8\xd4\x22\x75\x98\xd5\x6a\xd8\xcf\x9c\xdb\x2c\x93\xcb\x49\xea\x6e\x4b\x86\xb0\xe9\x22\xe6\x50\x2a\x2a\x70\xcb\xd8\xee\xb3\x74\xde\xcb\xb1\xbd\x93\x60\xf0\x65\x66\xc0\xce\xb4\x8c\xed\xff\x76\xec\xdf\x67\xf9\x77\x14\x52\x7c\x30\xdc\xf6\x27\xcf\x72\x9a\xef\x40\xca\x24\x33\x29\xc5\x8d\x53\xdb\xbb\x69\x0d\xd2\xa5\x77\x1b\xc9\xef\x0d\xc4\x02\x87\x4c\xba\x26\xd8\xe6\xc0\x0b\x94\x46\x1e\xbe\x4a\x16\xf5\x40\xd7\xcd\x63\x98\x1b\x5b\xcf\x21\x72\xc8\xf5\xf4\xd7\x02\x5c\x57\xfb\x68\x78\xaf\x95\x02\x8e\xb5\x1f\x50\x7c\x87\x75\x57\x5f\x0f\x71\x5d\xf9\x7f\xe5\x90\xc3\x08\x32\x9c\x79\xc2\x57\xf7\x4c\x63\x07\x74\x17\x5e\x21\xbf\xae\xea\xaf\x06\xe0\x19\xb5\x61\x09\x3c\xbb\xff\xeb\x8f\x60\xb8\xfb\xa1\x5e\xb0\x4f\x0d\x00\xb5\xfe\x94\xfa\xbf\xf3\x59\x79\x7e\x71\x06\xc7\x02\x5d\x7f\x8f\x15\xa1\x1e\x20\xd5\x66\xf9\xa2\xf5\x37\xbd\x98\xa8\x87\xe1\x2e\x21\xb7\xd5\x69\x5a\x1c\x77\x79\x23\x8d\x41\x3e\x21\x19\x77\x4b\x7d\x63\x08\x8a\x2f\x2b\xd7\x9f\xf4\x48\xf7\xc6\xaa\xd2\x5f\xb7\xb3\xfe\x31\x02\xa1\xa6\x7c\xe1\x90\xeb\x49\xaf\x05\x68\xd1\xbe\x79\x5a\x07\xff\x05\x00\x00\xff\xff\x26\xc1\xa4\xe1\x43\x13\x00\x00")
var _bindataTemplatesRdstfMaintf = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\xdf\x6f\xe3\x36\x0c\x7e\xcf\x5f\x21\x04\xf7\x38\xa7\xe9\xdd\x76" +
"\xfd\x01\x04\x5b\xdb\xf4\x86\x0e\xd7\xa1\x6b\x7b\x1b\xb0\x61\x10\x68\x99\x76\x84\xc8\x92\x2b\xc9\x4d\xd3\x5e\xfe" +
"\xf7\x41\x96\x9d\xd8\x49\xda\x24\x73\x9a\x27\xfb\x13\xf9\xf1\x23\x4d\x4a\x6a\x2d\x6a\x0d\xb1\xd2\x29\x79\xe9\x10" +
"\x12\x02\x1b\xa3\x8c\x48\xd7\x7c\xea\x16\x00\x21\x61\xce\xc6\x68\x49\xf3\x37\x20\x5d\x09\x8f\x3c\x08\x41\x8e\x83" +
"\x39\x45\xc0\x54\x9a\x82\x8c\x02\x63\xc1\x62\xb7\x70\xd7\x98\x70\x25\x57\xdd\x21\x0b\x8c\xca\xed\x28\x38\xf4\x76" +
"\x63\x9c\x92\x95\xdf\x80\x74\x75\x64\xbc\xc1\x44\xe9\xb1\xc9\x80\x21\x1d\xe3\x94\x66\x1a\x63\xfe\x54\x1a\xf8\x78" +
"\xe6\xe0\xe5\x85\xf4\x2e\x9f\xac\x86\x5b\x34\x2a\xd7\x0c\x4d\x6f\x08\x16\x42\x30\xd8\xbb\x92\xc6\x82\x64\xf8\x3b" +
"\xa4\x48\x66\x33\xcf\x99\x69\x15\x73\x81\x2b\x41\x59\x1a\x79\x03\x60\x62\xad\x2a\x5f\x94\x40\x4d\x24\xea\x20\xce" +
"\x85\x08\x98\x92\x56\x2b\xe1\xdc\x66\x9d\x59\xa7\x93\xaa\x28\x17\xe8\xf5\x17\x95\xf4\x8a\x6a\x1c\x09\xb7\xa7\xa7" +
"\xc6\x8c\x4e\x0f\x0e\x12\x6e\x7f\x49\xb8\x1d\xe5\x61\x8f\xa5\x51\xaf\x28\xad\x45\x36\xea\x71\x79\x50\xbc\x70\x19" +
"\x6b\x38\xd0\x91\xe9\x25\xdc\xfe\xac\x31\x1e\x1c\xc6\xec\xb0\x7f\x7c\x74\x04\x87\xd1\x49\xd4\xef\x9f\x30\x38\x3e" +
"\xf9\xf8\xb1\x7f\x1c\x1f\xc5\xc7\x27\xf1\xe7\xcf\x27\x78\xf4\xf9\xd3\x8f\x8c\x39\x41\x28\x1f\xb9\x56\x32\x45\x69" +
"\x8b\xd0\x6b\xea\x74\x59\x33\xf9\x4e\x1e\x72\x65\x5d\x95\x3a\x84\xf0\xb2\x6e\x54\xba\xc2\xad\xf5\x5d\x5f\xe3\x06" +
"\x4b\x06\xc6\x4c\x94\x8e\xaa\xe4\xdf\x62\xb9\xa9\x6c\x1b\x0c\xb9\x41\x5d\xff\x04\x6f\x31\x7c\x73\xb6\x0d\xef\x42" +
"\xfc\x92\xf7\x10\x33\xa1\xa6\x2e\xe3\xde\xb2\xe0\x0e\x21\xa9\x92\xdc\x2a\xcd\x65\x42\x77\x11\x7f\x3d\x77\x5b\x9f" +
"\x46\x8d\x76\x91\xd1\xb6\x94\xcb\x79\x75\x08\x89\x4a\x2b\xb3\x05\xd1\x30\x74\x79\x1a\xf2\x9d\xa4\xb9\xb1\xf7\xea" +
"\x37\xa3\xa4\x57\x55\xb1\x50\x0b\x89\x71\x2c\x1d\x2f\xec\x1e\x21\x2d\x49\xdd\xe3\x4a\x9d\xbc\x55\x8a\x11\x67\x3c" +
"\x80\x2c\x73\x6d\xbd\xae\xb4\xb3\x59\xb0\x06\xbe\xcb\x63\x37\xc3\xd5\x30\xce\x89\x8a\xa9\xda\x3a\x6c\xbd\xb9\x77" +
"\x6b\xed\xa2\x80\x76\x43\x8a\x1d\x42\x5e\x5e\x02\xc2\xe3\xd7\xeb\x7a\xc7\x9f\xf1\x4a\xfe\x1a\x7a\x56\xc3\x9f\x37" +
"\xcd\x49\xd3\xc1\xd1\xa3\x30\xd8\x70\xff\xa9\x5f\xad\xc8\x68\x4b\x19\xc3\xf0\xf2\xc9\xa2\x34\x5c\x49\x53\x7e\xd6" +
"\x90\xe2\x02\xda\xd4\x1c\x35\xef\xd5\x0e\xd9\x4d\xca\x2d\x42\xa4\xa4\x98\x16\x0d\x5b\xf8\xeb\x12\xf1\x5d\xff\xb6" +
"\x94\x86\xf7\x3b\x4a\x99\xcf\xf5\x76\x72\x6a\x03\xdd\x4e\xd2\x0d\x6a\x77\x5a\xba\x9d\xf2\x4a\x1a\x9e\x8c\xac\xb9" +
"\x94\x10\x0a\x8c\xca\xcd\x72\xb1\x4e\x79\x69\x40\xb1\xb4\xd8\xb0\x77\xbe\x4e\xdd\x56\xf5\xd9\xc4\x54\xfb\xfb\x85" +
"\x00\x53\xb6\x18\x4c\x0c\x9d\x1f\x11\xac\xc0\xdf\x56\xb8\x42\xd3\x18\xc9\xdd\x24\x9d\x03\x1b\xe7\xd9\x90\x9b\x5a" +
"\xf1\xc2\x02\xa3\x1a\x2d\x4a\xcb\x95\xa4\x19\x6a\xae\x5c\xdd\xfa\x2b\xb3\xf6\xba\xed\xd1\x6b\x5a\xa4\xb2\x6f\xec" +
"\xd4\xb9\xb0\xfc\xec\xef\xa6\xa0\xd4\x81\x14\x9e\xc9\x80\x58\x9d\xe3\xee\xdd\x62\x1e\xc4\x17\x48\xb9\x98\x96\xdd" +
"\x61\x1e\x04\x8d\x3d\xb0\xa1\x19\x16\x9e\x2d\x8a\xec\x58\x2e\x65\xc2\x25\xfe\x89\xda\x6d\x0f\x35\x19\x58\xe0\xf4" +
"\xb1\x5c\xd8\x2c\xa7\x49\xd4\x42\x95\x1b\xca\x5b\xcc\x04\x67\xb0\x98\x6a\xaa\x3d\xb2\xdc\x91\x5b\x0c\x78\xc9\xb5" +
"\xae\x3d\x97\xc7\xa6\x11\xa9\xc5\xac\xd6\xc3\xbe\xe7\xdc\x66\x99\x98\x5e\xa5\xee\xb4\x04\x8b\x55\x17\x81\x43\x29" +
"\xaf\xc1\x1b\xc6\x76\x99\xa5\xf5\x26\x08\x1a\x52\xb4\xa8\x4d\x75\x43\x9c\xbf\x0f\xc8\x3f\xc5\x11\xef\x28\x34\xc8" +
"\x04\xc9\x87\x31\x4e\x7f\x20\x1f\x1e\x41\xe4\x48\x4e\x07\x5b\xb1\x56\x17\x85\xea\x2e\xb3\xb8\xbf\x3a\xb6\xaa\xf7" +
"\xe6\xb7\x09\xcf\xed\xd7\xfd\xf3\xb2\x85\x2f\x59\x8a\x76\x54\x6c\x11\xdd\x0c\x65\xc4\x65\x12\x68\x0c\x95\xb2\xfe" +
"\x0e\x33\x9b\x0b\x2f\x2b\x41\xc8\xbf\xbb\xf7\x76\x64\xce\x04\x6a\x7b\x3f\xd2\x68\x46\x4a\x44\xe6\x7f\x3b\xf6\x2e" +
"\xb2\xfc\x9b\xe5\x82\x3f\x83\x9d\x8f\x2e\xcb\x72\x9a\x2f\x40\x0a\x02\x74\x4a\x6d\xe5\xb4\xa9\x6d\x37\x06\x69\x33" +
"\xd6\x6b\xc9\x2f\x34\x46\xdc\x9e\x83\x70\xf3\x31\xcf\x81\x15\x28\x0d\x3d\xbc\x97\x2c\x9a\x81\xf6\x9b\xc7\x79\xae" +
"\x4d\x33\x87\xd0\x21\xfb\xd3\xdf\x08\xb0\x5f\xed\xc3\xf3\x0b\x25\x25\x32\xdb\xb8\x5b\xb2\x05\xd6\x5e\x7d\x33\xc4" +
"\x7e\xe5\xff\x91\x63\x8e\x43\xcc\xec\xc8\x13\x3e\xb8\x77\x1a\x39\xa0\xbd\xf0\x1a\xf9\x7e\x55\x7f\xd1\x88\x77\x56" +
"\x69\x48\xf0\x2e\x03\x86\x37\xa8\x99\xfb\x1b\xa6\x60\x8f\x35\x22\x35\x7e\x95\xfa\x7f\x8b\x64\xe5\xfa\xce\x19\xbc" +
"\x16\xa8\xf5\xd5\x7b\x7d\xa8\x6b\x4c\x95\x9e\xde\x2b\xf5\x55\x4d\xae\xe4\xf5\xf9\x22\x21\x77\xe0\xd1\xb4\x58\x6e" +
"\xf3\x45\xd6\x06\x79\x87\x64\xdc\x01\xfe\x15\x2c\x4a\x36\xad\xdd\x0c\x84\x47\xda\x37\x56\x9d\x7e\xbf\x9d\xf5\x97" +
"\xe6\x16\x1b\xca\x27\x0e\xd9\x9f\xf4\x46\x80\x0d\xda\xab\xb7\x59\xe7\xbf\x00\x00\x00\xff\xff\xe2\x9e\x55\xa8\x8b" +
"\x14\x00\x00")
func bindataTemplatesRdstfMainTfBytes() ([]byte, error) {
func bindataTemplatesRdstfMaintfBytes() ([]byte, error) {
return bindataRead(
_bindataTemplatesRdstfMainTf,
_bindataTemplatesRdstfMaintf,
"templates/rds-tf/main.tf",
)
}
func bindataTemplatesRdstfMainTf() (*asset, error) {
bytes, err := bindataTemplatesRdstfMainTfBytes()
func bindataTemplatesRdstfMaintf() (*asset, error) {
bytes, err := bindataTemplatesRdstfMaintfBytes()
if err != nil {
return nil, err
}
info := bindataFileInfo{
name: "templates/rds-tf/main.tf",
size: 4931,
size: 5259,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1596519792, 0),
modTime: time.Unix(1603878937, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -327,12 +432,12 @@ func AssetNames() []string {
// _bindata is a table, holding each asset generator, mapped to its name.
//
var _bindata = map[string]func() (*asset, error){
"templates/aws-roles-tf/deploy.sh": bindataTemplatesAwsrolestfDeploySh,
"templates/aws-roles-tf/main.tf": bindataTemplatesAwsrolestfMainTf,
"templates/aws-s3-bucket-tf/deploy.sh": bindataTemplatesAwss3buckettfDeploySh,
"templates/aws-s3-bucket-tf/main.tf": bindataTemplatesAwss3buckettfMainTf,
"templates/rds-tf/deploy.sh": bindataTemplatesRdstfDeploySh,
"templates/rds-tf/main.tf": bindataTemplatesRdstfMainTf,
"templates/aws-roles-tf/deploy.sh": bindataTemplatesAwsrolestfDeploysh,
"templates/aws-roles-tf/main.tf": bindataTemplatesAwsrolestfMaintf,
"templates/aws-s3-bucket-tf/deploy.sh": bindataTemplatesAwss3buckettfDeploysh,
"templates/aws-s3-bucket-tf/main.tf": bindataTemplatesAwss3buckettfMaintf,
"templates/rds-tf/deploy.sh": bindataTemplatesRdstfDeploysh,
"templates/rds-tf/main.tf": bindataTemplatesRdstfMaintf,
}
//
@@ -389,16 +494,16 @@ type bintree struct {
var _bintree = &bintree{Func: nil, Children: map[string]*bintree{
"templates": {Func: nil, Children: map[string]*bintree{
"aws-roles-tf": {Func: nil, Children: map[string]*bintree{
"deploy.sh": {Func: bindataTemplatesAwsrolestfDeploySh, Children: map[string]*bintree{}},
"main.tf": {Func: bindataTemplatesAwsrolestfMainTf, Children: map[string]*bintree{}},
"deploy.sh": {Func: bindataTemplatesAwsrolestfDeploysh, Children: map[string]*bintree{}},
"main.tf": {Func: bindataTemplatesAwsrolestfMaintf, Children: map[string]*bintree{}},
}},
"aws-s3-bucket-tf": {Func: nil, Children: map[string]*bintree{
"deploy.sh": {Func: bindataTemplatesAwss3buckettfDeploySh, Children: map[string]*bintree{}},
"main.tf": {Func: bindataTemplatesAwss3buckettfMainTf, Children: map[string]*bintree{}},
"deploy.sh": {Func: bindataTemplatesAwss3buckettfDeploysh, Children: map[string]*bintree{}},
"main.tf": {Func: bindataTemplatesAwss3buckettfMaintf, Children: map[string]*bintree{}},
}},
"rds-tf": {Func: nil, Children: map[string]*bintree{
"deploy.sh": {Func: bindataTemplatesRdstfDeploySh, Children: map[string]*bintree{}},
"main.tf": {Func: bindataTemplatesRdstfMainTf, Children: map[string]*bintree{}},
"deploy.sh": {Func: bindataTemplatesRdstfDeploysh, Children: map[string]*bintree{}},
"main.tf": {Func: bindataTemplatesRdstfMaintf, Children: map[string]*bintree{}},
}},
}},
}}

1
go.mod
View File

@@ -9,6 +9,7 @@ require (
github.com/caarlos0/env/v6 v6.2.1
github.com/huandu/xstrings v1.2.1 // indirect
github.com/imdario/mergo v0.3.8 // indirect
github.com/sergi/go-diff v1.1.0
github.com/urfave/cli/v2 v2.1.1
golang.org/x/crypto v0.0.0-20200109152110-61a87790db17 // indirect
)

7
go.sum
View File

@@ -25,6 +25,9 @@ github.com/huandu/xstrings v1.2.1/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq
github.com/imdario/mergo v0.3.7/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/imdario/mergo v0.3.8 h1:CGgOkSJeqMRmt0D9XLWExdT4m4F1vd3FV3VPt+0VxkQ=
github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/mitchellh/copystructure v1.0.0 h1:Laisrj+bAB6b/yJwB5Bt3ITZhGJdqmxquMKeZ+mmkFQ=
github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw=
github.com/mitchellh/reflectwalk v1.0.0 h1:9D+8oIskB4VJBN5SFlmc27fSlIBZaov1Wpk/IfikLNY=
@@ -33,6 +36,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/russross/blackfriday/v2 v2.0.1 h1:lPqVAte+HuHNfhJ/0LC98ESWRz8afy9tM/0RK8m9o+Q=
github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sergi/go-diff v1.1.0 h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0=
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
github.com/spf13/cast v1.3.0 h1:oget//CVOEoFewqQxwr0Ej5yjygnqGkvggSE/gB35Q8=
@@ -55,5 +60,7 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=

11
main.go
View File

@@ -2,13 +2,14 @@ package main
import (
"encoding/json"
"io/ioutil"
"log"
"os"
"github.com/a8m/envsubst"
"github.com/asaskevich/govalidator"
"github.com/caarlos0/env/v6"
"github.com/urfave/cli/v2"
"io/ioutil"
"log"
"os"
)
func init() {
@@ -51,8 +52,10 @@ func parseManifest(manifestPath string) (*Manifest, error) {
if manifest.ExtraResources.Environment == "" {
manifest.ExtraResources.Environment = manifest.Environment
}
if manifest.ExtraResources.Workspace == "" {
manifest.ExtraResources.Workspace = workspaceMap[manifest.ExtraResources.Environment]
}
manifest.ExtraResources.Workspace = workspaceMap[manifest.ExtraResources.Environment]
if manifest.Deployment == nil {
manifest.Deployment = &Deployment{}
}

118
main_test.go Normal file
View File

@@ -0,0 +1,118 @@
package main
import (
"bytes"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
"github.cmd.navi-tech.in/navi-infra/infra-provisioner/bindata"
"github.com/sergi/go-diff/diffmatchpatch"
)
const ActualOutputDir = "actual_output"
const TestDataDir = "testdata"
const ExpectedOutputDir = "expected_output"
const ManifestFile = "sample_infra_manifest.json"
func textDiff(text1, text2 string) string {
dmp := diffmatchpatch.New()
diffs := dmp.DiffMain(text1, text2, false)
return dmp.DiffPrettyText(diffs)
}
func CompareResourceWithOutput(resouceDir string, resource string) error {
dirs, err := ioutil.ReadDir(TestDataDir)
if err != nil {
return err
}
for _, dir := range dirs {
fmt.Print(dir.Name())
manifest, err := parseManifest(filepath.Join(TestDataDir, dir.Name(), ManifestFile))
if err != nil {
return err
}
err = templateResourceTf(resource, resouceDir, manifest, filepath.Join(TestDataDir, dir.Name(), ActualOutputDir, resouceDir))
if err != nil {
return err
}
err = filepath.Walk(filepath.Join(TestDataDir, dir.Name(), ExpectedOutputDir, resouceDir),
func(path string, fileInfo os.FileInfo, err error) error {
if err != nil {
return err
}
if fileInfo.IsDir() {
return nil
}
expectedOutput, err := ioutil.ReadFile(path)
if err != nil {
return err
}
actualOutput, err := ioutil.ReadFile(filepath.Join(TestDataDir, dir.Name(), ActualOutputDir, resouceDir, filepath.Base(path)))
if err != nil {
return err
}
if bytes.Compare(expectedOutput, actualOutput) != 0 {
return fmt.Errorf("Mismatch for %s, diff: %s\n", path, textDiff(string(actualOutput), string(expectedOutput)))
}
return nil
})
if err != nil {
return err
}
}
return nil
}
func TestBinData_CompareWithTemplates(t *testing.T) {
err := filepath.Walk(TemplatesDir,
func(path string, fileInfo os.FileInfo, err error) error {
if err != nil {
t.Error(err)
}
if fileInfo.IsDir() {
return nil
}
actualTemplate, err := ioutil.ReadFile(path)
if err != nil {
t.Error(err)
}
binDataTemplate, err := bindata.Asset(path)
if err != nil {
t.Error(err)
}
if bytes.Compare(actualTemplate, binDataTemplate) != 0 {
t.Errorf("Found outdated bindata for %s", path)
}
return nil
})
if err != nil {
t.Error(err)
}
}
func TestTemplates_Rds_CompareWithOutput(t *testing.T) {
err := CompareResourceWithOutput("rds-tf", "rds")
if err != nil {
t.Error(err)
}
}
func TestTemplates_S3_CompareWithOutput(t *testing.T) {
err := CompareResourceWithOutput("aws-s3-bucket-tf", "s3-bucket")
if err != nil {
t.Error(err)
}
}
func TestTemplates_AwsRole_CompareWithOutput(t *testing.T) {
err := CompareResourceWithOutput("aws-roles-tf", "iam-role")
if err != nil {
t.Error(err)
}
}

View File

@@ -1,13 +1,14 @@
package main
import (
"github.cmd.navi-tech.in/navi-infra/infra-provisioner/bindata"
"log"
"os"
"os/exec"
"strings"
"text/template"
"github.cmd.navi-tech.in/navi-infra/infra-provisioner/bindata"
"github.com/Masterminds/sprig/v3"
)
@@ -15,7 +16,7 @@ const TemplatesDir = "templates"
const InitScript = "./deploy.sh"
func provisionResource(resourceName, resourceDir string, manifest *Manifest, templateOnly, plan bool) error {
err := templateResourceTf(resourceName, resourceDir, manifest)
err := templateResourceTf(resourceName, resourceDir, manifest, resourceDir)
if err != nil {
log.Fatalf("\nErr: %v", err)
return err
@@ -32,7 +33,7 @@ func provisionResource(resourceName, resourceDir string, manifest *Manifest, tem
return nil
}
func templateResourceTf(templateName, resourceDir string, manifest *Manifest) error {
func templateResourceTf(templateName, resourceDir string, manifest *Manifest, destinationDir string) error {
log.Printf("Creating templates for %s in %s", templateName, resourceDir)
tfFiles, err := bindata.AssetDir(strings.Join([]string{TemplatesDir, resourceDir}, "/"))
@@ -44,7 +45,7 @@ func templateResourceTf(templateName, resourceDir string, manifest *Manifest) er
tfBytes := bindata.MustAsset(strings.Join([]string{TemplatesDir, resourceDir, tfFile}, "/"))
t := template.Must(template.New(templateName).Funcs(sprig.TxtFuncMap()).Parse(string(tfBytes)))
tfOut, err := createFile(resourceDir, tfFile)
tfOut, err := createFile(destinationDir, tfFile)
if err != nil {
log.Fatalf("\nErr: %v", err)
return err

View File

@@ -1,72 +1,75 @@
{
"extraResources": {
"environment": "dev",
"database": {
"instanceName": "foo-service",
"user": "foo_service_user",
"password": "foo_service_password",
"sizeInGb": 7,
"dbNames": ["foo_service"],
"dbExtensions": ["pgcrypto"],
"readonlyUser": "foo_readonly_user",
"readonlyPassword": "foo_readonly_password",
"applyImmediately": false,
"performanceInsightsEnabled": false,
"readReplica": {
"awsInstanceClass": "db.t3.micro",
"performanceInsightsEnabled": true
},
"rdsAlertThresholds": {
"cpuUtilization": 70,
"cpuCreditBalance": 120,
"burstBalance": 85,
"dbConnections": 200,
"queueDepth": 20,
"freeStorageSpacePercent": 90,
"freeMemoryTooLowInMB": 150,
"readLatency": 0.5,
"writeLatency": 0.5
}
},
"aws_access": {
"policies": [{
"actions": ["s3:GetObject", "s3:PutObject"],
"resource": "arn:aws:s3:::navi-e3e2a9bfd88566b05001b02a3f51d286/*"
},
{
"actions": ["s3:GetObject", "s3:PutObject"],
"resource": "*"
},
{
"resource": "arn:aws:s3:::arn:aws:s3:::test-bucket-to-be-deleted/*",
"actions": ["sns:Publish", "sns:SetSMSAttributes"]
}
]
},
"s3_buckets": [{
"anonymizedBucketName": "navi-bucket-test-1",
"bucketTag": "customer-uploads",
"lifecycleRules": [{
"expiration": {
"days": 1
}
}]
},
{
"anonymizedBucketName": "navi-bucket-test-2",
"bucketTag": "document-uploads",
"lifecycleRules": [{
"expiration": {
"days": 1
}
}]
}
]
},
"team": {
"name": "Infra"
},
"deployment": {
"name": "foo"
}
}
"extraResources": {
"environment": "dev",
"database": {
"instanceName": "foo-service",
"user": "foo_service_user",
"password": "foo_service_password",
"sizeInGb": 7,
"dbNames": ["foo_service"],
"dbExtensions": ["pgcrypto"],
"readonlyUser": "foo_readonly_user",
"readonlyPassword": "foo_readonly_password",
"applyImmediately": false,
"performanceInsightsEnabled": false,
"readReplica": {
"awsInstanceClass": "db.t3.micro",
"performanceInsightsEnabled": true
},
"parameters": {
"rds.logical_replication": "1"
},
"rdsAlertThresholds": {
"cpuUtilization": 70,
"cpuCreditBalance": 120,
"burstBalance": 85,
"dbConnections": 200,
"queueDepth": 20,
"freeStorageSpacePercent": 90,
"freeMemoryTooLowInMB": 150,
"readLatency": 0.5,
"writeLatency": 0.5
}
},
"aws_access": {
"roleName": "foo-role",
"policies": [
{
"actions": ["s3:GetObject", "s3:PutObject"],
"resource": "arn:aws:s3:::navi-e3e2a9bfd88566b05001b02a3f51d286/*"
},
{
"actions": ["s3:GetObject", "s3:PutObject"],
"resource": "*"
},
{
"resource": "arn:aws:s3:::arn:aws:s3:::test-bucket-to-be-deleted/*",
"actions": ["sns:Publish", "sns:SetSMSAttributes"]
}
]
},
"s3_buckets": [
{
"anonymizedBucketName": "navi-bucket-test-1",
"bucketTag": "customer-uploads"
},
{
"anonymizedBucketName": "navi-bucket-test-2",
"bucketTag": "document-uploads",
"lifecycleRules": [
{
"expiration": {
"days": 1
}
}
]
}
]
},
"team": {
"name": "Infra"
},
"deployment": {
"name": "foo"
}
}

View File

@@ -18,4 +18,8 @@ terraform workspace select {{ .ExtraResources.Workspace }} || terraform workspac
terraform $terraform_action $additional_terraform_options
kubectl config use-context ${CLUSTER}
{{- if .ExtraResources.ServiceRole.RoleName }}
kubectl apply -f {{ .ExtraResources.ServiceRole.RoleName }}-{{ .ExtraResources.Environment }}.yaml -n ${NAMESPACE} $additional_kube_options
{{ else }}
kubectl apply -f {{ .Deployment.Name }}-{{ .Deployment.NameSuffix }}-{{ .ExtraResources.Environment }}.yaml -n ${NAMESPACE} $additional_kube_options
{{- end }}

View File

@@ -10,8 +10,12 @@ terraform {
}
module "iam-role" {
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/iam-roles.git"
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/iam-roles.git?ref=cef39cc18b5dd3095cf6969dabfe1cfe09500390"
environment = {{ .ExtraResources.Environment | quote }}
service_role = {{ .ExtraResources.ServiceRole | mustToJson }}
service_role = {"policies":{{ .ExtraResources.ServiceRole.Policies | mustToJson }}}
{{- if .ExtraResources.ServiceRole.RoleName }}
role_name = "{{ .ExtraResources.ServiceRole.RoleName }}"
{{- else }}
role_name = "{{ .Deployment.Name }}-{{ .Deployment.NameSuffix }}"
{{- end }}
}

View File

@@ -10,7 +10,7 @@ terraform {
}
module "s3-buckets" {
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/aws-s3-bucket.git"
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/aws-s3-bucket.git?ref=fd40ccc2a8f4a97029612e618b9d09902ceecfe3"
s3_buckets = {{ .ExtraResources.S3Buckets | mustToJson }}
environment = {{ .ExtraResources.Environment | quote }}
}

View File

@@ -10,7 +10,7 @@ terraform {
}
module "rds" {
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/rds.git"
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/rds.git?ref=1fc10877a1d9d009ca892208f7f89f669e7634cc"
environment = {{ .ExtraResources.Environment | quote }}
instance_name = {{ .ExtraResources.Database.InstanceName | quote }}
password = {{ .ExtraResources.Database.Password | quote }}
@@ -83,6 +83,18 @@ module "rds" {
apply_immediately = {{ .ExtraResources.Database.ApplyImmediately | mustToJson }}
{{- end }}
{{- if .ExtraResources.Database.Parameters }}
parameters = [
{{- range $key, $value := .ExtraResources.Database.Parameters }}
{
name = {{ $key | quote}}
value = {{ $value | quote}}
apply_method = "pending-reboot"
}
{{- end }}
]
{{- end }}
{{- if .ExtraResources.Database.RdsAlertThresholds }}
{{- if .ExtraResources.Database.RdsAlertThresholds.CpuUtilization }}

View File

@@ -0,0 +1,21 @@
#!/bin/sh
# exit when any command fails
set -e
additional_terraform_options=""
additional_kube_options=""
terraform_action=${1:-apply}
if [ $terraform_action == "apply" ];then
additional_terraform_options="${additional_terraform_options} -auto-approve"
else
additional_kube_options="${additional_kube_options} --dry-run"
fi
terraform init
terraform workspace select nonprod.np.navi-tech.in || terraform workspace new nonprod.np.navi-tech.in
terraform $terraform_action $additional_terraform_options
kubectl config use-context ${CLUSTER}
kubectl apply -f foo-navi-service-dev.yaml -n ${NAMESPACE} $additional_kube_options

View File

@@ -0,0 +1,17 @@
terraform {
backend "s3" {
bucket = "navi-bank-terraform-nonprod-state"
region = "ap-south-1"
key = "service-iam-roles"
workspace_key_prefix = "iamroles/dev/foo-navi-service"
profile = "nonprod"
acl = "bucket-owner-full-control"
}
}
module "iam-role" {
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/iam-roles.git?ref=cef39cc18b5dd3095cf6969dabfe1cfe09500390"
environment = "dev"
service_role = {"policies":[{"actions":["s3:GetObject","s3:PutObject"],"resource":"arn:aws:s3:::navi-e3e2a9bfd88566b05001b02a3f51d286/*"},{"actions":["s3:GetObject","s3:PutObject"],"resource":"*"},{"actions":["sns:Publish","sns:SetSMSAttributes"],"resource":"arn:aws:s3:::arn:aws:s3:::test-bucket-to-be-deleted/*"}]}
role_name = "foo-navi-service"
}

View File

@@ -0,0 +1,15 @@
#!/bin/sh
# exit when any command fails
set -e
additional_terraform_options=""
terraform_action=${1:-apply}
if [ $terraform_action == "apply" ];then
additional_terraform_options="${additional_terraform_options} -auto-approve"
fi
terraform init
terraform workspace select nonprod.np.navi-tech.in || terraform workspace new nonprod.np.navi-tech.in
terraform $terraform_action $additional_terraform_options

View File

@@ -0,0 +1,16 @@
terraform {
backend "s3" {
bucket = "navi-bank-terraform-nonprod-state"
region = "ap-south-1"
key = "s3-buckets"
workspace_key_prefix = "s3-buckets/dev/foo-navi-service"
profile = "nonprod"
acl = "bucket-owner-full-control"
}
}
module "s3-buckets" {
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/aws-s3-bucket.git?ref=fd40ccc2a8f4a97029612e618b9d09902ceecfe3"
s3_buckets = [{"anonymizedBucketName":"navi-bucket-test-1","bucketTag":"customer-uploads","lifecycleRules":null},{"anonymizedBucketName":"navi-bucket-test-2","bucketTag":"document-uploads","lifecycleRules":[{"expiration":{"days":1,"storageClass":""}}]}]
environment = "dev"
}

View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -e
additional_terraform_options=""
terraform_action=${1:-apply}
if [ $terraform_action == "apply" ];then
additional_terraform_options="${additional_terraform_options} -auto-approve"
fi
terraform init
terraform workspace select nonprod.np.navi-tech.in || terraform workspace new nonprod.np.navi-tech.in
terraform $terraform_action -target=module.rds.data.aws_subnet_ids.command_private_subnets $additional_terraform_options
terraform $terraform_action -target=module.rds.module.rds_instance $additional_terraform_options
terraform $terraform_action -target=module.rds.module.rds_instance_replica $additional_terraform_options
terraform $terraform_action -target=module.rds.module.postgres_db $additional_terraform_options

View File

@@ -0,0 +1,57 @@
terraform {
backend "s3" {
bucket = "navi-bank-terraform-command-state"
region = "ap-south-1"
key = "rds"
workspace_key_prefix = "rds-states/foo-service"
profile = "cmd"
acl = "bucket-owner-full-control"
}
}
module "rds" {
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/rds.git?ref=1fc10877a1d9d009ca892208f7f89f669e7634cc"
environment = "dev"
instance_name = "foo-service"
password = "foo_service_password"
user = "foo_service_user"
name = "foo"
monitoring_password = ""
monitoring_user = ""
databases = ["foo_service"]
database_tags = {
Team = "Infra"
medici-app = "foo-navi-service"
medici-owner = "Infra"
medici-environment = "dev"
}
team = "Infra"
size = 7
db_extensions = ["pgcrypto"]
readonly_user = "foo_readonly_user"
readonly_password = "foo_readonly_password"
backup_retention_period = 7
multi_az = true
read_replica_instance_class = "db.t3.micro"
read_replica_performance_insights_enabled = true
parameters = [
{
name = "rds.logical_replication"
value = "1"
apply_method = "pending-reboot"
}
]
cpu_utilization_alarm_threshold = "70"
cpucredit_balance_alarm_threshold = "120"
burst_balance_alarm_threshold = "85"
db_connections_alarm_threshold = "200"
queue_depth_alarm_threshold = "20"
free_storage_space_percent = 90
freeable_memory_threshold = 150
read_latency_alarm_threshold = "0.5"
write_latency_alarm_threshold = "0.5"
}

View File

@@ -0,0 +1,74 @@
{
"extraResources": {
"environment": "dev",
"database": {
"instanceName": "foo-service",
"user": "foo_service_user",
"password": "foo_service_password",
"sizeInGb": 7,
"dbNames": ["foo_service"],
"dbExtensions": ["pgcrypto"],
"readonlyUser": "foo_readonly_user",
"readonlyPassword": "foo_readonly_password",
"applyImmediately": false,
"performanceInsightsEnabled": false,
"readReplica": {
"awsInstanceClass": "db.t3.micro",
"performanceInsightsEnabled": true
},
"parameters": {
"rds.logical_replication": "1"
},
"rdsAlertThresholds": {
"cpuUtilization": 70,
"cpuCreditBalance": 120,
"burstBalance": 85,
"dbConnections": 200,
"queueDepth": 20,
"freeStorageSpacePercent": 90,
"freeMemoryTooLowInMB": 150,
"readLatency": 0.5,
"writeLatency": 0.5
}
},
"aws_access": {
"policies": [
{
"actions": ["s3:GetObject", "s3:PutObject"],
"resource": "arn:aws:s3:::navi-e3e2a9bfd88566b05001b02a3f51d286/*"
},
{
"actions": ["s3:GetObject", "s3:PutObject"],
"resource": "*"
},
{
"resource": "arn:aws:s3:::arn:aws:s3:::test-bucket-to-be-deleted/*",
"actions": ["sns:Publish", "sns:SetSMSAttributes"]
}
]
},
"s3_buckets": [
{
"anonymizedBucketName": "navi-bucket-test-1",
"bucketTag": "customer-uploads"
},
{
"anonymizedBucketName": "navi-bucket-test-2",
"bucketTag": "document-uploads",
"lifecycleRules": [
{
"expiration": {
"days": 1
}
}
]
}
]
},
"team": {
"name": "Infra"
},
"deployment": {
"name": "foo"
}
}

View File

@@ -8,7 +8,7 @@ type Deployment struct {
}
type Manifest struct {
Environment string `json:"environment"`
Environment string `json:"environment"`
ExtraResources *ExtraResources `json:"extraResources" valid:"required"`
Team *Team `json:"team"`
Deployment *Deployment `json:"deployment"`
@@ -17,8 +17,8 @@ type Manifest struct {
type ExtraResources struct {
//TODO: Remove environment from ExtraResources once all apps have migrated to new schema
Environment string `json:"environment"`
Workspace string
Environment string `json:"environment"`
Workspace string `json:"workspace"`
Database *Database `json:"database"`
ServiceRole *ServiceRole `json:"aws_access"`
S3Buckets []S3Bucket `json:"s3_buckets"`
@@ -26,25 +26,26 @@ type ExtraResources struct {
//We provide defaults in respective terraforms instead of here to keep all values at one place
type Database struct {
AwsInstanceClass string `json:"awsInstanceClass"`
PsqlFamily string `json:"psqlFamily"`
PsqlEngineVersion string `json:"psqlEngineVersion"`
User string `json:"user" valid:"required"`
Password string `json:"password" valid:"required"`
SizeInGb int `json:"sizeInGb"`
DbNames []string `json:"dbNames"`
InstanceName string `json:"instanceName" valid:"required"`
BackupDisabled bool `json:"backupDisabled"`
MultiAZDisabled bool `json:"multiAZDisabled"`
ApplyImmediately bool `json:"applyImmediately"`
DbExtensions []string `json:"dbExtensions"`
MonitoringUser string `env:"MONITORING_USER"`
MonitoringPassword string `env:"MONITORING_PASSWORD"`
ReadonlyUser string `json:"readonlyUser"`
ReadonlyPassword string `json:"readonlyPassword"`
PerformanceInsightsEnabled bool `json:"performanceInsightsEnabled"`
ReadReplica *ReadReplica `json:"readReplica"`
AwsInstanceClass string `json:"awsInstanceClass"`
PsqlFamily string `json:"psqlFamily"`
PsqlEngineVersion string `json:"psqlEngineVersion"`
User string `json:"user" valid:"required"`
Password string `json:"password" valid:"required"`
SizeInGb int `json:"sizeInGb"`
DbNames []string `json:"dbNames"`
InstanceName string `json:"instanceName" valid:"required"`
BackupDisabled bool `json:"backupDisabled"`
MultiAZDisabled bool `json:"multiAZDisabled"`
ApplyImmediately bool `json:"applyImmediately"`
DbExtensions []string `json:"dbExtensions"`
MonitoringUser string `env:"MONITORING_USER"`
MonitoringPassword string `env:"MONITORING_PASSWORD"`
ReadonlyUser string `json:"readonlyUser"`
ReadonlyPassword string `json:"readonlyPassword"`
PerformanceInsightsEnabled bool `json:"performanceInsightsEnabled"`
ReadReplica *ReadReplica `json:"readReplica"`
RdsAlertThresholds *RdsAlertThresholds `json:"rdsAlertThresholds"`
Parameters map[string]string `json:"parameters"`
}
type Team struct {
@@ -58,6 +59,7 @@ type Policies struct {
type ServiceRole struct {
Policies []Policies `json:"policies"`
RoleName string `json:"roleName"`
}
type StateStoreBackend struct {
@@ -68,7 +70,7 @@ type StateStoreBackend struct {
type S3Bucket struct {
BucketName string `json:"anonymizedBucketName" valid:"required"`
BucketTag string `json:"bucketTag" valid:"required"`
LifecycleRules []map[string]LifecycleRule `json:"lifecycleRules" valid:"required"`
LifecycleRules []map[string]LifecycleRule `json:"lifecycleRules"`
}
type RdsAlertThresholds struct {