https://github.com/poad/get-aws-ssm-parameter
https://github.com/poad/get-aws-ssm-parameter
aws github-actions
Last synced: 24 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/poad/get-aws-ssm-parameter
- Owner: poad
- License: mit
- Created: 2023-01-15T05:20:02.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-11T23:49:46.000Z (about 2 years ago)
- Last Synced: 2024-04-14T10:49:18.891Z (about 2 years ago)
- Topics: aws, github-actions
- Language: TypeScript
- Homepage:
- Size: 146 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
# GitHub Action to get value from AWS Systems Manager Parameter Store
[](LICENSE)
[](CONTRIBUTING.md)
[](VERSION)
## Usage
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Get value from Parameter Store'
id: parameter
uses: poad/get-aws-ssm-parameter@v3.1.0
with:
parameter-name: /example/parameter
aws-region: us-west-2
decryption: false
- name: 'Another example step'
run: echo ${{ steps.parameter.outputs.value }}
```
### Ignoring parameter not found error
When `ignore-parameter-not-found` is set to `true`, the action will not fail even if the specified parameter does not exist. The output `value` will be an empty string.
```yaml
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Get value from Parameter Store (may not exist)'
id: parameter
uses: poad/get-aws-ssm-parameter@v3.1.0
with:
parameter-name: /example/optional-parameter
aws-region: us-west-2
decryption: false
ignore-parameter-not-found: true
- name: 'Check if parameter exists'
run: |
if [ -n "${{ steps.parameter.outputs.value }}" ]; then
echo "Parameter exists: ${{ steps.parameter.outputs.value }}"
else
echo "Parameter does not exist"
fi
```
## Additional Arguments
| Name | Required | Default | Description |
| ---- | -------- | ------- | ----------- |
| `parameter-name` | true | - | Parameter name |
| `aws-region` | true | - | AWS region |
| `decryption` | true | false | Value specified for WithDecryption |
| `ignore-parameter-not-found` | false | false | If true, the action will not fail when the specified parameter does not exist |
## Outputs
The action outputs an string to the action output named `value`. You can access and manipulate this data using [workflow expressions](https://help.github.com/en/actions/automating-your-workflow-with-github-actions/contexts-and-expression-syntax-for-github-actions#steps-context).
## Contributing
We welcome your interest in contributing to this project. Please read the [Contribution Guidelines](CONTRIBUTING.md) for more guidance.
## License
Any contributions made under this project will be governed by the [MIT License](LICENSE)
## Security Policy
See [SECURITY.md](./SECURITY.md).