hashicorp / go-discover

Discover nodes in cloud environments
Mozilla Public License 2.0
563 stars 123 forks source link

[Feature Request] Use RAM role for aliyun provider #134

Closed yongzhang closed 3 years ago

yongzhang commented 4 years ago

Hi,

It makes no sense to use access_secret for auto-joining, is it possible to use ecs ram role instead? Thanks.

func (p *Provider) SetUserAgent(s string) {
    p.userAgent = s
}

func (p *Provider) Help() string {
    return `Aliyun(Alibaba Cloud):
    provider:          "aliyun"
    region:            The Aliyun region.
    tag_key:           The tag key to filter on
    tag_value:         The tag value to filter on
    access_key_id:     The Aliyun access key to use
    access_key_secret: The Aliyun access key secret to use
    The required RAM permission is 'ecs:DescribeInstances'.
    It is recommended you make a dedicated key used only for auto-joining.
`
}
mlaterman commented 4 years ago

I'm interested in this as well and wouldn't mind doing the work. I see that the official SDK has support for RAM roles; was there a reason why a third party library was chosen over it?

yongzhang commented 4 years ago

@mlaterman Thanks for working on this!