Merge pull request #46 from navi-infra/INFRA-558
INFRA-558| Deepak Jain| adding option to add role_name
This commit is contained in:
@@ -118,7 +118,7 @@ func bindataTemplatesAwsrolestfDeploysh() (*asset, error) {
|
||||
size: 715,
|
||||
md5checksum: "",
|
||||
mode: os.FileMode(420),
|
||||
modTime: time.Unix(1598427906, 0),
|
||||
modTime: time.Unix(1602477747, 0),
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
@@ -127,19 +127,21 @@ 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\x4f\x6b\xdc\x30\x10\xc5\xef\xfe\x14\x83\xef\x92\x29\xbd\x2d\x04" +
|
||||
"\xda\xd0\x5c\x7a\x28\x21\x2e\xf4\xb8\x68\xb5\x63\x7b\xb0\xac\x71\xf5\x67\x93\xc5\xf1\x77\x2f\x92\x9c\xb2\x25\x4b" +
|
||||
"\x1a\xa2\x83\x41\xe2\xbd\xdf\xcc\xbc\x71\x40\xe7\x54\xc7\x6e\x82\xa5\x02\x38\x28\x3d\xa2\x3d\x42\xed\x3f\xd7\xf9" +
|
||||
"\x01\xe0\x10\xf5\x88\x01\xfe\x3d\x37\x50\x2f\x0b\xc8\x36\xa8\x80\x6d\x60\x87\xb7\xc5\x28\x6f\xb3\xfa\x87\x9a\x10" +
|
||||
"\xd6\xb5\xce\x00\x87\x3d\xb1\x7d\x0d\x50\xb3\xf0\x1c\xc3\x20\x3e\x15\xdd\x88\x67\x78\x75\x6e\xa0\xf6\xe8\x4e\xa4" +
|
||||
"\x51\x90\x9a\x84\x63\x83\xbe\xc8\x1f\xd9\x8d\x7e\x56\x1a\xf7\x23\x9e\xf7\xb3\xc3\x8e\x9e\x92\x9c\xd4\x94\x55\x4d" +
|
||||
"\x6a\xf0\xee\x29\x38\xf5\x80\x9e\xa3\xd3\xe8\xe5\x9d\x3d\x91\x63\x3b\xa1\x0d\xb0\xae\x59\xf1\x0d\x67\xc3\xe7\xf4" +
|
||||
"\x22\xb7\xae\xc5\x95\xe7\x36\x76\x09\xff\x32\xd2\xec\xb8\x23\x83\xef\xcc\xe4\xeb\xaf\xf6\x7e\x33\xbc\x00\x94\x36" +
|
||||
"\x57\x67\x2d\x61\x0b\x7e\xb4\xe8\x44\x17\x8d\x11\x9a\x6d\x70\x6c\x92\x6d\xad\xd6\xaa\x9a\xf8\x18\x0d\xe6\x31\x73" +
|
||||
"\x1a\x65\x4d\x65\xc0\x0b\x50\x4f\x61\xb7\xf3\x7e\xd8\x35\x4d\x4f\xe1\x4b\x4f\x61\x88\x07\xa9\xa7\xa3\xb4\xea\x44" +
|
||||
"\x22\xa0\x1e\x24\xd9\x26\x5f\xc8\x76\x4e\x35\x7f\xe3\x95\x3d\x85\x54\x0e\x2f\xc2\x4a\xcc\xff\xe4\xf9\x0c\xbf\x23" +
|
||||
"\x87\x34\x62\xea\xa7\xec\x6c\x9f\x80\xd9\x5b\xcf\x6c\x48\x13\xfa\x7a\x77\x85\xd3\x16\xf9\x03\x1b\x94\xf7\x9b\x10" +
|
||||
"\x9e\x61\x8a\x3e\xfc\xe4\xef\x9e\x2d\xac\x19\xbb\x2c\x02\xa8\x7b\xd3\x9e\x3e\xdb\x22\x2b\x80\x54\x7f\x6f\xd3\xf5" +
|
||||
"\x62\x43\xef\x73\xd7\x5b\x3d\x34\xfe\x2d\xd8\x07\xfe\x9f\x4c\xb5\xc7\x04\x5d\xab\x3f\x01\x00\x00\xff\xff\x36\xac" +
|
||||
"\x49\x0b\x80\x03\x00\x00")
|
||||
|
||||
func bindataTemplatesAwsrolestfMaintfBytes() ([]byte, error) {
|
||||
return bindataRead(
|
||||
@@ -158,10 +160,10 @@ func bindataTemplatesAwsrolestfMaintf() (*asset, error) {
|
||||
|
||||
info := bindataFileInfo{
|
||||
name: "templates/aws-roles-tf/main.tf",
|
||||
size: 735,
|
||||
size: 896,
|
||||
md5checksum: "",
|
||||
mode: os.FileMode(420),
|
||||
modTime: time.Unix(1598427906, 0),
|
||||
modTime: time.Unix(1602480027, 0),
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
@@ -242,7 +244,7 @@ func bindataTemplatesAwss3buckettfMaintf() (*asset, error) {
|
||||
size: 660,
|
||||
md5checksum: "",
|
||||
mode: os.FileMode(420),
|
||||
modTime: time.Unix(1598427906, 0),
|
||||
modTime: time.Unix(1602477747, 0),
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
@@ -353,7 +355,7 @@ func bindataTemplatesRdstfMaintf() (*asset, error) {
|
||||
size: 5214,
|
||||
md5checksum: "",
|
||||
mode: os.FileMode(420),
|
||||
modTime: time.Unix(1598427985, 0),
|
||||
modTime: time.Unix(1602477747, 0),
|
||||
}
|
||||
|
||||
a := &asset{bytes: bytes, info: info}
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
}
|
||||
},
|
||||
"aws_access": {
|
||||
"roleName": "foo-role",
|
||||
"policies": [
|
||||
{
|
||||
"actions": ["s3:GetObject", "s3:PutObject"],
|
||||
|
||||
@@ -12,6 +12,10 @@ terraform {
|
||||
module "iam-role" {
|
||||
source = "git::ssh://git@github.cmd.navi-tech.in/navi-infra/iam-roles.git"
|
||||
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 }}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user