forked from mjlshen/mirrosa
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
41 lines (31 loc) · 765 Bytes
/
main.go
File metadata and controls
41 lines (31 loc) · 765 Bytes
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
package main
import (
"context"
"fmt"
"github.com/mjlshen/mirrosa/pkg/rosa"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/aws/aws-sdk-go-v2/service/route53"
)
func main() {
// clusterId := flag.String("cluster-id", "", "Cluster ID")
// flag.Parse()
// ocmClient, err := ocm.CreateConnection()
// if err != nil {
// panic(err)
// }
// defer ocmClient.Close()
// ocmClient.GetCluster
cfg, err := config.LoadDefaultConfig(context.TODO())
if err != nil {
panic(err)
}
r := rosa.RosaClient{
Ec2Client: ec2.NewFromConfig(cfg),
Route53Client: route53.NewFromConfig(cfg),
}
if err := r.ValidateVpcAttributes(context.TODO(), "vpc-12345"); err != nil {
panic(err)
}
fmt.Println(r)
}