Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Resource : azurerm_arc_resource_bridge_appliance #23108

Merged
merged 7 commits into from
Sep 19, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/labeler-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,9 @@ service/redis:
service/relay:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_relay_((.|\n)*)###'

service/resource-connector:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_resource_connector_appliance((.|\n)*)###'

service/search:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_search_s((.|\n)*)###'

Expand Down
3 changes: 3 additions & 0 deletions .github/labeler-pull-request-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@ service/redis:
service/relay:
- internal/services/relay/**/*

service/resource-connector:
- internal/services/resourceconnector/**/*

service/search:
- internal/services/search/**/*

Expand Down
1 change: 1 addition & 0 deletions .teamcity/components/generated/services.kt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ var services = mapOf(
"redis" to "Redis",
"redisenterprise" to "Redis Enterprise",
"relay" to "Relay",
"resourceconnector" to "Resource Connector",
"resource" to "Resources",
"sql" to "SQL",
"search" to "Search",
Expand Down
5 changes: 5 additions & 0 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ import (
redisenterprise "github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise/client"
relay "github.com/hashicorp/terraform-provider-azurerm/internal/services/relay/client"
resource "github.com/hashicorp/terraform-provider-azurerm/internal/services/resource/client"
resourceConnector "github.com/hashicorp/terraform-provider-azurerm/internal/services/resourceconnector/client"
search "github.com/hashicorp/terraform-provider-azurerm/internal/services/search/client"
securityCenter "github.com/hashicorp/terraform-provider-azurerm/internal/services/securitycenter/client"
sentinel "github.com/hashicorp/terraform-provider-azurerm/internal/services/sentinel/client"
Expand Down Expand Up @@ -254,6 +255,7 @@ type Client struct {
RedisEnterprise *redisenterprise.Client
Relay *relay.Client
Resource *resource.Client
ResourceConnector *resourceConnector.Client
Search *search.Client
SecurityCenter *securityCenter.Client
Sentinel *sentinel.Client
Expand Down Expand Up @@ -554,6 +556,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
if client.Resource, err = resource.NewClient(o); err != nil {
return fmt.Errorf("building clients for Resource: %+v", err)
}
if client.ResourceConnector, err = resourceConnector.NewClient(o); err != nil {
return fmt.Errorf("building clients for Resource connector: %+v", err)
}
if client.Search, err = search.NewClient(o); err != nil {
return fmt.Errorf("building clients for Search: %+v", err)
}
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/redisenterprise"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/relay"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/resource"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/resourceconnector"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/search"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/securitycenter"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/sentinel"
Expand Down Expand Up @@ -186,6 +187,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration {
privatednsresolver.Registration{},
recoveryservices.Registration{},
resource.Registration{},
resourceconnector.Registration{},
sentinel.Registration{},
serviceconnector.Registration{},
servicefabricmanaged.Registration{},
Expand Down
24 changes: 24 additions & 0 deletions internal/services/resourceconnector/client/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package client

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/resourceconnector/2022-10-27/appliances"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
AppliancesClient *appliances.AppliancesClient
}

func NewClient(o *common.ClientOptions) (*Client, error) {
appliancesClient, err := appliances.NewAppliancesClientWithBaseURI(o.Environment.ResourceManager)
if err != nil {
return nil, fmt.Errorf("building appliances Client: %+v", err)
}
o.Configure(appliancesClient.Client, o.Authorizers.ResourceManager)

return &Client{
AppliancesClient: appliancesClient,
}, nil
}
33 changes: 33 additions & 0 deletions internal/services/resourceconnector/registration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package resourceconnector

import (
"github.com/hashicorp/terraform-provider-azurerm/internal/sdk"
)

var _ sdk.TypedServiceRegistrationWithAGitHubLabel = Registration{}

type Registration struct{}

func (r Registration) AssociatedGitHubLabel() string {
return "service/resource-connector"
}

func (r Registration) Name() string {
return "Resource Connector"
}

func (r Registration) DataSources() []sdk.DataSource {
return []sdk.DataSource{}
}

func (r Registration) Resources() []sdk.Resource {
return []sdk.Resource{
ResourceConnectorApplianceResource{},
}
}

func (r Registration) WebsiteCategories() []string {
return []string{
"Resource Connector",
}
}
Loading