Skip to content

Commit

Permalink
testing file based approach
Browse files Browse the repository at this point in the history
  • Loading branch information
vijayamadhavareddy committed May 17, 2024
1 parent 9c7837f commit d957a98
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions src/aws_ssm.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ def run(aws_parameters: dict[str, AwsParameter]):

if __name__ == '__main__':
input_params = os.getenv('INPUT_PARAMS', None)
print(f'Input parameters: {input_params}')
params_inline = parse_input_params(input_params) if input_params is not None and input_params != '' else {}
params_from_file = {}
params_file_path = os.getenv('INPUT_PARAMS_FILE_PATH')
Expand All @@ -26,7 +25,6 @@ def run(aws_parameters: dict[str, AwsParameter]):
print(path)
with open(path, 'r') as f:
params_from_file = parse_input_params(f.read())
print(params_from_file)
params = {**params_from_file, **params_inline}
print(params)
# run(params)
1 change: 1 addition & 0 deletions src/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def value_to_aws_parameter(param_name, param_value):
parsed_value_json = ensure_json_input(param_value)
if parsed_value_json is None:
return AwsParameter(name=param_name, value=param_value)
print(parsed_value_json)
value = parsed_value_json.get('value') if parsed_value_json.get('value') is not None else None
param_type = parsed_value_json.get('type') if parsed_value_json.get('type') is not None else 'String'
overwrite = parsed_value_json.get('overwrite') if parsed_value_json.get('overwrite') is not None else True
Expand Down

0 comments on commit d957a98

Please sign in to comment.