Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
chengxiangdong committed Nov 29, 2024
2 parents 0b5478b + 5b318db commit 4867597
Show file tree
Hide file tree
Showing 67 changed files with 4,238 additions and 99 deletions.
44 changes: 44 additions & 0 deletions docs/data-sources/csms_secret_version.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
---
subcategory: "Data Encryption Workshop (DEW)"
layout: "huaweicloudstack"
page_title: "HuaweiCloudStack: hcs_csms_secret_version"
description: ""
---

# hcs_csms_secret_version

Use this data source to query the version and plaintext of the CSMS(Cloud Secret Management Service) secret.

## Example Usage

```hcl
data "hcs_csms_secret_version" "version_1" {
secret_name = "your_secret_name"
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String) Specifies the region in which to obtain the CSMS secrets.
If omitted, the provider-level region will be used.

* `secret_name` - (Required, String) The name of the CSMS secret to query.

* `version` - (Optional, String) The version ID of the CSMS secret version to query.
If omitted, the latest version will be used.

## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The data source ID.

* `secret_text` - The plaintext of a secret in text format.

* `kms_key_id` - The ID of the KMS CMK used for secret encryption.

* `status` - The status of the CSMS secret version.

* `created_at` - Time when the CSMS secret version created, in UTC format.
61 changes: 61 additions & 0 deletions docs/data-sources/rds_pg_plugins.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
---
subcategory: "Relational Database Service (RDS)"
layout: "huaweicloudstack"
page_title: "HuaweiCloudStack: hcs_rds_pg_plugins"
description: ""
---

# hcs_rds_pg_plugins

Use this data source to get the list of RDS PostgreSQL plugins.

## Example Usage

```hcl
variable "instance_id" {}
variable "database_name" {}
data "hcs_rds_pg_plugins" "plugins" {
instance_id = var.instance_id
database_name = var.database_name
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String) Specifies the region in which to query the data source.
If omitted, the provider-level region will be used.

* `instance_id` - (Required, String) Specifies the ID of a PostgreSQL instance.

* `database_name` - (Required, String) Specifies the database name of a PostgreSQL instance.

* `name` - (Optional, String) Specifies the plugin name.

* `version` - (Optional, String) Specifies the plugin version.

* `created` - (Optional, Bool) Specifies whether the plugin has been created. Defaults to: **false**.

## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The data source ID.

