orange-cloudfoundry / terraform-provider-credhub

This terraform provider let you create and retrieve credentials from credhub
Apache License 2.0
8 stars 2 forks source link

Add support for metadata in resources #15

Open gberche-orange opened 2 years ago

gberche-orange commented 2 years ago

As a credhub provider user

See https://github.com/cloudfoundry/credhub/issues/45 for the associated metadata request and https://docs.cloudfoundry.org/api/credhub/version/2.9/#_set_a_value_credential for specs about metadata

$ curl 'https://example.com/api/v1/data' -i -X PUT \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer [some-token]' \ -d '{ "name": "/some-value-name", "type": "value", "metadata": { "description": "example metadata"}, "value": "some-value" }'

gberche-orange commented 2 years ago

Metadata could potentially also be useful in datasources, but likely with a lower priority