You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: "KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.",
80
116
},
117
+
"secret_type": {
118
+
Type: schema.TypeInt,
119
+
Optional: true,
120
+
Computed: true,
121
+
Description: "Type of secret. `0`: user-defined secret. `4`: redis secret.",
122
+
},
123
+
124
+
"additional_config": {
125
+
Type: schema.TypeString,
126
+
Optional: true,
127
+
Description: "Additional config for specific secret types in JSON string format.",
128
+
},
129
+
81
130
"status": {
82
131
Type: schema.TypeString,
83
132
Computed: true,
@@ -103,9 +152,14 @@ func resourceTencentCloudSsmSecretCreate(d *schema.ResourceData, meta interface{
103
152
ifv, ok:=d.GetOk("kms_key_id"); ok {
104
153
param["kms_key_id"] =v.(string)
105
154
}
155
+
ifv, ok:=d.GetOkExists("secret_type"); ok {
156
+
param["secret_type"] =v.(int)
157
+
}
158
+
ifv, ok:=d.GetOk("additional_config"); ok {
159
+
param["additional_config"] =v.(string)
160
+
}
106
161
//use a default version info, after create secret will delete this version
107
162
//because sdk do not support create secret without version
108
-
param["version_id"] ="default"
109
163
param["secret_string"] ="default"
110
164
111
165
varoutErr, inErrerror
@@ -122,18 +176,6 @@ func resourceTencentCloudSsmSecretCreate(d *schema.ResourceData, meta interface{
*`secret_name` - (Required, String, ForceNew) Name of secret which cannot be repeated in the same region. The maximum length is 128 bytes. The name can only contain English letters, numbers, underscore and hyphen '-'. The first character must be a letter or number.
66
+
*`additional_config` - (Optional, String) Additional config for specific secret types in JSON string format.
34
67
*`description` - (Optional, String) Description of secret. The maximum is 2048 bytes.
35
68
*`is_enabled` - (Optional, Bool) Specify whether to enable secret. Default value is `true`.
36
69
*`kms_key_id` - (Optional, String, ForceNew) KMS keyId used to encrypt secret. If it is empty, it means that the CMK created by SSM for you by default is used for encryption. You can also specify the KMS CMK created by yourself in the same region for encryption.
37
70
*`recovery_window_in_days` - (Optional, Int) Specify the scheduled deletion date. Default value is `0` that means to delete immediately. 1-30 means the number of days reserved, completely deleted after this date.
71
+
*`secret_type` - (Optional, Int) Type of secret. `0`: user-defined secret. `4`: redis secret.
0 commit comments