AshishChakerwerti / terraform-provider-ansiblevault

Read ansible vault from Terraform

Home Page:https://registry.terraform.io/providers/MeilleursAgents/ansiblevault/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

terraform-provider-ansiblevault

Build Status codecov Go Report Card

This Terraform provider allows you to access secrets from an Ansible Vault from Terraform.

Made with ❤️ by MeilleursAgents

Thanks

Thanks to ansible-vault-go repository for having done the hardest part.

Installation

Terraform 0.13

This provider is available in terraform registry.

For local development follow https://www.terraform.io/docs/commands/cli-config.html#implied-local-mirror-directories

Terrform 0.12

curl https://raw.githubusercontent.com/MeilleursAgents/terraform-provider-ansiblevault/master/install.sh | bash

Usage

ansiblevault_path example:


provider "ansiblevault" {
  vault_path  = "/home/username/.vault_pass.txt"
  root_folder = "/home/username/infra/ansible/"
}

data "ansiblevault_path" "api_key" {
  path = "./passwords.yml"
  key = "USER_PASSWORD"
}

${data.ansiblevault_path.api_key.value} will contain value of `USER_PASSWORD` stored in "/home/username/infra/ansible/passwords.yml"

More examples in : examples/terraform/

Using the provider

Master

Latest version

Contribution

You have to enable Go modules for compiling this project.

Git hooks are availables for avoiding mistakes and ensure code quality, you can install them with:

make config

Build and Deploy

You need a Github OAuth Token for doing a GitHub release and goreleaser

make github

License

This project is licensed under the MIT license (see LICENSE file).

FOSSA Status

About

Read ansible vault from Terraform

https://registry.terraform.io/providers/MeilleursAgents/ansiblevault/latest

License:MIT License


Languages

Language:Go 56.9%Language:Shell 39.0%Language:Makefile 4.2%