Skip to content

provider/vault: vault_policy resource#10980

Merged
stack72 merged 3 commits into
hashicorp:masterfrom
Mongey:cm-vault-policy
Feb 13, 2017
Merged

provider/vault: vault_policy resource#10980
stack72 merged 3 commits into
hashicorp:masterfrom
Mongey:cm-vault-policy

Conversation

@Mongey

@Mongey Mongey commented Dec 31, 2016

Copy link
Copy Markdown
Contributor

No description provided.

@apparentlymart

Copy link
Copy Markdown
Contributor

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 left a comment

Copy link
Copy Markdown
Contributor

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

@Mongey

Mongey commented Jan 17, 2017

Copy link
Copy Markdown
Contributor Author

@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
Copy Markdown
Contributor

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.

@directionless

Copy link
Copy Markdown
Contributor

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

@stack72

stack72 commented Feb 13, 2017

Copy link
Copy Markdown
Contributor

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
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
@ghost

ghost commented Apr 16, 2020

Copy link
Copy Markdown

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.

@ghost ghost 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

Development

Successfully merging this pull request may close these issues.

4 participants