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_nginx_deployment #18510

Merged
merged 9 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/labeler-pull-request-triage.yml
Expand Up @@ -207,6 +207,9 @@ service/mysql:
service/netapp:
- internal/services/netapp/**/*

service/nginx:
- internal/services/nginx/**/*

service/notifications:
- internal/services/notificationhub/**/*

Expand Down
1 change: 1 addition & 0 deletions .teamcity/components/generated/services.kt
Expand Up @@ -76,6 +76,7 @@ var services = mapOf(
"mysql" to "MySQL",
"netapp" to "NetApp",
"network" to "Network",
"nginx" to "Nginx",
"notificationhub" to "Notification Hub",
"orbital" to "Orbital",
"policy" to "Policy",
Expand Down
4 changes: 4 additions & 0 deletions internal/clients/client.go
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/Azure/go-autorest/autorest"
"github.com/Azure/go-autorest/autorest/validation"
dns_v2018_05_01 "github.com/hashicorp/go-azure-sdk/resource-manager/dns/2018-05-01"
nginx2 "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2022-08-01"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
"github.com/hashicorp/terraform-provider-azurerm/internal/features"
aadb2c "github.com/hashicorp/terraform-provider-azurerm/internal/services/aadb2c/client"
Expand Down Expand Up @@ -83,6 +84,7 @@ import (
mysql "github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql/client"
netapp "github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp/client"
network "github.com/hashicorp/terraform-provider-azurerm/internal/services/network/client"
nginx "github.com/hashicorp/terraform-provider-azurerm/internal/services/nginx/client"
notificationhub "github.com/hashicorp/terraform-provider-azurerm/internal/services/notificationhub/client"
orbital "github.com/hashicorp/terraform-provider-azurerm/internal/services/orbital/client"
policy "github.com/hashicorp/terraform-provider-azurerm/internal/services/policy/client"
Expand Down Expand Up @@ -199,6 +201,7 @@ type Client struct {
MySQL *mysql.Client
NetApp *netapp.Client
Network *network.Client
Nginx *nginx2.Client
NotificationHubs *notificationhub.Client
Orbital *orbital.Client
Policy *policy.Client
Expand Down Expand Up @@ -317,6 +320,7 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
client.MySQL = mysql.NewClient(o)
client.NetApp = netapp.NewClient(o)
client.Network = network.NewClient(o)
client.Nginx = nginx.NewClient(o)
client.NotificationHubs = notificationhub.NewClient(o)
client.Orbital = orbital.NewClient(o)
client.Policy = policy.NewClient(o)
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/services.go
Expand Up @@ -78,6 +78,7 @@ import (
"github.com/hashicorp/terraform-provider-azurerm/internal/services/mysql"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/netapp"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/network"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/nginx"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/notificationhub"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/orbital"
"github.com/hashicorp/terraform-provider-azurerm/internal/services/policy"
Expand Down Expand Up @@ -139,6 +140,7 @@ func SupportedTypedServices() []sdk.TypedServiceRegistration {
loganalytics.Registration{},
monitor.Registration{},
mssql.Registration{},
nginx.Registration{},
policy.Registration{},
recoveryservices.Registration{},
resource.Registration{},
Expand Down
14 changes: 14 additions & 0 deletions internal/services/nginx/client/client.go
@@ -0,0 +1,14 @@
package client

import (
"github.com/Azure/go-autorest/autorest"
nginx "github.com/hashicorp/go-azure-sdk/resource-manager/nginx/2022-08-01"
"github.com/hashicorp/terraform-provider-azurerm/internal/common"
)

func NewClient(o *common.ClientOptions) *nginx.Client {
client := nginx.NewClientWithBaseURI(o.ResourceManagerEndpoint, func(c *autorest.Client) {
c.Authorizer = o.ResourceManagerAuthorizer
})
return &client
}