forked from hashicorp/terraform-provider-azurerm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
registration.go
57 lines (48 loc) · 2.03 KB
/
registration.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
52
53
54
55
56
57
package loadbalancer
import (
"github.com/kevinklinger/terraform-provider-azurerm/v2/internal/sdk"
"github.com/kevinklinger/terraform-provider-azurerm/v2/internal/tf/pluginsdk"
)
var _ sdk.TypedServiceRegistration = Registration{}
var _ sdk.UntypedServiceRegistration = Registration{}
type Registration struct{}
// Name is the name of this Service
func (r Registration) Name() string {
return "Load Balancer"
}
// WebsiteCategories returns a list of categories which can be used for the sidebar
func (r Registration) WebsiteCategories() []string {
return []string{
"Load Balancer",
}
}
// DataSources returns a list of Data Sources supported by this Service
func (r Registration) DataSources() []sdk.DataSource {
return []sdk.DataSource{}
}
// SupportedDataSources returns the supported Data Sources supported by this Service
func (r Registration) SupportedDataSources() map[string]*pluginsdk.Resource {
return map[string]*pluginsdk.Resource{
"azurerm_lb": dataSourceArmLoadBalancer(),
"azurerm_lb_backend_address_pool": dataSourceArmLoadBalancerBackendAddressPool(),
"azurerm_lb_rule": dataSourceArmLoadBalancerRule(),
}
}
// SupportedResources returns the supported Resources supported by this Service
func (r Registration) SupportedResources() map[string]*pluginsdk.Resource {
return map[string]*pluginsdk.Resource{
"azurerm_lb_backend_address_pool": resourceArmLoadBalancerBackendAddressPool(),
"azurerm_lb_nat_pool": resourceArmLoadBalancerNatPool(),
"azurerm_lb_nat_rule": resourceArmLoadBalancerNatRule(),
"azurerm_lb_probe": resourceArmLoadBalancerProbe(),
"azurerm_lb_outbound_rule": resourceArmLoadBalancerOutboundRule(),
"azurerm_lb_rule": resourceArmLoadBalancerRule(),
"azurerm_lb": resourceArmLoadBalancer(),
}
}
// Resources returns a list of Resources supported by this Service
func (r Registration) Resources() []sdk.Resource {
return []sdk.Resource{
BackendAddressPoolAddressResource{},
}
}