Skip to content

Commit

Permalink
support new resource azurerm_fabric_capacity
Browse files Browse the repository at this point in the history
  • Loading branch information
sinbai committed Nov 21, 2024
1 parent eb4c9d3 commit b646fce
Show file tree
Hide file tree
Showing 41 changed files with 2,435 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/labeler-issue-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ service/event-hubs:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_eventhub((.|\n)*)###'

service/extended-location:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_extended_custom_location((.|\n)*)###'
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_(extended_custom_location|fabric_capacity)((.|\n)*)###'

service/firewall:
- '### (|New or )Affected Resource\(s\)\/Data Source\(s\)((.|\n)*)azurerm_firewall((.|\n)*)###'
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 @@ -54,6 +54,7 @@ var services = mapOf(
"eventgrid" to "EventGrid",
"eventhub" to "EventHub",
"extendedlocation" to "ExtendedLocation",
"fabric" to "Fabric",
"firewall" to "Firewall",
"fluidrelay" to "Fluid Relay",
"frontdoor" to "FrontDoor",
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ require (
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/kylelemons/godebug v1.1.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
Expand Down
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,9 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348 h1:MtvEpTB6LX3vkb4ax0b5D2DHbNAUsen0Gx5wZoq3lV4=
github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k=
github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
github.com/magodo/terraform-provider-azurerm-example-gen v0.0.0-20220407025246-3a3ee0ab24a8 h1:HHSqLmPZaa8U66U7N2Gtx3gYptSHrUB/rB5t+6fZTkQ=
github.com/magodo/terraform-provider-azurerm-example-gen v0.0.0-20220407025246-3a3ee0ab24a8/go.mod h1:iMzpAzVr2v/NUVie/apAYtZlFZYFndPcp6/E0VLxgAM=
github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
Expand Down
5 changes: 5 additions & 0 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import (
eventgrid "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventgrid/client"
eventhub "github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub/client"
extendedlocation "github.com/hashicorp/terraform-provider-azurerm/internal/services/extendedlocation/client"
fabric "github.com/hashicorp/terraform-provider-azurerm/internal/services/fabric/client"
fluidrelay "github.com/hashicorp/terraform-provider-azurerm/internal/services/fluidrelay/client"
frontdoor "github.com/hashicorp/terraform-provider-azurerm/internal/services/frontdoor/client"
graph "github.com/hashicorp/terraform-provider-azurerm/internal/services/graphservices/client"
Expand Down Expand Up @@ -208,6 +209,7 @@ type Client struct {
EventGrid *eventgrid.Client
Eventhub *eventhub.Client
ExtendedLocation *extendedlocation.Client
Fabric *fabric.Client
FluidRelay *fluidrelay_2022_05_26.Client
Frontdoor *frontdoor.Client
Graph *graph.Client
Expand Down Expand Up @@ -447,6 +449,9 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
if client.ExtendedLocation, err = extendedlocation.NewClient(o); err != nil {
return fmt.Errorf("building clients for ExtendedLocation: %+v", err)
}
if client.Fabric, err = fabric.NewClient(o); err != nil {
return fmt.Errorf("building clients for Fabric: %+v", err)
}
if client.FluidRelay, err = fluidrelay.NewClient(o); err != nil {
return fmt.Errorf("building clients for FluidRelay: %+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 @@ -55,6 +55,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/eventgrid"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/eventhub"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/extendedlocation"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/fabric"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/firewall"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/fluidrelay"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/frontdoor"
Expand Down Expand Up @@ -173,6 +174,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration {
eventgrid.Registration{},
eventhub.Registration{},
extendedlocation.Registration{},
fabric.Registration{},
fluidrelay.Registration{},
graphservices.Registration{},
hybridcompute.Registration{},
Expand Down
24 changes: 24 additions & 0 deletions internal/services/fabric/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/fabric/2023-11-01/fabriccapacities"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
FabricCapacitiesClient *fabriccapacities.FabricCapacitiesClient
}

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

return &Client{
FabricCapacitiesClient: fabricCapacitiesClient,
}, nil
}
Loading

0 comments on commit b646fce

Please sign in to comment.