diff --git a/bindata/bindata.go b/bindata/bindata.go index 76bae27..372d6c6 100644 --- a/bindata/bindata.go +++ b/bindata/bindata.go @@ -99,7 +99,7 @@ func templatesAuroraDbTfDeploySh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/aurora-db-tf/deploy.sh", size: 1515, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/aurora-db-tf/deploy.sh", size: 1515, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x1f, 0xd6, 0xbd, 0xd6, 0x82, 0xa3, 0x1c, 0xc9, 0xe8, 0x32, 0xeb, 0x25, 0x3d, 0x8b, 0x44, 0x41, 0x2c, 0xe, 0x9, 0x9b, 0xa, 0xa1, 0x3e, 0xaa, 0x8, 0xfc, 0x72, 0xef, 0x72, 0x46, 0x2a, 0xfd}} return a, nil } @@ -119,7 +119,7 @@ func templatesAuroraDbTfMainTf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/aurora-db-tf/main.tf", size: 9464, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/aurora-db-tf/main.tf", size: 9464, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb2, 0x73, 0x98, 0x1, 0xbd, 0xe8, 0x19, 0xf1, 0x92, 0xce, 0x7b, 0x7a, 0xee, 0xb0, 0x13, 0x27, 0x67, 0x9, 0x4e, 0xf0, 0x11, 0x7c, 0xb, 0xa0, 0x5d, 0xa2, 0xef, 0xcc, 0xc9, 0xc, 0xd4, 0x14}} return a, nil } @@ -139,7 +139,7 @@ func templatesAwsRolesTfDeploySh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/aws-roles-tf/deploy.sh", size: 1990, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/aws-roles-tf/deploy.sh", size: 1990, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xf2, 0xc1, 0xfa, 0x34, 0x44, 0x42, 0x27, 0x15, 0x68, 0x62, 0xdc, 0xe8, 0x4a, 0x1e, 0x85, 0x58, 0x5c, 0xb8, 0xab, 0x65, 0x5e, 0xc2, 0x4, 0x49, 0x88, 0x25, 0x38, 0x16, 0x12, 0x65, 0xcc, 0xe4}} return a, nil } @@ -159,7 +159,7 @@ func templatesAwsRolesTfMainTf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/aws-roles-tf/main.tf", size: 1444, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/aws-roles-tf/main.tf", size: 1444, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x21, 0xc0, 0xf1, 0x87, 0xbc, 0xc8, 0x66, 0xa3, 0x32, 0x15, 0x1f, 0x5c, 0x5e, 0xc0, 0x20, 0x98, 0x66, 0x3b, 0x4a, 0xfc, 0x2a, 0x16, 0x33, 0x88, 0x38, 0x9d, 0x56, 0x79, 0x34, 0xa9, 0x3c, 0x20}} return a, nil } @@ -179,7 +179,7 @@ func templatesAwsS3BucketTfDeploySh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/aws-s3-bucket-tf/deploy.sh", size: 1075, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/aws-s3-bucket-tf/deploy.sh", size: 1075, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xbf, 0x25, 0x7b, 0x3a, 0x87, 0xcb, 0x58, 0x6a, 0x11, 0xb8, 0x7e, 0x6, 0x13, 0x49, 0x6b, 0x1c, 0xcd, 0xeb, 0xc7, 0x89, 0x7, 0x67, 0x45, 0x63, 0xa, 0xd3, 0x71, 0x60, 0xd7, 0xf9, 0x99, 0x5b}} return a, nil } @@ -199,7 +199,7 @@ func templatesAwsS3BucketTfMainTf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/aws-s3-bucket-tf/main.tf", size: 1537, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/aws-s3-bucket-tf/main.tf", size: 1537, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x27, 0x1e, 0xa0, 0x8, 0x2d, 0x33, 0xea, 0x2d, 0x44, 0x48, 0x4f, 0x94, 0xe3, 0x64, 0x23, 0x93, 0xbb, 0x27, 0x4d, 0xdf, 0xa0, 0xff, 0xc1, 0x86, 0x9, 0x24, 0xaa, 0x3e, 0xdf, 0x24, 0xe1, 0x30}} return a, nil } @@ -219,7 +219,7 @@ func templatesDocumentDbTfDeploySh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/document-db-tf/deploy.sh", size: 1045, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/document-db-tf/deploy.sh", size: 1045, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x90, 0x5d, 0x7e, 0x37, 0x93, 0x3d, 0x1a, 0x41, 0x45, 0x5d, 0xe3, 0xf2, 0x12, 0x6d, 0x3, 0x7f, 0x53, 0x8c, 0xe1, 0x89, 0x9c, 0xf2, 0xab, 0xd2, 0x8f, 0xfe, 0x8b, 0x39, 0x3, 0xd8, 0xa, 0x5f}} return a, nil } @@ -239,7 +239,7 @@ func templatesDocumentDbTfMainTf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/document-db-tf/main.tf", size: 4899, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/document-db-tf/main.tf", size: 4899, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x15, 0x71, 0x19, 0xf9, 0x10, 0x63, 0x26, 0x7b, 0xac, 0xde, 0x6e, 0x78, 0x36, 0xb, 0x6a, 0x5e, 0x44, 0xe3, 0x10, 0x28, 0xe8, 0x75, 0x6d, 0x8, 0xab, 0xdc, 0x3b, 0x30, 0x88, 0x18, 0x4f, 0xec}} return a, nil } @@ -259,7 +259,7 @@ func templatesDynamoDbTfDeploySh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/dynamo-db-tf/deploy.sh", size: 646, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/dynamo-db-tf/deploy.sh", size: 646, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xee, 0xd3, 0x54, 0xbc, 0x8d, 0xbf, 0x7d, 0x81, 0x33, 0x48, 0xbc, 0x6e, 0x52, 0xf2, 0xed, 0xff, 0x9d, 0x11, 0x40, 0x23, 0xc9, 0xb5, 0xa, 0xe8, 0xf7, 0xea, 0xf3, 0x65, 0x15, 0x4d, 0x18, 0x55}} return a, nil } @@ -279,7 +279,7 @@ func templatesDynamoDbTfMainTf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/dynamo-db-tf/main.tf", size: 4473, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/dynamo-db-tf/main.tf", size: 4473, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x2d, 0xc, 0xb, 0x7, 0x91, 0xda, 0xbd, 0x88, 0x79, 0xe7, 0xf, 0x5c, 0x8e, 0x32, 0x8b, 0x7e, 0x83, 0x86, 0xe, 0xc8, 0xe8, 0xec, 0x9c, 0xee, 0xb7, 0x5a, 0x85, 0x6e, 0xd6, 0xeb, 0x16, 0x60}} return a, nil } @@ -299,7 +299,7 @@ func templatesElasticCacheTfDeploySh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/elastic-cache-tf/deploy.sh", size: 1047, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/elastic-cache-tf/deploy.sh", size: 1047, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xb6, 0x8d, 0x67, 0xb1, 0x4e, 0x5b, 0x3d, 0x79, 0x4b, 0xf, 0x11, 0xb2, 0xe4, 0xd2, 0x80, 0x23, 0x8e, 0x62, 0x89, 0x19, 0xa5, 0x8c, 0x62, 0xbe, 0xe2, 0xfc, 0x4a, 0x4c, 0xc9, 0x92, 0x11, 0x82}} return a, nil } @@ -319,7 +319,7 @@ func templatesElasticCacheTfMainTf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/elastic-cache-tf/main.tf", size: 5565, mode: os.FileMode(0644), modTime: time.Unix(1716886554, 0)} + info := bindataFileInfo{name: "templates/elastic-cache-tf/main.tf", size: 5565, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x8f, 0x3c, 0x66, 0x49, 0x51, 0x47, 0x68, 0x46, 0x6f, 0xa5, 0x84, 0x71, 0x3b, 0xa1, 0xb5, 0xbf, 0x44, 0x60, 0x73, 0xb6, 0xba, 0x93, 0x63, 0xde, 0x76, 0x84, 0x83, 0x8f, 0xbe, 0x99, 0x8d, 0x43}} return a, nil } @@ -339,7 +339,7 @@ func templatesRdsTfDeploySh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/rds-tf/deploy.sh", size: 4236, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/rds-tf/deploy.sh", size: 4236, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x7d, 0x97, 0x54, 0x2e, 0xed, 0xac, 0xfc, 0xdd, 0x21, 0xdc, 0x2d, 0xfa, 0x30, 0x98, 0xd5, 0xab, 0xf5, 0xb6, 0x66, 0x1e, 0xc2, 0xb8, 0xdd, 0x4b, 0xc0, 0xf, 0xf0, 0x3, 0x68, 0xb9, 0xa0, 0x2c}} return a, nil } @@ -359,7 +359,7 @@ func templatesRdsTfMainTf() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/rds-tf/main.tf", size: 11550, mode: os.FileMode(0644), modTime: time.Unix(1716908453, 0)} + info := bindataFileInfo{name: "templates/rds-tf/main.tf", size: 11550, mode: os.FileMode(0644), modTime: time.Unix(1717746834, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x83, 0xe0, 0x8f, 0x76, 0x82, 0x98, 0x19, 0xe7, 0xe6, 0xf6, 0xbb, 0x4, 0xe0, 0xcd, 0x9f, 0x2f, 0x20, 0x5a, 0x27, 0x31, 0x36, 0x62, 0x3a, 0x3c, 0x6b, 0xd, 0xcd, 0xd7, 0x6, 0x96, 0x8c, 0x19}} return a, nil } @@ -379,7 +379,7 @@ func templatesRdsTfScriptsPostTerraformApplyModifyVersion11__to__13Sh() (*asset, return nil, err } - info := bindataFileInfo{name: "templates/rds-tf/scripts/post-terraform-apply/modify-version/11__to__13.sh", size: 2751, mode: os.FileMode(0755), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/rds-tf/scripts/post-terraform-apply/modify-version/11__to__13.sh", size: 2751, mode: os.FileMode(0755), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0xc8, 0x4b, 0x4, 0x40, 0x45, 0x23, 0xbd, 0xb2, 0x6f, 0xae, 0xe2, 0x47, 0x17, 0xea, 0xca, 0x94, 0x12, 0x5e, 0x7, 0x82, 0x42, 0x51, 0xfc, 0x56, 0x35, 0x8, 0x4f, 0x68, 0x8, 0xee, 0x1b, 0x1f}} return a, nil } @@ -399,7 +399,7 @@ func templatesRdsTfScriptsPreTerraformApplyModifyVersion11__to__13Sh() (*asset, return nil, err } - info := bindataFileInfo{name: "templates/rds-tf/scripts/pre-terraform-apply/modify-version/11__to__13.sh", size: 5643, mode: os.FileMode(0755), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/rds-tf/scripts/pre-terraform-apply/modify-version/11__to__13.sh", size: 5643, mode: os.FileMode(0755), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x13, 0xb, 0x3c, 0x85, 0xfa, 0x1b, 0x6f, 0xc1, 0xa9, 0xef, 0xc4, 0x15, 0xcf, 0xc0, 0xad, 0xd4, 0x29, 0x3, 0xbf, 0x4a, 0xec, 0x13, 0x24, 0x6f, 0x3d, 0xd3, 0xc3, 0x97, 0xba, 0xfe, 0x72, 0x4a}} return a, nil } @@ -419,7 +419,7 @@ func templatesRdsTfScriptsRun_additional_scriptsSh() (*asset, error) { return nil, err } - info := bindataFileInfo{name: "templates/rds-tf/scripts/run_additional_scripts.sh", size: 1443, mode: os.FileMode(0644), modTime: time.Unix(1715691684, 0)} + info := bindataFileInfo{name: "templates/rds-tf/scripts/run_additional_scripts.sh", size: 1443, mode: os.FileMode(0644), modTime: time.Unix(1717746828, 0)} a := &asset{bytes: bytes, info: info, digest: [32]uint8{0x9, 0x7c, 0x45, 0x1e, 0x80, 0x15, 0x42, 0x13, 0x4, 0x79, 0x3b, 0x52, 0x2b, 0x63, 0x32, 0xaa, 0x5d, 0x9, 0xe8, 0xe, 0xe3, 0x6f, 0xfa, 0x6, 0x60, 0x7d, 0xaf, 0xab, 0x6d, 0xc6, 0x72, 0x7}} return a, nil } diff --git a/config/prod/default.yml b/config/prod/default.yml index c75a5c7..5f2fb3a 100644 --- a/config/prod/default.yml +++ b/config/prod/default.yml @@ -1,2 +1,2 @@ app_name: infra-provisioner-v2 -version: v2.48.0 +version: v2.48.1 diff --git a/resource.go b/resource.go index af9aba8..2453634 100644 --- a/resource.go +++ b/resource.go @@ -240,7 +240,8 @@ func templateResourceTf(templateName, resourceDir string, manifest *Manifest, de err = t.Execute(tfOut, manifest) if err != nil { - log.Fatalf("\nErr: %v", err) + log.Fatalf("\nError while Templating %s. \nPlease ensure %s is present in the manifest, if present please check if the configurations are correct.\n"+ + "Err: %v", resourceDir, templateDirMap[resourceDir], err) return err } tfOut.Close() diff --git a/types.go b/types.go index 8bbde5d..5273843 100644 --- a/types.go +++ b/types.go @@ -379,6 +379,16 @@ var InfraVerticals = map[string]string{ "lending": "", } +var templateDirMap = map[string]string{ + DIR_RDS_TF: "DATABASE", + DIR_ELASTIC_CACHE_TF: "ELASTIC CACHE", + DIR_DOCDB_TF: "DOCUMENT DB", + DIR_AWS_ROLES_TF: "AWS ACCESS", + DIR_S3_BUCKETS_TF: "S3 BUCKETS", + DIR_DYNAMODB_TF: "DYNAMODB", + DIR_AURORADB_TF: "DATABASE", +} + type ExtraResourceData struct { ResourceName string `json:"resourceName"` IsDeployed bool `json:"isDeployed"`