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
merged 3 commits into from Feb 13, 2017
Merged

Conversation

@Mongey
Copy link
Contributor

@Mongey Mongey commented Dec 31, 2016

No description provided.

@apparentlymart
Copy link
Member

@apparentlymart apparentlymart commented Dec 31, 2016

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.

@stack72 stack72 added the new-resource label Jan 2, 2017
Copy link
Contributor

@stack72 stack72 left a comment

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

@Mongey
Copy link
Contributor Author

@Mongey 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.

@apparentlymart
Copy link
Member

@apparentlymart apparentlymart commented Jan 20, 2017

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.

@Mongey Mongey force-pushed the Mongey:cm-vault-policy branch from c6a8ae6 to ef7c077 Feb 12, 2017
@directionless
Copy link
Contributor

@directionless directionless commented Feb 13, 2017

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

@stack72
Copy link
Contributor

@stack72 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)
PASS
ok  	github.com/hashicorp/terraform/builtin/providers/vault	2.170s

Paul

@stack72 stack72 merged commit a4d03c9 into hashicorp:master Feb 13, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
stack72 added 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 Mongey:cm-vault-policy branch Feb 24, 2017
@hashibot
Copy link

@hashibot hashibot bot 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.

@hashibot hashibot bot 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.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants