Compare commits

...

10 Commits

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
20 changed files with 469 additions and 104 deletions

3
.gitignore vendored
View File

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

View File

@@ -84,19 +84,20 @@ func (fi bindataFileInfo) Sys() interface{} {
}
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")
"\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) {
return bindataRead(
@@ -115,10 +116,10 @@ func bindataTemplatesAwsrolestfDeploysh() (*asset, error) {
info := bindataFileInfo{
name: "templates/aws-roles-tf/deploy.sh",
size: 715,
size: 924,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1598427906, 0),
modTime: time.Unix(1603873082, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -127,19 +128,22 @@ func bindataTemplatesAwsrolestfDeploysh() (*asset, error) {
}
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")
"\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) {
return bindataRead(
@@ -158,10 +162,10 @@ func bindataTemplatesAwsrolestfMaintf() (*asset, error) {
info := bindataFileInfo{
name: "templates/aws-roles-tf/main.tf",
size: 735,
size: 941,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1598427906, 0),
modTime: time.Unix(1603878934, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -199,7 +203,7 @@ func bindataTemplatesAwss3buckettfDeploysh() (*asset, error) {
size: 428,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1589190905, 0),
modTime: time.Unix(1603873082, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -208,19 +212,20 @@ func bindataTemplatesAwss3buckettfDeploysh() (*asset, error) {
}
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")
"\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) {
return bindataRead(
@@ -239,10 +244,10 @@ func bindataTemplatesAwss3buckettfMaintf() (*asset, error) {
info := bindataFileInfo{
name: "templates/aws-s3-bucket-tf/main.tf",
size: 660,
size: 705,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1598427906, 0),
modTime: time.Unix(1603879053, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -283,7 +288,7 @@ func bindataTemplatesRdstfDeploysh() (*asset, error) {
size: 817,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1593411032, 0),
modTime: time.Unix(1603873082, 0),
}
a := &asset{bytes: bytes, info: info}
@@ -292,46 +297,48 @@ func bindataTemplatesRdstfDeploysh() (*asset, error) {
}
var _bindataTemplatesRdstfMaintf = []byte(
"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\xff\xb4\x58\x61\x6f\xe3\x36\x0f\xfe\x9e\x5f\x21\x04\xf7\xf1\x75\x7a\x2f\x86" +
"\x61\x40\x81\x02\x6b\x9b\xde\xd0\xe1\x3a\x74\x6d\x6f\x03\x36\x0c\x02\x2d\x33\x8e\x10\x59\x72\x25\xba\x69\xda\xcb" +
"\x7f\x1f\x64\xd9\x89\x9d\xb8\x4d\x32\xa7\xf9\x14\x3d\x22\x1f\x3e\x64\x48\x49\x2d\xa1\xb5\x30\x31\x36\x63\xaf\x03" +
"\xc6\x62\x10\x33\xd4\x09\x1b\xba\x1f\x86\x25\xc0\x58\x5c\x88\x19\x12\x6b\x7f\xce\xd8\x50\xc3\x93\x8c\x62\xd0\xb3" +
"\x68\x45\x11\x09\x93\x65\xa0\x93\xc8\x11\x10\x0e\x4b\x77\x8b\xa9\x34\x7a\xdb\x1d\xf2\xc8\x99\x82\xa6\xd1\xff\x83" +
"\xdd\x0c\x17\x6c\xeb\x73\xc6\x86\x36\x71\xc1\x60\x6e\xec\xcc\xe5\x20\x90\xcf\x70\xc1\x73\x8b\x13\xf9\x5c\x19\x84" +
"\x78\xee\xe4\xf5\x95\x8d\xae\x9e\xc9\xc2\x1d\x3a\x53\x58\x81\x6e\x34\x06\x82\x18\x1c\x8e\xae\xb5\x23\xd0\x02\x7f" +
"\x83\x0c\xd9\x72\x19\x38\x73\x6b\x26\x52\xe1\x56\x50\x91\x25\xc1\x00\x84\xea\x54\x15\x8a\x12\x99\xb9\x46\x1b\x4d" +
"\x0a\xa5\x22\x61\x34\x59\xa3\xbc\xdb\x72\xb0\x1c\x0c\x32\x93\x14\x0a\x83\xfe\xb2\x92\x41\x51\x83\x23\x95\x74\x7a" +
"\xea\xdc\xf4\xf4\xe4\x24\x95\xf4\x73\x2a\x69\x5a\xc4\x23\x91\x25\xa3\xb2\xb4\x84\x62\x3a\x92\xfa\xa4\x5c\x48\x3d" +
"\xb1\x70\x62\x13\x37\x4a\x25\xf9\x18\xa8\x9f\xa4\x35\x3a\x43\x4d\x25\x5b\x47\xea\x57\x0d\x93\xef\xec\xb1\x30\xe4" +
"\x13\x1f\x30\x26\xab\x52\x70\xed\x6b\xd1\xe9\xdb\x5d\xb6\x16\x4b\x0e\xce\xcd\x8d\x4d\xea\x7c\xde\x63\xb9\xad\x6d" +
"\x5b\x0c\x85\x43\xdb\xac\xea\x7b\x0c\xdf\xbc\x6d\xcb\xbb\x14\xbf\xe1\x3d\xc6\x5c\x99\x85\xcf\x78\xb4\x29\x78\xc0" +
"\x58\x66\xb4\x24\x63\xa5\x4e\xf9\x21\xe2\x6f\x56\x6e\xdd\x69\x34\x68\xd7\x19\xed\x4b\xb9\x99\xd7\x80\xb1\xa4\xb2" +
"\x72\x7b\x10\x8d\x63\x9f\xa7\x63\xdf\x59\x56\x38\x7a\x30\xbf\x3a\xa3\x83\xaa\x9a\x85\x13\xa4\xce\xb3\x0c\x82\xb0" +
"\x07\x84\xac\x22\xf5\x5f\xb7\xea\x14\xac\x32\x4c\xa4\x90\x11\xe4\xb9\xef\xd4\xae\xd2\x2e\x97\x51\x07\x7c\x5f\x4c" +
"\xfc\x58\xd6\xf3\xb5\x22\x2a\x07\x65\xef\xb0\xcd\xe6\x3e\xac\xb5\xcb\x02\xd2\x8e\x14\x07\x8c\xbd\xbe\x46\x4c\x4e" +
"\xde\xae\xeb\xbd\x7c\xc1\x6b\xfd\x4b\x1c\x58\x9d\x7c\xd9\x35\x27\x6d\x07\x4f\x8f\xca\x61\xcb\xfd\xc7\xcf\xf5\x8e" +
"\x4e\xf6\x94\x31\x8e\xaf\x9e\x09\xb5\x93\x46\xbb\xea\x67\x8d\x39\xae\xa1\x5d\xcd\xd1\xf0\xde\xee\x90\xc3\xa4\xdc" +
"\x21\x24\x46\xab\x45\xd9\xb0\xa5\xbf\xad\x90\xd0\xf5\xef\x4b\x69\x79\x7f\xa0\x94\xd5\x5c\xef\x27\xa7\x31\xd0\xfd" +
"\x24\xdd\xa2\xf5\x17\xa0\x3f\x29\xaf\xb5\x93\xe9\x94\xdc\x95\x86\x58\x61\x52\x1d\x96\xeb\x7d\x2e\x2b\x03\x8e\x95" +
"\xc5\x8e\xb3\xf3\x6d\xea\xbe\xaa\xcf\xe7\xae\x3e\xdf\x2f\x15\xb8\xaa\xc5\x60\xee\xf8\xea\x8a\x10\x25\xfe\xbe\xc2" +
"\x2d\x9a\xd6\x48\x1e\x26\xe9\x02\xc4\xac\xc8\xc7\xd2\x35\x8a\x17\x97\x18\xb7\x48\xa8\x49\x1a\xcd\x73\xb4\xd2\xf8" +
"\xba\x7d\xde\x9a\xb5\xb7\x6d\x7f\x7a\x4b\x8b\x36\xf4\xce\x49\x5d\x28\x92\xe7\x7f\xb5\x05\x65\x1e\xe4\xf0\xc2\xce" +
"\x18\xd9\x02\x0f\xef\x16\xf7\xa8\xbe\x40\x26\xd5\xa2\xea\x0e\xf7\xa8\xf8\x24\x00\x3b\x9a\x61\xed\xd9\xa3\xc8\x9e" +
"\xe5\x4a\xa7\x52\xe3\x1f\x68\xfd\xf1\xd0\x90\x81\x25\xce\x9f\xaa\x8d\xdd\x72\xda\x44\x3d\x54\xf9\xa1\xbc\xc3\x5c" +
"\x49\x01\xeb\xa9\xe6\x36\x20\x9b\x1d\xb9\xc7\x80\x57\x5c\x5d\xed\xb9\x39\x36\xad\x48\x3d\x66\xb5\x19\xf6\x23\xe7" +
"\x36\xcf\xd5\xe2\x3a\xf3\xb7\x25\x10\xd6\x5d\x04\x1e\xe5\xb2\x01\xef\x18\xdb\x4d\x96\xde\x87\x20\x58\xc8\x90\xd0" +
"\xba\xfa\x85\xb8\x5a\x9f\xb1\xbf\xcb\x2b\xde\x53\x58\xd0\x29\xb2\x4f\x33\x5c\xfc\x8f\x7d\x7a\x02\x55\x20\x3b\x3d" +
"\xdb\x8b\xb5\x7e\x28\xd4\x6f\x99\xf5\xfb\xd5\xb3\xd5\xbd\xb7\x7a\x4d\x04\xee\xb0\x1f\xbe\x6f\x5a\x84\x92\x65\x48" +
"\xd3\xf2\x88\x18\xe6\xa8\x13\xa9\xd3\xc8\x62\x6c\x0c\x85\x37\xcc\x72\x25\xbc\xaa\x04\x63\xff\x1c\xde\xdb\x89\x3b" +
"\x57\x68\xe9\x61\x6a\xd1\x4d\x8d\x4a\xdc\x7f\x76\x1c\x5d\xe6\xc5\x37\x92\x4a\xbe\x00\xad\x46\x57\xe4\x05\x2f\xd6" +
"\x20\x07\x05\x36\xe3\x54\x3b\xed\x6a\xdb\x9d\x41\xfa\x8c\x75\x27\xf9\xa5\xc5\x44\xd2\x05\x28\x3f\x1f\xab\x1c\x44" +
"\x89\xf2\x38\xc0\x47\xc9\xa2\x1d\xe8\xb8\x79\x5c\x14\xd6\xb5\x73\x88\x3d\x72\x3c\xfd\xad\x00\xc7\xd5\x3e\xbe\xb8" +
"\x34\x5a\xa3\xa0\xd6\xdb\x52\xac\xb1\xfe\xea\xdb\x21\x8e\x2b\xff\xf7\x02\x0b\x1c\x63\x4e\xd3\x40\xf8\xe8\xd7\x3c" +
"\xf1\x40\x7f\xe1\x0d\xf2\xe3\xaa\xfe\x62\x11\xef\xc9\x58\x48\xf1\x3e\x07\x81\xb7\x68\x85\xff\x1b\xa6\x64\x9f\x58" +
"\x44\xee\xc2\x2e\x0f\xff\xe9\xc8\xab\xfd\x83\x33\x78\x2b\x50\xef\xa7\x77\x77\xa8\x1b\xcc\x8c\x5d\x3c\x18\xf3\xd5" +
"\xcc\xaf\xf5\xcd\xc5\x3a\x21\x7f\xe1\xf1\xac\xdc\xee\xf3\x8b\x74\x06\xf9\x80\x64\xfc\x05\xfe\x15\x08\xb5\x58\x34" +
"\x5e\x06\x2a\x20\xfd\x1b\xab\x49\x7f\xdc\xce\xfa\xd3\x4a\xc2\x96\xf2\xb9\x47\x8e\x27\xbd\x15\x60\x87\xf6\x7a\xb5" +
"\x1c\xfc\x1b\x00\x00\xff\xff\x49\x50\xa6\xb2\x5e\x14\x00\x00")
"\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) {
return bindataRead(
@@ -350,10 +357,10 @@ func bindataTemplatesRdstfMaintf() (*asset, error) {
info := bindataFileInfo{
name: "templates/rds-tf/main.tf",
size: 5214,
size: 5259,
md5checksum: "",
mode: os.FileMode(420),
modTime: time.Unix(1598427985, 0),
modTime: time.Unix(1603878937, 0),
}
a := &asset{bytes: bytes, info: info}

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

@@ -32,6 +32,7 @@
}
},
"aws_access": {
"roleName": "foo-role",
"policies": [
{
"actions": ["s3:GetObject", "s3:PutObject"],

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 }}

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

@@ -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"`
@@ -59,6 +59,7 @@ type Policies struct {
type ServiceRole struct {
Policies []Policies `json:"policies"`
RoleName string `json:"roleName"`
}
type StateStoreBackend struct {