-
Notifications
You must be signed in to change notification settings - Fork 59
/
config.go
37 lines (28 loc) · 1 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
package containerazure
import (
"github.com/upbound/upjet/pkg/config"
)
// Configure configures individual resources by adding custom
// ResourceConfigurators.
func Configure(p *config.Provider) { //nolint:gocyclo
p.AddResourceConfigurator("google_container_azure_client", func(r *config.Resource) {
r.Kind = "Client"
})
p.AddResourceConfigurator("google_container_azure_cluster", func(r *config.Resource) {
r.Kind = "Cluster"
// The client field expects value in the following format:
// projects/{project-number}/locations/{location}}/azureClients/{name}
// The current Client resource does not include an ID with the
// project-number. So we are skipping referencing for now.
// r.References["client"] = config.Reference{
// Type: "Client",
// Extractor: common.ExtractResourceIDFuncPath,
// }
})
p.AddResourceConfigurator("google_container_azure_node_pool", func(r *config.Resource) {
r.Kind = "NodePool"
r.References["cluster"] = config.Reference{
Type: "Cluster",
}
})
}