File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -28,16 +28,23 @@ func Parse(path string) error {
28
28
Path : aws .String (path ),
29
29
WithDecryption : aws .Bool (true ),
30
30
}
31
- out , err := svc .GetParametersByPath (& input )
31
+ var internalErr error
32
+ err = svc .GetParametersByPathPages (& input , func (out * ssm.GetParametersByPathOutput , lastPage bool ) bool {
33
+ for _ , param := range out .Parameters {
34
+ name := strings .TrimPrefix (aws .StringValue (param .Name ), path )
35
+ internalErr = os .Setenv (name , aws .StringValue (param .Value ))
36
+ if internalErr != nil {
37
+ return false
38
+ }
39
+ }
40
+ return true
41
+ })
32
42
if err != nil {
33
43
return err
34
44
}
35
- for _ , param := range out .Parameters {
36
- name := strings .TrimPrefix (aws .StringValue (param .Name ), path )
37
- err := os .Setenv (name , aws .StringValue (param .Value ))
38
- if err != nil {
39
- return err
40
- }
45
+ if internalErr != nil {
46
+ return internalErr
41
47
}
48
+
42
49
return nil
43
50
}
You can’t perform that action at this time.
0 commit comments