projects
/
arvados.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
18772: address review feedback.
[arvados.git]
/
lib
/
cloud
/
ec2
/
ec2.go
diff --git
a/lib/cloud/ec2/ec2.go
b/lib/cloud/ec2/ec2.go
index 269a7d8def59a1e38603633691d657aef29d8e81..52b73f781c6bc63c2e4e2d3242ddc33c642157dc 100644
(file)
--- a/
lib/cloud/ec2/ec2.go
+++ b/
lib/cloud/ec2/ec2.go
@@
-40,13
+40,14
@@
const (
)
type ec2InstanceSetConfig struct {
)
type ec2InstanceSetConfig struct {
- AccessKeyID string
- SecretAccessKey string
- Region string
- SecurityGroupIDs arvados.StringSet
- SubnetID string
- AdminUsername string
- EBSVolumeType string
+ AccessKeyID string
+ SecretAccessKey string
+ Region string
+ SecurityGroupIDs arvados.StringSet
+ SubnetID string
+ AdminUsername string
+ EBSVolumeType string
+ IAMInstanceProfile string
}
type ec2Interface interface {
}
type ec2Interface interface {
@@
-230,6
+231,12
@@
func (instanceSet *ec2InstanceSet) Create(
}}
}
}}
}
+ if instanceSet.ec2config.IAMInstanceProfile != "" {
+ rii.IamInstanceProfile = &ec2.IamInstanceProfileSpecification{
+ Name: aws.String(instanceSet.ec2config.IAMInstanceProfile),
+ }
+ }
+
rsv, err := instanceSet.client.RunInstances(&rii)
err = wrapError(err, &instanceSet.throttleDelayCreate)
if err != nil {
rsv, err := instanceSet.client.RunInstances(&rii)
err = wrapError(err, &instanceSet.throttleDelayCreate)
if err != nil {