Skip to content

pkossyfas/terraform-vault-modules

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Modules for Hashicorp Vault

This folder contains terraform modules for creating Hashicorp Vault resources.

The purpose of this repository is mainly to showcase how to test terraform vault modules locally using terratest. Later more reusable (and more sophisticated modules will be added).

How do you use these modules?

You may use these modules either via Terraform or Terragrunt.

Terraform

Inside each module's directory there are examples in each README file on how to use a module with terraform.

Terragrunt

To use a module with Terragrunt, create a terragrunt.hcl file that specifies the module you want to use as well as values for the input variables of that module:

# Use Terragrunt to download the module code
terraform {
  source = "git::git@github.com/pkossyfas/terraform-vault-modules//modules/<module-name>?ref=v0.0.1"
}

# Fill in the variables for that module
inputs = {
  foo = "bar"
  baz = 3
}

(Note: the double slash (//) in the source URL is intentional and required. It's part of Terraform's Git syntax for module sources.)

You then run terragrunt, and it will download the source code specified in the source URL into a temporary folder, copy your terragrunt.hcl file into that folder, and run your Terraform command in that folder.

Modules structure

Tests

See the tests folder for details.

About

Reusable terraform modules for Hashicorp Vault with tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published