github.com/turtlemonvh/terraform@v0.6.9-0.20151204001754-8e40b6b855e8/website/source/docs/providers/tls/r/cert_request.html.md (about)

     1  ---
     2  layout: "tls"
     3  page_title: "TLS: tls_cert_request"
     4  sidebar_current: "docs-tls-resourse-cert-request"
     5  description: |-
     6    Creates a PEM-encoded certificate request.
     7  ---
     8  
     9  # tls\_cert\_request
    10  
    11  Generates a *Certificate Signing Request* (CSR) in PEM format, which is the
    12  typical format used to request a certificate from a certificate authority.
    13  
    14  This resource is intended to be used in conjunction with a Terraform provider
    15  for a particular certificate authority in order to provision a new certificate.
    16  This is a *logical resource*, so it contributes only to the current Terraform
    17  state and does not create any external managed resources.
    18  
    19  ## Example Usage
    20  
    21  ```
    22  resource "tls_cert_request" "example" {
    23      key_algorithm = "ECDSA"
    24      private_key_pem = "${file(\"private_key.pem\")}"
    25  
    26      subject {
    27          common_name = "example.com"
    28          organization = "ACME Examples, Inc"
    29      }
    30  }
    31  ```
    32  
    33  ## Argument Reference
    34  
    35  The following arguments are supported:
    36  
    37  * `key_algorithm` - (Required) The name of the algorithm for the key provided
    38  in `private_key_pem`.
    39  
    40  * `private_key_pem` - (Required) PEM-encoded private key data. This can be
    41  read from a separate file using the ``file`` interpolation function. Only
    42  an irreversable secure hash of the private key will be stored in the Terraform
    43  state.
    44  
    45  * `subject` - (Required) The subject for which a certificate is being requested. This is
    46  a nested configuration block whose structure is described below.
    47  
    48  * `dns_names` - (Optional) List of DNS names for which a certificate is being requested.
    49  
    50  * `ip_addresses` - (Optional) List of IP addresses for which a certificate is being requested.
    51  
    52  The nested `subject` block accepts the following arguments, all optional, with their meaning
    53  corresponding to the similarly-named attributes defined in
    54  [RFC5290](https://tools.ietf.org/html/rfc5280#section-4.1.2.4):
    55  
    56  * `common_name` (string)
    57  
    58  * `organization` (string)
    59  
    60  * `organizational_unit` (string)
    61  
    62  * `street_address` (list of strings)
    63  
    64  * `locality` (string)
    65  
    66  * `province` (string)
    67  
    68  * `country` (string)
    69  
    70  * `postal_code` (string)
    71  
    72  * `serial_number` (string)
    73  
    74  ## Attributes Reference
    75  
    76  The following attributes are exported:
    77  
    78  * `cert_request_pem` - The certificate request data in PEM format.