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

provider/vault: vault_policy resource #10980

merged 3 commits into from Feb 13, 2017


Copy link

@Mongey Mongey commented Dec 31, 2016

No description provided.

Copy link

Hi @Mongey! Thanks for implementing this.

I unfortunately don't have time to properly review an test this today, but I will take a look at it properly soon. I added myself as a reviewer to remind me to take a look next time I'm spending time on Terraform.

Copy link

@stack72 stack72 left a comment

Choose a reason for hiding this comment

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

Is there a chance that someone can edit this policy manually via the CLI? If so, we are not refreshing the state of the policy and Terraform will not think there are any changes to be made

In the Read func, we need to set the policy back to state IMO

Copy link
Contributor Author

Mongey commented Jan 17, 2017

@stack72 👍 will update.
I was using thevault_secret resource to guide me through implementing this; which is obviously special in the regard that it doesn't implement theRead like this should.

Copy link

Yeah, for the secret resource I was being conservative to enable write-only access tokens to be used when populating secrets, but for this one I think we can assume that an admin-ish token will be used and so there isn't a strong reason to support write-only creds here I think.

Copy link

I was just finding myself in need of something like this. Any chance it being merged, or similar features?

Copy link

stack72 commented Feb 13, 2017

Hi @Mongey

Thanks for this - this is now looking good! Tests are passing as well

% make testacc TEST=./builtin/providers/vault
==> Checking that code complies with gofmt requirements...
go generate $(go list ./... | grep -v /terraform/vendor/)
2017/02/13 18:52:12 Generated command/internal_plugin_list.go
TF_ACC=1 go test ./builtin/providers/vault -v  -timeout 120m
=== RUN   TestDataSourceGenericSecret
--- PASS: TestDataSourceGenericSecret (0.56s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestResourceGenericSecret
--- PASS: TestResourceGenericSecret (0.81s)
=== RUN   TestResourcePolicy
--- PASS: TestResourcePolicy (0.78s)
ok	2.170s


@stack72 stack72 merged commit a4d03c9 into hashicorp:master Feb 13, 2017
stack72 pushed a commit that referenced this pull request Feb 13, 2017
* provider/vault: vault_policy resource

* website: vault_policy resource

* Refresh state when reading vault policy
@Mongey Mongey deleted the cm-vault-policy branch February 24, 2017 22:00
Copy link

ghost commented Apr 16, 2020

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@hashicorp hashicorp locked and limited conversation to collaborators Apr 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

Successfully merging this pull request may close these issues.

None yet

4 participants