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_extended_location_custom_location #24267

Merged
merged 35 commits into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
71555a6
temp
jiaweitao001 Dec 1, 2022
099f399
acc test
jiaweitao001 Dec 8, 2022
cb30a8f
extended location temp
jiaweitao001 Jun 14, 2023
081944e
Fix test
jiaweitao001 Jun 26, 2023
e3c05c4
Update acc test
jiaweitao001 Oct 19, 2023
a8f79d9
Update extension type
jiaweitao001 Oct 20, 2023
9df4dc2
update test ext
jiaweitao001 Dec 15, 2023
8d705c3
New Resource: azurerm_extended_location_custom_location
jiaweitao001 Dec 18, 2023
d62767d
update allowed cats
jiaweitao001 Dec 19, 2023
bfafe2f
fix gencheck issue
jiaweitao001 Jan 8, 2024
3ae8222
Update to use commonschema
jiaweitao001 Jan 9, 2024
1a47f5d
address some comments
jiaweitao001 Jan 10, 2024
8e80eb8
update docs
jiaweitao001 Jan 26, 2024
4e3466d
pass golint
jiaweitao001 Jan 26, 2024
fdc0f49
update to avoid nil dereference
jiaweitao001 Jan 26, 2024
0309778
temp
jiaweitao001 Dec 1, 2022
46229a4
acc test
jiaweitao001 Dec 8, 2022
1432bd6
extended location temp
jiaweitao001 Jun 14, 2023
a946e1d
Fix test
jiaweitao001 Jun 26, 2023
01709e6
Update acc test
jiaweitao001 Oct 19, 2023
6fc7e35
Update extension type
jiaweitao001 Oct 20, 2023
aeec103
update test ext
jiaweitao001 Dec 15, 2023
7ef1c9d
New Resource: azurerm_extended_location_custom_location
jiaweitao001 Dec 18, 2023
3f0719d
fix conflict
sinbai Mar 11, 2024
3495b73
Added validation func, more acc test, updated script and docs
jiaweitao001 May 16, 2024
044c2be
change name validation func
jiaweitao001 Jun 26, 2024
a2b8eb3
remove location overrride in acc tests
jiaweitao001 Jul 3, 2024
c1979cc
Address comments, remove unused location overrides, add examples in doc
jiaweitao001 Jul 3, 2024
5027d6c
Fix indent in client list
jiaweitao001 Jul 5, 2024
c0876c8
address comments, change elem type, removing redundant code
jiaweitao001 Jul 26, 2024
ef9be02
Update vendors
jiaweitao001 Jul 26, 2024
51d1ef4
update oid in python script, add more comments inline for users
jiaweitao001 Jul 30, 2024
b44259b
Address comments, remove some unupdatable attributes
jiaweitao001 Aug 1, 2024
df7abf8
revert
jiaweitao001 Aug 1, 2024
4793fed
address comments on update
jiaweitao001 Aug 7, 2024
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 @@ -141,6 +141,9 @@ service/event-grid:
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)*)###'

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

Expand Down
5 changes: 5 additions & 0 deletions .github/labeler-pull-request-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,11 @@ service/event-hubs:
- any-glob-to-any-file:
- internal/services/eventhub/**/*

service/extended-location:
- changed-files:
- any-glob-to-any-file:
- internal/services/extendedlocation/**/*

service/firewall:
- changed-files:
- any-glob-to-any-file:
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 @@ -53,6 +53,7 @@ var services = mapOf(
"elasticsan" to "ElasticSan",
"eventgrid" to "EventGrid",
"eventhub" to "EventHub",
"extendedlocation" to "ExtendedLocation",
"firewall" to "Firewall",
"fluidrelay" to "Fluid Relay",
"frontdoor" to "FrontDoor",
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 (
elasticsan "github.com/hashicorp/terraform-provider-azurerm/internal/services/elasticsan/client"
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"
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 @@ -210,6 +211,7 @@ type Client struct {
ElasticSan *elasticsan.Client
EventGrid *eventgrid_v2022_06_15.Client
Eventhub *eventhub.Client
ExtendedLocation *extendedlocation.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.Eventhub, err = eventhub.NewClient(o); err != nil {
return fmt.Errorf("building clients for Eventhub: %+v", err)
}
if client.ExtendedLocation, err = extendedlocation.NewClient(o); err != nil {
return fmt.Errorf("building clients for ExtendedLocation: %+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 @@ -53,6 +53,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/elasticsan"
"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/firewall"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/fluidrelay"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/frontdoor"
Expand Down Expand Up @@ -171,6 +172,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration {
domainservices.Registration{},
elasticsan.Registration{},
eventhub.Registration{},
extendedlocation.Registration{},
fluidrelay.Registration{},
graphservices.Registration{},
storagecache.Registration{},
Expand Down
27 changes: 27 additions & 0 deletions internal/services/extendedlocation/client/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0

package client

import (
"fmt"

"github.com/hashicorp/go-azure-sdk/resource-manager/extendedlocation/2021-08-15/customlocations"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

type Client struct {
CustomLocationsClient *customlocations.CustomLocationsClient
}

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

return &Client{
CustomLocationsClient: customLocationsClient,
}, nil
}
Loading
Loading