-
Notifications
You must be signed in to change notification settings - Fork 124
/
config.go
51 lines (48 loc) · 1.4 KB
/
config.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
/*
Copyright 2022 Upbound Inc.
*/
package neptune
import (
"github.com/upbound/upjet/pkg/config"
)
// Configure adds configurations for the neptune group
func Configure(p *config.Provider) {
p.AddResourceConfigurator("aws_neptune_cluster", func(r *config.Resource) {
r.UseAsync = true
r.References["snapshot_identifier"] = config.Reference{
Type: "ClusterSnapshot",
}
r.References["replication_source_identifier"] = config.Reference{
Type: "Cluster",
}
r.References["neptune_subnet_group_name"] = config.Reference{
Type: "SubnetGroup",
}
r.References["neptune_cluster_parameter_group_name"] = config.Reference{
Type: "ClusterParameterGroup",
}
})
p.AddResourceConfigurator("aws_neptune_cluster_endpoint", func(r *config.Resource) {
r.References["cluster_identifier"] = config.Reference{
Type: "Cluster",
}
})
p.AddResourceConfigurator("aws_neptune_cluster_instance", func(r *config.Resource) {
r.UseAsync = true
r.References["cluster_identifier"] = config.Reference{
Type: "Cluster",
}
r.References["neptune_parameter_group_name"] = config.Reference{
Type: "ParameterGroup",
}
r.References["neptune_subnet_group_name"] = config.Reference{
Type: "SubnetGroup",
}
})
p.AddResourceConfigurator("aws_neptune_cluster_snapshot", func(r *config.Resource) {
r.UseAsync = true
r.References["db_cluster_identifier"] = config.Reference{
Type: "Cluster",
}
})
}