-
Notifications
You must be signed in to change notification settings - Fork 1
/
input.go
71 lines (64 loc) · 1.8 KB
/
input.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
package input
type AppRunnerStackInputProps struct {
StackEnv *StackEnv
VpcConnectorProps *VpcConnectorProps
SourceConfigurationProps *SourceConfigurationProps
InstanceConfigurationProps *InstanceConfigurationProps
AutoScalingConfigurationArnProps *AutoScalingConfigurationArnProps
}
type StackEnv struct {
Account string
Region string
}
type VpcConnectorProps struct {
VpcID string
SubnetID1 string
SubnetID2 string
}
type SourceConfigurationProps struct {
RepositoryUrl string
BranchName string
BuildCommand string
StartCommand string
Port int
ConnectionName string
}
type InstanceConfigurationProps struct {
Cpu string
Memory string
}
type AutoScalingConfigurationArnProps struct {
MaxConcurrency int
MaxSize int
MinSize int
}
func NewAppRunnerStackInputProps() *AppRunnerStackInputProps {
return &AppRunnerStackInputProps{
StackEnv: &StackEnv{
Account: "123456789012", // Your Account ID
Region: "ap-northeast-1",
},
VpcConnectorProps: &VpcConnectorProps{
VpcID: "vpc-xxxxxxxxxxxxxxx", // Your VPC ID
SubnetID1: "subnet-xxxxxxxxxxxxxxx", // Your Subnet ID
SubnetID2: "subnet-xxxxxxxxxxxxxxx", // Your Subnet ID
},
SourceConfigurationProps: &SourceConfigurationProps{
RepositoryUrl: "https://github.com/go-to-k/go-cdk-go-managed-apprunner",
BranchName: "master",
BuildCommand: "go install ./app/...",
StartCommand: "go run app/main.go",
Port: 8080,
ConnectionName: "AppRunnerConnection",
},
InstanceConfigurationProps: &InstanceConfigurationProps{
Cpu: "1 vCPU",
Memory: "2 GB",
},
AutoScalingConfigurationArnProps: &AutoScalingConfigurationArnProps{
MaxConcurrency: 50,
MaxSize: 3,
MinSize: 1,
},
}
}