Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add vault_policy_document data source #283

Merged
merged 2 commits into from
Feb 19, 2019
Merged

Add vault_policy_document data source #283

merged 2 commits into from
Feb 19, 2019

Conversation

zunkree
Copy link

@zunkree zunkree commented Jan 22, 2019

Add following data source to manage Vault policies, fix for #64

  • vault_policy_document: render HCL with Vault policy

To test this PR:

provider "vault" {}

 data "vault_policy_document" "example" {
  rule {
    path         = "secret/*"
    capabilities = ["create", "read", "update", "delete", "list"]
    description  = "allow all on secrets"
  }
}

resource "vault_policy" "example" {
  name   = "example_policy"
  policy = "${data.vault_policy_document.hcl}"
} 

@zunkree
Copy link
Author

zunkree commented Jan 22, 2019

Also, is it possible in terraform to make argument like:

 data "vault_policy_document" "example" {
  path "secret/*" {
    capabilities = ["create", "read", "update", "delete", "list"]
    description  = "allow all on secrets"
  }
}

@ghost ghost added size/XL and removed size/L labels Jan 23, 2019
@zunkree
Copy link
Author

zunkree commented Feb 7, 2019

hey guys, any feedback about that PR?

@tyrannosaurus-becks tyrannosaurus-becks self-assigned this Feb 19, 2019
Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zunkree this is fantastic! Thank you!

@tyrannosaurus-becks tyrannosaurus-becks merged commit d3bce82 into hashicorp:master Feb 19, 2019
dandandy pushed a commit to dandandy/terraform-provider-vault that referenced this pull request Jun 17, 2021
…vault-policy-document

Add vault_policy_document data source
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants