-
Notifications
You must be signed in to change notification settings - Fork 113
/
config.go
32 lines (29 loc) · 1.08 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
/*
Copyright 2022 Upbound Inc.
*/
package appstream
import (
"github.com/crossplane/upjet/pkg/config"
)
// Configure adds configurations for the appstream group.
func Configure(p *config.Provider) {
p.AddResourceConfigurator("aws_appstream_fleet", func(r *config.Resource) {
r.References["vpc_config.subnet_ids"] = config.Reference{
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet",
RefFieldName: "SubnetIDRefs",
SelectorFieldName: "SubnetIDSelector",
}
r.UseAsync = true
r.Path = "fleet"
})
p.AddResourceConfigurator("aws_appstream_image_builder", func(r *config.Resource) {
r.References["vpc_config.subnet_ids"] = config.Reference{
Type: "github.com/upbound/provider-aws/apis/ec2/v1beta1.Subnet",
RefFieldName: "SubnetIDRefs",
SelectorFieldName: "SubnetIDSelector",
}
r.UseAsync = true
// Otherwise getting Invalid combination of arguments: "image_name": only one of `image_arn,image_name` can be specified, but `image_arn,image_name` were specified.
config.MoveToStatus(r.TerraformResource, "image_name")
})
}