Skip to content

Commit

Permalink
[ECS] Add info about encrypted disk usage
Browse files Browse the repository at this point in the history
Add example and a note for encrypted disks in `r/ecs_instance_v1`
  • Loading branch information
outcatcher committed Apr 4, 2022
1 parent 9e393d7 commit 6a1fc13
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
35 changes: 35 additions & 0 deletions docs/resources/ecs_instance_v1.md
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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>`_)

0 comments on commit 6a1fc13

Please sign in to comment.