Commit Graph

10 Commits

Author SHA1 Message Date
Martin Atkins 853b411840 website: syntax highlighting and hclfmt layout for TLS provider 2017-04-07 16:54:00 -07:00
Domonkos Czinke 7776af156b Add missing crl_signing 2017-02-16 08:42:16 -08:00
Martin Atkins 804d714ff6 Restore tls_cert_request to being a managed resource
In c244e5a6 this resource was converted to a data source, but that was
a mistake since data sources are expected to produce stable results on
each run, and yet certificate requests contain a random nonce as part of
the signature.

Additionally, using the data source as a managed resource through the
provided compatibility shim was not actually working, since "Read" was
trying to parse the private key out of a SHA1 hash of the key, which is
what we place in state due to the StateFunc on that attribute.

By restoring this we restore Terraform's ability to produce all of the
parts of a basic PKI/CA, which is useful for creating dev environments
and bootstrapping PKI for production environments.
2016-09-24 12:22:07 -07:00
Radek Simko 43de2afde1
docs: Fix misspelled words 2016-09-12 07:08:00 +01:00
Jarrod Jackson 98cc77c57a Correct spelling of the word certificate. 2016-08-18 14:38:00 -06:00
Martin Atkins c244e5a668 Convert tls_cert_request to be a data source
This resource (unlike the others in this provider) isn't stateful, so it
is a good candidate to be a data source.

The old resource form is preserved via the standard shim in helper/schema,
which will generate a deprecation warning but will still allow the
resource to be used.
2016-07-02 08:07:53 -07:00
Martin Atkins f09a5661cf tls_self_signed_cert reference subject doc from tls_cert_request
tls_self_signed_cert is really just a shorthand over tls_cert_request and
tls_locally_signed_cert, so rather than duplicating all of this
documentation and risking that it will get out of sync (since the
structure is shared in the implementation) we'll just link to the
existing docs.

This fixes #5343.
2016-02-27 04:37:41 -08:00
Martin Atkins 25bd43d6f4 Export public keys from tls_private_key
In most cases private keys are used to produce certs and cert requests,
but there are some less-common cases where the PEM-formatted keypair is
used alone. The public_key_pem attribute supports such cases.

This also includes a public_key_openssh attribute, which allows this
resource to be used to generate temporary OpenSSH credentials, so that
e.g. a Terraform configuration could generate its own keypair to use
with the aws_key_pair resource. This has the same caveats as all cases
where we generate private keys in Terraform, but could be useful for
temporary/throwaway environments where the state either doesn't live for
long or is stored securely.

This builds on work started by Simarpreet Singh in #4441 .
2016-01-16 17:30:48 -08:00
Silas Sewell 309e697a52 provider/tls: add locally signed certificates
This allows you to generate and sign certificates using a local CA.
2015-11-15 20:23:40 -05:00
Martin Atkins f6fd41e7b5 tls provider
As of this commit this provider has only logical resources that allow
the creation of private keys, self-signed certs and certificate requests.
These can be useful when creating other resources that use TLS
certificates, such as AWS Elastic Load Balancers.

Later it could grow to include support for real certificate provision from
CAs using the LetsEncrypt ACME protocol, once it is stable.
2015-10-22 21:48:32 -07:00