-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added an example file with .vaultifty/settings.json
- Loading branch information
1 parent
6a0c892
commit 16eb280
Showing
4 changed files
with
352 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<!-- // ######################################################################################## | ||
// # ██████╗ ██╗ ██╗██╗ ██╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗██████╗ # | ||
// # ██╔══██╗██║ ██║██║ ██║████╗ ██║ ██╔════╝ ██╔══██╗██╔═══██╗██║ ██║██╔══██╗ # | ||
// # ██████╔╝██║ ██║██║ ██║██╔██╗ ██║ ██║ ███╗██████╔╝██║ ██║██║ ██║██████╔╝ # | ||
// # ██╔══██╗██║ ██║██║ ██║██║╚██╗██║ ██║ ██║██╔══██╗██║ ██║██║ ██║██╔═══╝ # | ||
// # ██████╔╝╚██████╔╝╚██████╔╝██║ ╚████║ ╚██████╔╝██║ ██║╚██████╔╝╚██████╔╝██║ # | ||
// # ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ # | ||
// # Author: Sacha Roussakis-Notter # | ||
// # Project: Vaultify # | ||
// # Description: Easily push, pull and encrypt tofu and terraform statefiles from Vault. # | ||
// ######################################################################################## --> | ||
|
||
```bash | ||
██╗ ██╗ █████╗ ██╗ ██╗██╗ ████████╗██╗███████╗██╗ ██╗ | ||
██║ ██║██╔══██╗██║ ██║██║ ╚══██╔══╝██║██╔════╝╚██╗ ██╔╝ | ||
██║ ██║███████║██║ ██║██║ ██║ ██║█████╗ ╚████╔╝ | ||
╚██╗ ██╔╝██╔══██║██║ ██║██║ ██║ ██║██╔══╝ ╚██╔╝ | ||
╚████╔╝ ██║ ██║╚██████╔╝███████╗██║ ██║██║ ██║ | ||
╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ | ||
|
||
``` | ||
|
||
# Introduction | ||
|
||
This document has been created to showcase, how you can intergrate `Vaultify`, into your pipelines for automation. | ||
|
||
--- | ||
|
||
<br> | ||
|
||
# Azure DevOps | ||
|
||
This section covers how you create tasks, to automate pipelines with `Vaultify`, it has been broken down into two sections, one being the templated task, what it is actually doing using `bash` and the second part actually using the templated task and passing the required `parameters` to it. | ||
|
||
<br> | ||
|
||
`` | ||
### Part 1, templated task. | ||
|
||
```yml | ||
|
||
``` | ||
|
||
> `Note:` | ||
--- | ||
|
||
### Part 2, template usage. | ||
|
||
```yml | ||
|
||
``` | ||
|
||
> `Note:` | ||
--- | ||
|
||
<br> | ||
|
||
## Author | ||
|
||
| Vaultify | | ||
| ----------------------- | | ||
| **Sacha Roussakis-Notter** | | ||
| *Maintainer and Creator* | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
<!-- // ######################################################################################## | ||
// # ██████╗ ██╗ ██╗██╗ ██╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗██████╗ # | ||
// # ██╔══██╗██║ ██║██║ ██║████╗ ██║ ██╔════╝ ██╔══██╗██╔═══██╗██║ ██║██╔══██╗ # | ||
// # ██████╔╝██║ ██║██║ ██║██╔██╗ ██║ ██║ ███╗██████╔╝██║ ██║██║ ██║██████╔╝ # | ||
// # ██╔══██╗██║ ██║██║ ██║██║╚██╗██║ ██║ ██║██╔══██╗██║ ██║██║ ██║██╔═══╝ # | ||
// # ██████╔╝╚██████╔╝╚██████╔╝██║ ╚████║ ╚██████╔╝██║ ██║╚██████╔╝╚██████╔╝██║ # | ||
// # ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ # | ||
// # Author: Sacha Roussakis-Notter # | ||
// # Project: Vaultify # | ||
// # Description: Easily push, pull and encrypt tofu and terraform statefiles from Vault. # | ||
// ######################################################################################## --> | ||
|
||
```bash | ||
██╗ ██╗ █████╗ ██╗ ██╗██╗ ████████╗██╗███████╗██╗ ██╗ | ||
██║ ██║██╔══██╗██║ ██║██║ ╚══██╔══╝██║██╔════╝╚██╗ ██╔╝ | ||
██║ ██║███████║██║ ██║██║ ██║ ██║█████╗ ╚████╔╝ | ||
╚██╗ ██╔╝██╔══██║██║ ██║██║ ██║ ██║██╔══╝ ╚██╔╝ | ||
╚████╔╝ ██║ ██║╚██████╔╝███████╗██║ ██║██║ ██║ | ||
╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ | ||
|
||
``` | ||
|
||
# Introduction | ||
|
||
This document has been created to showcase, how you can intergrate `Vaultify`, into your pipelines for automation. | ||
|
||
--- | ||
|
||
# Azure DevOps | ||
|
||
This section covers how you create tasks, to automate pipelines with `Vaultify`, it has been broken down into two sections, one being the templated task, what it is actually doing using `bash` and the second part actually using the templated task and passing the required `parameters` to it. | ||
|
||
<br> | ||
|
||
`install_vaultify.yml` | ||
### Part 1, templated task. | ||
|
||
```yml | ||
steps: | ||
|
||
#################### | ||
# Install Vaultify # | ||
#################### | ||
|
||
- task: Bash@3 | ||
displayName: "Install > Vaultify" | ||
continueOnError: false | ||
enabled: true | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: $(System.DefaultWorkingDirectory) | ||
script: | | ||
if ! [ -x "$(command -v vaultify)" ]; | ||
then | ||
echo "⚠️ Installing Vaultify..." | ||
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/DFW1N/vaultify/main/scripts/install-vaultify.sh | sudo bash | ||
vaultify --version | ||
else | ||
echo "✅ Vaultify is already installed." | ||
vaultify --version | ||
fi | ||
``` | ||
|
||
--- | ||
|
||
### Part 2, template usage. | ||
|
||
```yml | ||
#################### | ||
# Install Vaultify # | ||
#################### | ||
|
||
- template: <relative-path>/vaultify_install.yml | ||
``` | ||
|
||
--- | ||
|
||
<br> | ||
|
||
## Author | ||
|
||
| Vaultify | | ||
| ----------------------- | | ||
| **Sacha Roussakis-Notter** | | ||
| *Maintainer and Creator* | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
<!-- // ######################################################################################## | ||
// # ██████╗ ██╗ ██╗██╗ ██╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ██╗ ██╗██████╗ # | ||
// # ██╔══██╗██║ ██║██║ ██║████╗ ██║ ██╔════╝ ██╔══██╗██╔═══██╗██║ ██║██╔══██╗ # | ||
// # ██████╔╝██║ ██║██║ ██║██╔██╗ ██║ ██║ ███╗██████╔╝██║ ██║██║ ██║██████╔╝ # | ||
// # ██╔══██╗██║ ██║██║ ██║██║╚██╗██║ ██║ ██║██╔══██╗██║ ██║██║ ██║██╔═══╝ # | ||
// # ██████╔╝╚██████╔╝╚██████╔╝██║ ╚████║ ╚██████╔╝██║ ██║╚██████╔╝╚██████╔╝██║ # | ||
// # ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ # | ||
// # Author: Sacha Roussakis-Notter # | ||
// # Project: Vaultify # | ||
// # Description: Easily push, pull and encrypt tofu and terraform statefiles from Vault. # | ||
// ######################################################################################## --> | ||
|
||
```bash | ||
██╗ ██╗ █████╗ ██╗ ██╗██╗ ████████╗██╗███████╗██╗ ██╗ | ||
██║ ██║██╔══██╗██║ ██║██║ ╚══██╔══╝██║██╔════╝╚██╗ ██╔╝ | ||
██║ ██║███████║██║ ██║██║ ██║ ██║█████╗ ╚████╔╝ | ||
╚██╗ ██╔╝██╔══██║██║ ██║██║ ██║ ██║██╔══╝ ╚██╔╝ | ||
╚████╔╝ ██║ ██║╚██████╔╝███████╗██║ ██║██║ ██║ | ||
╚═══╝ ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ | ||
``` | ||
|
||
# Introduction | ||
|
||
This document has been created to showcase, how you can intergrate `Vaultify`, into your pipelines for automation. | ||
|
||
--- | ||
|
||
<br> | ||
|
||
# Azure DevOps | ||
|
||
This section covers how you create tasks, to automate pipelines with `Vaultify`, it has been broken down into two sections, one being the templated task, what it is actually doing using `bash` and the second part actually using the templated task and passing the required `parameters` to it. | ||
|
||
<br> | ||
|
||
`vaultify_retrieve.yml` | ||
### Part 1, templated task. | ||
|
||
```yml | ||
parameters: | ||
defaultWorkingDirectory: '' | ||
vaultToken: '' | ||
vaultServerUrl: '' | ||
subscriptionId: '' | ||
clientId: '' | ||
clientSecretId: '' | ||
tenantId: '' | ||
|
||
steps: | ||
|
||
##################### | ||
# Vaultify Retrieve # | ||
##################### | ||
|
||
- task: Bash@3 | ||
displayName: "Vaultify > Retrieve" | ||
continueOnError: false | ||
enabled: true | ||
inputs: | ||
targetType: 'inline' | ||
workingDirectory: ${{ parameters.defaultWorkingDirectory }} | ||
script: | | ||
vaultify retrieve | ||
env: | ||
VAULT_ADDR: ${{ parameters.vaultServerUrl }} | ||
VAULT_TOKEN: ${{ parameters.vaultToken }} | ||
ARM_SUBSCRIPTION_ID: ${{ parameters.subscriptionId }} | ||
ARM_CLIENT_ID: ${{ parameters.clientId }} | ||
ARM_CLIENT_SECRET: ${{ parameters.clientSecretId }} | ||
ARM_TENANT_ID: ${{ parameters.tenantId }} | ||
``` | ||
|
||
> `Note:` Save this templated task as a file `vaultify_retrieve.yml`, somewhere in your repository then point the template to the path of this file. | ||
<br> | ||
|
||
--- | ||
|
||
### Part 2, template usage. | ||
|
||
```yml | ||
##################### | ||
# Vaultify Retrieve # | ||
##################### | ||
|
||
- template: <relative-directory>/vaultify_retrieve.yml | ||
parameters: | ||
defaultWorkingDirectory: ${{ parameters.defaultWorkingDirectory }} | ||
vaultToken: ${{ parameters.vaultToken }} | ||
vaultServerUrl: ${{ parameters.vaultServerUrl }} | ||
clientSecretId: ${{ parameters.clientSecretId }} | ||
subscriptionId: ${{ parameters.subscriptionId }} | ||
tenantId: ${{ parameters.tenantId }} | ||
clientId: ${{ parameters.clientId }} | ||
``` | ||
|
||
> `Note:` Please make sure, you are passing these parameters, from Azure keyvault or your secret storage manager to pass it securely. | ||
--- | ||
|
||
<br> | ||
|
||
## Author | ||
|
||
| Vaultify | | ||
| ----------------------- | | ||
| **Sacha Roussakis-Notter** | | ||
| *Maintainer and Creator* | |