forked from crossplane-contrib/provider-upjet-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.go
More file actions
28 lines (23 loc) · 809 Bytes
/
Copy pathconfig.go
File metadata and controls
28 lines (23 loc) · 809 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
// SPDX-FileCopyrightText: 2024 The Crossplane Authors <https://crossplane.io>
//
// SPDX-License-Identifier: CC0-1.0
package cloudwatch
import (
"github.com/crossplane/upjet/v2/pkg/config"
"github.com/upbound/provider-aws/config/namespaced/common"
)
// Configure adds configurations for the cloudwatch group.
func Configure(p *config.Provider) { //nolint:gocyclo
p.AddResourceConfigurator("aws_cloudwatch_metric_stream", func(r *config.Resource) {
r.MarkAsRequired("name")
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"name_prefix"},
}
})
p.AddResourceConfigurator("aws_cloudwatch_event_target", func(r *config.Resource) {
r.References["arn"] = config.Reference{
TerraformName: "aws_kinesis_stream",
Extractor: common.PathTerraformIDExtractor,
}
})
}