Skip to content

Support LoginAsNonRoot flag as part of instance creation step #145

Description

@aleksf-awx

Description

LoginAsNonRoot as part of ECS instance creation controls whether to create instance with unprivileged ecs-user, please refer to https://www.alibabacloud.com/help/en/ecs/developer-reference/api-ecs-2014-05-26-runinstances and https://www.alibabacloud.com/help/en/ecs/user-guide/manage-the-username-used-to-log-on-to-an-ecs-instance#62206fc07eull

Use Case(s)

It would be great for builder to use unprivileged ecs-user as currently only root is supported if instance is provisioned by packer from any of the public images.

Potential configuration

Currently, packer utilizes CreateInstance API, which unfortunately does not support LoginAsNonRoot flag. The equivalent API RunInstances does support it along with other parameters, currently utilized by packer as part of CreateInstance call.

The solution would involve porting CreateInstance to RunInstances and supplying parametrized LoginAsNonRoot flag, which could be exposed in the builder config as login_as_non_root or semantical equivalent.

Potential References

https://www.alibabacloud.com/help/en/ecs/developer-reference/api-ecs-2014-05-26-runinstances
https://www.alibabacloud.com/help/en/ecs/user-guide/manage-the-username-used-to-log-on-to-an-ecs-instance#62206fc07eull

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions