@@ -27,6 +27,7 @@ var caBundleFlag *string
2727var caKeyFlag * string
2828var accountIDFlag * string
2929var backgroundFlag * bool
30+ var overrideAwsMapFlag * string
3031var debugFlag * bool
3132var forceWildcardResourceFlag * bool
3233var cpuProfileFlag = flag .String ("cpu-profile" , "" , "write a CPU profile to this file (for performance testing purposes)" )
@@ -48,6 +49,7 @@ func parseConfig() {
4849 caKey := "~/.iamlive/ca.key"
4950 accountID := ""
5051 background := false
52+ overrideAwsMap := ""
5153 debug := false
5254 forceWildcardResource := false
5355 csmPort := 31000
@@ -99,6 +101,9 @@ func parseConfig() {
99101 if cfg .Section ("" ).HasKey ("background" ) {
100102 background , _ = cfg .Section ("" ).Key ("background" ).Bool ()
101103 }
104+ if cfg .Section ("" ).HasKey ("override-aws-map" ) {
105+ overrideAwsMap = cfg .Section ("" ).Key ("override-aws-map" ).String ()
106+ }
102107 if cfg .Section ("" ).HasKey ("debug" ) {
103108 debug , _ = cfg .Section ("" ).Key ("debug" ).Bool ()
104109 }
@@ -126,6 +131,7 @@ func parseConfig() {
126131 caKeyFlag = flag .String ("ca-key" , caKey , "the CA certificate key to use for proxy mode" )
127132 accountIDFlag = flag .String ("account-id" , accountID , "the AWS account ID to use in policy outputs within proxy mode" )
128133 backgroundFlag = flag .Bool ("background" , background , "when set, the process will return the current PID and run in the background without output" )
134+ overrideAwsMapFlag = flag .String ("override-aws-map" , overrideAwsMap , "overrides the embedded AWS mapping JSON file with the filepath provided" )
129135 debugFlag = flag .Bool ("debug" , debug , "dumps associated HTTP requests when set in proxy mode" )
130136 forceWildcardResourceFlag = flag .Bool ("force-wildcard-resource" , forceWildcardResource , "when set, the Resource will always be a wildcard" )
131137 csmPortFlag = flag .Int ("csm-port" , csmPort , "port to listen on for CSM" )
0 commit comments