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

aliyun-cli create encrypted system disk #617

Open
tolikkk opened this issue Feb 16, 2023 · 4 comments
Open

aliyun-cli create encrypted system disk #617

tolikkk opened this issue Feb 16, 2023 · 4 comments

Comments

@tolikkk
Copy link

tolikkk commented Feb 16, 2023

aliyun-cli version 3.0.149

Need to create ECS instance with encrypted system disk. Default service CMK is suitable for my purposes.

There is only the DataDisk encryption is described in API reference for CreateInstance operation. The same options for SystemDisk are not available.
https://www.alibabacloud.com/help/en/elastic-compute-service/latest/createinstance

  --DataDisk.n.EncryptAlgorithm      String  Optional
  --DataDisk.n.Encrypted             Boolean Optional

How can I encrypt a system disk using ECS API?

@TsinghuaDream
Copy link
Contributor

Add --force at the end of the command.

@tolikkk
Copy link
Author

tolikkk commented Mar 2, 2023

@TsinghuaDream, thers is no such option "--force" in CreateInstance options:
https://www.alibabacloud.com/help/en/elastic-compute-service/latest/createinstance

Can you show the full command example?

@TsinghuaDream
Copy link
Contributor

aliyun ecs CreateInstance --{parameterName} {parameterValue} ... --force
you can use aliyun --help find --force option.

@tolikkk
Copy link
Author

tolikkk commented Mar 2, 2023

@TsinghuaDream, I used the following command with "force", still no success - created system disk is not encrypted.

aliyun ecs CreateInstance \
    --InstanceName test-host-1 \
    --HostName ali-test-13 \
    --ImageId ubuntu_22_04_x64_20G_alibase_20230208.vhd \
    --InstanceType ecs.c7.large \
    --SystemDisk.Category cloud_essd \
    --SystemDisk.PerformanceLevel PL0 \
    --SystemDisk.Size 40 \
    --SecurityGroupId sg-*** \
    --VSwitchId vsw-*** \
    --InternetChargeType PayByTraffic \
    --Tag.1.Key team \
    --Tag.1.Value test \
    --Tag.2.Key env \
    --Tag.2.Value dev \
    --Password *** \
    --force

Screenshot 2023-03-02 at 13 01 30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants