@@ -48,6 +48,17 @@ create_json_file_format()
48
48
# rm -rf fetched_parameters.json
49
49
}
50
50
51
+ create_jsonso_file_format ()
52
+ {
53
+ file_name=$1
54
+ fetch_path=$2
55
+ echo $fetch_path
56
+ echo $file_name
57
+ echo " aws ssm get-parameters --with-decryption --name $fetch_path | jq '.Parameters | .[] | .Value' | jq '.|fromjson'"
58
+ aws ssm get-parameters --with-decryption --name $fetch_path | jq ' .Parameters | .[] | .Value' | jq ' .|fromjson' > ${file_name} .json
59
+ # rm -rf fetched_parameters.json
60
+ }
61
+
51
62
fetching_specific_path ()
52
63
{
53
64
type_to_fetch=$1
@@ -67,7 +78,11 @@ fetching_specific_path()
67
78
if [ " $type_to_fetch " == " appjson" ]
68
79
then
69
80
create_json_file_format $fname $fpath
70
- fi
81
+ fi
82
+ if [ " $type_to_fetch " == " appjsonso" ]
83
+ then
84
+ create_jsonso_file_format $fname $fpath
85
+ fi
71
86
}
72
87
73
88
fetching_multiple_path ()
@@ -90,7 +105,11 @@ fetching_multiple_path()
90
105
if [ " $type_to_fetch " == " appjson" ]
91
106
then
92
107
create_json_file_format $fname $fpath
93
- fi
108
+ fi
109
+ if [ " $type_to_fetch " == " appjsonso" ]
110
+ then
111
+ create_jsonso_file_format $fname $fpath
112
+ fi
94
113
done
95
114
}
96
115
136
155
fi
137
156
if [ -z $PS_PATH_LIST ];
138
157
then
139
- echo " Info: no path list"
158
+ echo " Info: no path list provided. So skipping pathlist "
140
159
else
141
160
fetching_multiple_path $APP_TYPE_LOWERCASE
142
161
fi
153
172
fi
154
173
if [ -z $PS_PATH_LIST ];
155
174
then
156
- echo " Info: no path list"
175
+ echo " Info: no path list provided. So skipping pathlist "
157
176
else
158
177
fetching_multiple_path $APP_TYPE_LOWERCASE
159
178
fi
@@ -170,7 +189,24 @@ then
170
189
fi
171
190
if [ -z $PS_PATH_LIST ];
172
191
then
173
- echo " Info: no path list"
192
+ echo " Info: no path list provided. So skipping pathlist"
193
+ else
194
+ fetching_multiple_path $APP_TYPE_LOWERCASE
195
+ fi
196
+ fi
197
+
198
+ if [ " $APP_TYPE_LOWERCASE " == " appjsonso" ]
199
+ then
200
+ echo " json file configuration"
201
+ if [ -z $PS_PATH ];
202
+ then
203
+ echo " Info: no ps path"
204
+ else
205
+ fetching_specific_path $APP_TYPE_LOWERCASE
206
+ fi
207
+ if [ -z $PS_PATH_LIST ];
208
+ then
209
+ echo " Info: no path list provided. So skipping pathlist"
174
210
else
175
211
fetching_multiple_path $APP_TYPE_LOWERCASE
176
212
fi
0 commit comments