Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ECS] Add info about encrypted disk usage #1695

Merged
merged 1 commit into from Apr 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
35 changes: 35 additions & 0 deletions docs/resources/ecs_instance_v1.md
Expand Up @@ -163,6 +163,41 @@ resource "opentelekomcloud_ecs_instance_v1" "basic" {
-> `user_data` can come from a variety of sources: inline, read in from the `file`
function, or the `template_cloudinit_config` resource.

### Instance with encrypted disks

```hcl
resource opentelekomcloud_ecs_instance_v1 ecs {
name = var.host_name
flavor = var.flavor_name
availability_zone = var.az
security_groups = [data.opentelekomcloud_networking_secgroup_v2.default.id]
vpc_id = var.vpc_id
image_id = var.image_id
auto_recovery = true

nics {
network_id = var.vpc_subnetwork_id
ip_address = var.private_ip
}

system_disk_type = var.disk_type
system_disk_size = var.disk_size
system_disk_kms_id = var.key_disk_encryption
delete_disks_on_termination = true

data_disks {
type = "SSD"
size = 40
kms_id = var.key_disk_encryption
}
}
```

~>
Encrypted disks requires EVS to be authorized to use KMS keys. The easiest way is to create an encrypted
instance via the console - this should be done only once per project. Another way is to use an agency,
same way it's [done for CCE](cce_cluster_v3.md#creating-agency).

## Argument Reference

The following arguments are supported:
Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/ecs-encrypt-doc-26b66f8363863f5d.yaml
@@ -0,0 +1,5 @@
---
other:
- |
**[ECS]** Add example for encrypted disks usage with ``resource/opentelekomcloud_ecs_instance_v1``
(`#1695 <https://github.com/opentelekomcloud/terraform-provider-opentelekomcloud/pull/1695>`_)