* `plugins` - Indicates the plugin list.
The [plugins](#PgPlugins_Plugin) structure is documented below.

<a name="PgPlugins_Plugin"></a>
The `plugins` block supports:

* `name` - Indicates the plugin name.

* `version` - Indicates the plugin version.

* `shared_preload_libraries` - Indicates the dependent preloaded library.

* `created` - Indicates whether the plugin has been created.

* `description` - Indicates the plugin description.
2 changes: 1 addition & 1 deletion docs/resources/as_bandwidth_policy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "Auto Scaling"
subcategory: "Deprecated"
---

# hcs_as_bandwidth_policy
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/as_configuration.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "Auto Scaling"
subcategory: "Auto Scaling (AS)"
---

# hcs_as_configuration
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/as_group.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "Auto Scaling"
subcategory: "Auto Scaling (AS)"
---

# hcs_as_group
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/as_instance_attach.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "Auto Scaling"
subcategory: "Auto Scaling (AS)"
---

# hcs_as_instance_attach
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/as_lifecycle_hook.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "Auto Scaling"
subcategory: "Deprecated"
---

# hcs_as_lifecycle_hook
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/as_notification.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "Auto Scaling"
subcategory: "Deprecated"
---

# hcs_as_notification
Expand Down
2 changes: 1 addition & 1 deletion docs/resources/as_policy.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
subcategory: "Auto Scaling"
subcategory: "Auto Scaling (AS)"
---

# hcs_as_policy
Expand Down
114 changes: 114 additions & 0 deletions docs/resources/csms_secret.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
subcategory: "Data Encryption Workshop (DEW)"
layout: "huaweicloudstack"
page_title: "HuaweiCloudStack: hcs_csms_secret"
description: |
Manages CSMS(Cloud Secret Management Service) secrets within HuaweiCloudStack.
---

# hcs_csms_secret

Manages CSMS(Cloud Secret Management Service) secrets within HuaweiCloudStack.

## Example Usage

### Encrypt Plaintext

```hcl
resource "hcs_csms_secret" "test1" {
name = "test_secret"
secret_text = "this is a password"
}
```

### Encrypt JSON Data

```hcl
resource "hcs_csms_secret" "test2" {
name = "mysql_admin"
secret_text = jsonencode({
username = "admin"
password = "123456"
})
}
```

### Encrypt String Binary

```hcl
variable "secret_binary" {}
resource "hcs_csms_secret" "test3" {
name = "test_binary"
secret_binary = var.secret_binary
}
```

### The secret associated event

```hcl
variable "name" {}
variable "secret_type" {}
variable "secret_text" {}
resource "huaweicloud_csms_event" "test" {
...
}
resource "hcs_csms_secret" "test" {
name = var.name
secret_type = var.secret_type
secret_text = var.secret_text
event_subscriptions = [huaweicloud_csms_event.test.name]
}
```

## Argument Reference

The following arguments are supported:

* `region` - (Optional, String, ForceNew) Specifies the region in which to create the CSMS secrets.
If omitted, the provider-level region will be used. Changing this setting will create a new resource.

* `name` - (Required, String, ForceNew) Specifies the secret name. The maximum length is 64 characters.
Only digits, letters, underscores(_), hyphens(-) and dots(.) are allowed.

Changing this parameter will create a new resource.

* `secret_text` - (Optional, String) Specifies the plaintext of a text secret. CSMS encrypts the plaintext and stores
it in the initial version of the secret. The maximum size is 32 KB.

Changing this parameter will create a new secret version.

* `kms_key_id` - (Optional, String) Specifies the ID of the KMS key used to encrypt secrets.
If this parameter is not specified when creating the secret, the default master key **csms/default** will be used.
The default key is automatically created by the CSMS.
Use this data source
[hcs_kms_key](https://registry.terraform.io/providers/huaweicloud/hcs/latest/docs/resources/kms_key)
to get the KMS key.

* `description` - (Optional, String) Specifies the description of a secret.

* `tags` - (Optional, Map) Specifies the tags of a CSMS secrets, key/value pair format.

## Attribute Reference

In addition to all arguments above, the following attributes are exported:

* `id` - The resource ID which is constructed from the secret ID and name, separated by a slash.

* `secret_id` - The secret ID in UUID format.

* `latest_version` - The latest version id.

* `status` - The CSMS secret status. Values can be: **ENABLED**, **DISABLED**, **PENDING_DELETE** and **FROZEN**.

* `create_time` - Time when the CSMS secrets created, in UTC format.

## Import

CSMS secret can be imported using the ID and the name of secret, separated by a slash, e.g.

```bash
terraform import hcs_csms_secret.test <id>/<name>
```
39 changes: 39 additions & 0 deletions docs/resources/ecs_compute_create_snapshot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
subcategory: "Elastic Cloud Server (ECS)"
---

# hcs_ecs_compute_snapshot

Creating an ECS Snapshot for an Instance.

## Example Usage

### Creating an ECS Snapshot

```hcl
resource "hcs_ecs_compute_snapshot" "snapshot" {
instance_id = "6e6da0c2-6ade-41ce-bd31-62fd222ec115"
name = "ecs_snapshot_02"
}
```

## Argument Reference

The following arguments are supported:

* `instance_id` - (Required, String, ForceNew) The ID of the Instance to create ECS snapshot.

* `name` - (Required, String, ForceNew) The snapshot name.

## Import

Snapshot can be imported using the Instance ID and Snapshot ID separated by a slash, e.g.
```
$ terraform import hcs_ecs_compute_snapshot.test 1bc30ee9-9d5b-4c30-bdd5-7f1e663f5edf/aa4a8f8d-160d-4643-9ab4-087657b307ba
```

## Timeouts

This resource provides the following timeouts configuration options:

* `create` - Default is 14 hour.
Loading

0 comments on commit 4867597

Please sign in to comment.