-
Notifications
You must be signed in to change notification settings - Fork 74
/
config.go
29 lines (24 loc) · 943 Bytes
/
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
package secretmanager
import (
"github.com/upbound/provider-gcp/config/common"
"github.com/crossplane/upjet/pkg/config"
)
// Configure configures individual resources by adding custom ResourceConfigurators.
func Configure(p *config.Provider) {
p.AddResourceConfigurator("google_secret_manager_secret", func(r *config.Resource) {
config.MarkAsRequired(r.TerraformResource, "replication")
})
p.AddResourceConfigurator("google_secret_manager_secret_iam_member", func(r *config.Resource) {
r.References["secret_id"] = config.Reference{
Type: "Secret",
Extractor: common.ExtractResourceIDFuncPath,
}
})
p.AddResourceConfigurator("google_secret_manager_secret_version", func(r *config.Resource) {
r.References["secret"] = config.Reference{
Type: "Secret",
Extractor: common.ExtractResourceIDFuncPath,
}
r.MetaResource.ArgumentDocs["secret_data"] = `The secret data. Must be no larger than 64KiB.`
})
}