github.com/keshavdv/terraform@v0.7.0-rc2.0.20160711232630-d69256dcb425/website/source/docs/providers/tls/d/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  
    17  ## Example Usage
    18  
    19  ```
    20  data "tls_cert_request" "example" {
    21      key_algorithm = "ECDSA"
    22      private_key_pem = "${file(\"private_key.pem\")}"
    23  
    24      subject {
    25          common_name = "example.com"
    26          organization = "ACME Examples, Inc"
    27      }
    28  }
    29  ```
    30  
    31  ## Argument Reference
    32  
    33  The following arguments are supported:
    34  
    35  * `key_algorithm` - (Required) The name of the algorithm for the key provided
    36  in `private_key_pem`.
    37  
    38  * `private_key_pem` - (Required) PEM-encoded private key data. This can be
    39  read from a separate file using the ``file`` interpolation function. Only
    40  an irreversable secure hash of the private key will be stored in the Terraform
    41  state.
    42  
    43  * `subject` - (Required) The subject for which a certificate is being requested. This is
    44  a nested configuration block whose structure is described below.
    45  
    46  * `dns_names` - (Optional) List of DNS names for which a certificate is being requested.
    47  
    48  * `ip_addresses` - (Optional) List of IP addresses for which a certificate is being requested.
    49  
    50  The nested `subject` block accepts the following arguments, all optional, with their meaning
    51  corresponding to the similarly-named attributes defined in
    52  [RFC5290](https://tools.ietf.org/html/rfc5280#section-4.1.2.4):
    53  
    54  * `common_name` (string)
    55  
    56  * `organization` (string)
    57  
    58  * `organizational_unit` (string)
    59  
    60  * `street_address` (list of strings)
    61  
    62  * `locality` (string)
    63  
    64  * `province` (string)
    65  
    66  * `country` (string)
    67  
    68  * `postal_code` (string)
    69  
    70  * `serial_number` (string)
    71  
    72  ## Attributes Reference
    73  
    74  The following attributes are exported:
    75  
    76  * `cert_request_pem` - The certificate request data in PEM format.