alicloud_oos_secret_parameter
更新时间:
Provides a OOS Secret Parameter resource.
For information about OOS Secret Parameter and how to use it, see What is Secret Parameter.
-> NOTE: Available since v1.147.0+.
Example Usage
Basic Usage
data "alicloud_resource_manager_resource_groups" "example" {}
resource "alicloud_kms_key" "example" {
description = "terraform-example"
status = "Enabled"
pending_window_in_days = 7
}
resource "alicloud_oos_secret_parameter" "example" {
secret_parameter_name = "terraform-example"
value = "terraform-example"
type = "Secret"
key_id = alicloud_kms_key.example.id
description = "terraform-example"
tags = {
Created = "TF"
For = "OosSecretParameter"
}
resource_group_id = data.alicloud_resource_manager_resource_groups.example.groups.0.id
}
Argument Reference
The following arguments are supported:
constraints
- (Optional, ForceNew) The constraints of the encryption parameter. By default, this parameter is null. Valid values:AllowedValues
: The value that is allowed for the encryption parameter. It must be an array string.AllowedPattern
: The pattern that is allowed for the encryption parameter. It must be a regular expression.MinLength
: The minimum length of the encryption parameter.MaxLength
: The maximum length of the encryption parameter.
description
- (Optional) The description of the encryption parameter. The description must be1
to200
characters in length.key_id
- (Optional, ForceNew) The Customer Master Key (CMK) of Key Management Service (KMS) that is used to encrypt the parameter.resource_group_id
- (Optional, Computed) The ID of the Resource Group.secret_parameter_name
- (Required, ForceNew) The name of the encryption parameter. The name must be2
to180
characters in length, and can contain letters, digits, hyphens (-), forward slashes (/) and underscores (_). It cannot start withALIYUN
,ACS
,ALIBABA
,ALICLOUD
, orOOS
.type
- (Optional, ForceNew) The data type of the encryption parameter. Valid values:Secret
.value
- (Required, Sensitive) The value of the encryption parameter. The value must be1
to4096
characters in length.tags
- (Optional) A mapping of tags to assign to the resource.
Attributes Reference
The following attributes are exported:
id
- The resource ID in terraform of Secret Parameter. Its value is same assecret_parameter_name
.
Import
OOS Secret Parameter can be imported using the id, e.g.
$ terraform import alicloud_oos_secret_parameter.example <secret_parameter_name>
文档内容是否对您有帮助?