rancher_certificate

Provides a Rancher Certificate resource. This can be used to create certificates for rancher environments and retrieve their information.

Example Usage

# Create a new Rancher Certificate
resource rancher_certificate "foo" {
  name           = "foo"
  description    = "my foo certificate"
  environment_id = "${rancher_environment.test.id}"
  cert = "${file("server.crt")}"
  key = "${file("server.key")}"
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the certificate.
  • description - (Optional) A certificate description.
  • environment_id - (Required) The ID of the environment to create the certificate for.
  • cert - (Required) The certificate content.
  • cert_chain - (Optional) The certificate chain.
  • key - (Required) The certificate key.

Attributes Reference

The following attributes are exported:

Import

Certificates can be imported using the Certificate ID in the format <environment_id>/<certificate_id>

$ terraform import rancher_certificate.mycert 1a5/1c605

If the credentials for the Rancher provider have access to the global API, then environment_id can be omitted e.g.

$ terraform import rancher_certificate.mycert 1c605

© 2018 HashiCorp
Licensed under the MPL 2.0 License.
https://www.terraform.io/docs/providers/rancher/r/certificate.html