danhale-git/runrdp

If an EC2 host with proxy is used, the ec2 host has no ID

Closed this issue · 1 comments

With the following config, getting the host password fails because the ID is set when GetAddress is called and we don't call that.

GetAddress shouldn't be silently setting the ID. Consider adding an explicit function and call to populate unpopulated fields in the host. This could be applied to the interface as it may be useful for other provider specific configurations.

[host.awsec2.myhost]
profile = "prof"
proxy = "myproxy"
getcred = true
private = true
includetags = ["Name;hosty"]

[host.awsec2.myproxy]
profile = "prof"
includetags = ["Name;proxyy"]

In the end I just added a method which gets an EC2 instance from ID or tags if no ID is given.

c9cc525