https://github.com/chorusone/saltstack-module-slack
Authenticate against Salt using Slack token
https://github.com/chorusone/saltstack-module-slack
Last synced: about 1 year ago
JSON representation
Authenticate against Salt using Slack token
- Host: GitHub
- URL: https://github.com/chorusone/saltstack-module-slack
- Owner: ChorusOne
- License: apache-2.0
- Created: 2019-07-14T07:32:51.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-07-14T08:00:28.000Z (almost 7 years ago)
- Last Synced: 2025-02-15T03:29:41.586Z (over 1 year ago)
- Language: Python
- Size: 4.88 KB
- Stars: 0
- Watchers: 24
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# saltstack-module-tfstate
Saltstack module to access attributes of dynamically created assets directly from Terraform's tfstate file for use in pillar.
## Installation
1. To use this module, you must ensure that it is available from your master's fileserver root; the easiest way to acheive this is to utilize `gitfs` by adding the following to your /etc/salt/master file:
```
fileserver_backends:
- root
- gitfs
gitfs_remotes:
- https://github.com/ChorusOne/saltstack-module-tfstate.git
```
2. and in the same file, for s3 backend:
```
mytfstate: ##
driver: terraform
backend: s3
bucket: my-bucket-name
key: my-tfstate-file.tfstate
```
or, for file-based:
```
mytfstate:
driver: terraform
backend: file
tfstatefile: /opt/terraform/tfstate.tfstate
```
3. Restart `salt-master`
4. Run `sudo salt-run fileserver.update`
5. Run `sudo salt-run saltutil.sync_all`, and look for `sdb.terraform` in the output.
You are ready to use the `sdb:///./` syntax in your pillar:
```
...
ip: sdb://mytfstate/aws_instance.host/public_ip # for resources created in the environment root
...
ip: sdb://mytfstate/module.my_module.aws_instance.host/private_ip # for resources created by a module
...
{% if salt['sdb.get']('sdb://mytfstate/aws_instance.host/public_ip') == '10.0.0.1' %}
...
{% endif %}
```