awscloud/secure-instance: enrich logging with secure instance id

we'll log as direct URL to the console for easier tracing
This commit is contained in:
Florian Schüller 2024-11-19 15:15:53 +01:00 committed by Florian Schüller
parent 992f876da0
commit b5c71cd7e2

View file

@ -203,6 +203,12 @@ func (a *AWS) RunSecureInstance(iamProfile, keyName, cloudWatchGroup, hostname s
}
secureInstance.Instance = &descrInstOutput.Reservations[0].Instances[0]
logrus.Infof(
"Secure instance created: https://%s.console.aws.amazon.com/ec2/v2/home?region=%s#InstanceDetails:instanceId=%s",
identity.Region,
identity.Region,
secureInstance.InstanceID)
return secureInstance, nil
}