Skip to content
This repository has been archived by the owner on Dec 5, 2020. It is now read-only.

Files

Latest commit

89311f4 · Jul 3, 2017

History

History
48 lines (35 loc) · 1.21 KB

secret.html.markdown

File metadata and controls

48 lines (35 loc) · 1.21 KB
layout page_title sidebar_current description
rancher
Rancher: rancher_secret
docs-rancher-resource-secret
Provides a Rancher Secret resource. This can be used to create secrets for rancher environments and retrieve their information.

rancher_secrets

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

Example Usage

# Create a new Rancher Secret
resource rancher_secret "foo" {
  name           = "foo"
  environment_id = "${rancher_environment.test.id}"
  value          = "my great password"
}

Argument Reference

The following arguments are supported:

  • name - (Required) The name of the secret.
  • description - (Optional) A description of the secret.
  • environment_id - (Required) The ID of the environment to create the secret for.
  • value - (Required) The secret value.

Import

Secrets can be imported using the Secret ID in the format <environment_id>/<secret_id>

$ terraform import rancher_secret.mysec 1a5/1se10

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

$ terraform import rancher_secret.mysec 1se10