hashicorp / packer-plugin-alicloud

Packer plugin for Alibaba Cloud Image Builder
https://www.packer.io/docs/builders/alicloud-ecs
Mozilla Public License 2.0
12 stars 21 forks source link

add run_tags for alicloud-ecs Builder to tag created ecs instance #136

Open hc-github-team-packer opened 4 months ago

hc-github-team-packer commented 4 months ago

This issue was originally opened by @mick1627 in https://github.com/hashicorp/packer/issues/10015 and has been migrated to this repository. The original issue description is below.


Description

Be able to add tag to the instance created in alicoud by alicloud-ecs. Something like the parameter run_tags in amazon-ebs provider.

Use Case(s)

Once this is done, We will be able to restrict access to ec2 instance based on tag, cf => https://www.alibabacloud.com/help/doc-detail/67912.htm?spm=a2c63.p38356.b99.151.3adb6612ZOeMYJ Exemple: { "Statement": [ { "Action": "ecs:", "Effect": "Allow", "Resource": "", "Condition": { "StringEquals": { "ecs:tag/team": "packer" } } }, ], "Version": "1" }

The idea is to limit ec2 access for some action like DeleteInstances, StopInstance.