mirror of https://github.com/docker/compose.git
format
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
52c6177ff7
commit
3d8d982d4a
|
@ -30,7 +30,7 @@ func NewClient(profile string, cluster string, region string) (compose.API, erro
|
|||
type client struct {
|
||||
Cluster string
|
||||
Region string
|
||||
api API
|
||||
api API
|
||||
}
|
||||
|
||||
var _ compose.API = &client{}
|
||||
|
|
|
@ -82,6 +82,7 @@ func (c client) Convert(project *compose.Project, loadBalancerArn *string) (*clo
|
|||
}
|
||||
|
||||
const ECSTaskExecutionPolicy = "arn:aws:iam::aws:policy/service-role/AmazonECSTaskExecutionRolePolicy"
|
||||
|
||||
var defaultTaskExecutionRole string
|
||||
|
||||
// GetEcsTaskExecutionRole retrieve the role ARN to apply for task execution
|
||||
|
@ -111,4 +112,4 @@ func (c client) GetEcsTaskExecutionRole(spec types.ServiceConfig) (string, error
|
|||
}
|
||||
defaultTaskExecutionRole = arn
|
||||
return arn, nil
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,4 +42,4 @@ func Test_down_delete_cluster(t *testing.T) {
|
|||
c.ComposeDown(&compose.Project{
|
||||
Name: "test_project",
|
||||
}, false, true)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,23 +21,23 @@ import (
|
|||
)
|
||||
|
||||
type sdk struct {
|
||||
sess *session.Session
|
||||
ECS ecsiface.ECSAPI
|
||||
EC2 ec2iface.EC2API
|
||||
ELB elbv2iface.ELBV2API
|
||||
CW cloudwatchlogsiface.CloudWatchLogsAPI
|
||||
IAM iamiface.IAMAPI
|
||||
CF cloudformationiface.CloudFormationAPI
|
||||
sess *session.Session
|
||||
ECS ecsiface.ECSAPI
|
||||
EC2 ec2iface.EC2API
|
||||
ELB elbv2iface.ELBV2API
|
||||
CW cloudwatchlogsiface.CloudWatchLogsAPI
|
||||
IAM iamiface.IAMAPI
|
||||
CF cloudformationiface.CloudFormationAPI
|
||||
}
|
||||
|
||||
func NewAPI(sess *session.Session) API {
|
||||
return sdk{
|
||||
ECS: ecs.New(sess),
|
||||
EC2: ec2.New(sess),
|
||||
ELB: elbv2.New(sess),
|
||||
CW: cloudwatchlogs.New(sess),
|
||||
IAM: iam.New(sess),
|
||||
CF: cloudformation.New(sess),
|
||||
ECS: ecs.New(sess),
|
||||
EC2: ec2.New(sess),
|
||||
ELB: elbv2.New(sess),
|
||||
CW: cloudwatchlogs.New(sess),
|
||||
IAM: iam.New(sess),
|
||||
CF: cloudformation.New(sess),
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +99,7 @@ func (s sdk) GetSubNets(vpc string) ([]string, error) {
|
|||
Filters: []*ec2.Filter{
|
||||
{
|
||||
Name: aws.String("vpc-id"),
|
||||
Values: []*string{ aws.String(vpc)},
|
||||
Values: []*string{aws.String(vpc)},
|
||||
},
|
||||
{
|
||||
Name: aws.String("default-for-az"),
|
||||
|
|
Loading…
Reference in New Issue