Skip to content

Commit

Permalink
New resource & data source: azurerm_managed_application_definit… (#6211)
Browse files Browse the repository at this point in the history
This PR is the implement of the issue #5294
  • Loading branch information
Neil Ye authored Mar 28, 2020
1 parent 63e1613 commit ae23b1a
Show file tree
Hide file tree
Showing 25 changed files with 5,790 additions and 66 deletions.
135 changes: 69 additions & 66 deletions azurerm/internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import (
loganalytics "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/loganalytics/client"
logic "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/logic/client"
machinelearning "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/machinelearning/client"
managedapplication "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/managedapplications/client"
managementgroup "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/managementgroup/client"
maps "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/maps/client"
mariadb "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mariadb/client"
Expand Down Expand Up @@ -81,72 +82,73 @@ type Client struct {
Account *ResourceManagerAccount
Features features.UserFeatures

AnalysisServices *analysisServices.Client
ApiManagement *apiManagement.Client
AppConfiguration *appConfiguration.Client
AppInsights *applicationInsights.Client
Authorization *authorization.Client
Automation *automation.Client
Batch *batch.Client
Bot *bot.Client
Cdn *cdn.Client
Cognitive *cognitiveServices.Client
Compute *compute.Client
Containers *containerServices.Client
Cosmos *cosmosdb.Client
CostManagement *costmanagement.Client
CustomProviders *customproviders.Client
DatabaseMigration *datamigration.Client
DataBricks *databricks.Client
DataFactory *datafactory.Client
Datalake *datalake.Client
DevSpace *devspace.Client
DevTestLabs *devtestlabs.Client
Dns *dns.Client
EventGrid *eventgrid.Client
Eventhub *eventhub.Client
Frontdoor *frontdoor.Client
HDInsight *hdinsight.Client
HealthCare *healthcare.Client
IoTHub *iothub.Client
IoTCentral *iotcentral.Client
KeyVault *keyvault.Client
Kusto *kusto.Client
LogAnalytics *loganalytics.Client
Logic *logic.Client
MachineLearning *machinelearning.Client
ManagementGroups *managementgroup.Client
Maps *maps.Client
MariaDB *mariadb.Client
Media *media.Client
MixedReality *mixedreality.Client
Monitor *monitor.Client
MSI *msi.Client
MSSQL *mssql.Client
MySQL *mysql.Client
NetApp *netapp.Client
Network *network.Client
NotificationHubs *notificationhub.Client
Policy *policy.Client
Portal *portal.Client
Postgres *postgres.Client
PowerBI *powerBI.Client
PrivateDns *privatedns.Client
RecoveryServices *recoveryServices.Client
Redis *redis.Client
Relay *relay.Client
Resource *resource.Client
Search *search.Client
SecurityCenter *securityCenter.Client
ServiceBus *serviceBus.Client
ServiceFabric *serviceFabric.Client
SignalR *signalr.Client
Storage *storage.Client
StreamAnalytics *streamAnalytics.Client
Subscription *subscription.Client
Sql *sql.Client
TrafficManager *trafficManager.Client
Web *web.Client
AnalysisServices *analysisServices.Client
ApiManagement *apiManagement.Client
AppConfiguration *appConfiguration.Client
AppInsights *applicationInsights.Client
Authorization *authorization.Client
Automation *automation.Client
Batch *batch.Client
Bot *bot.Client
Cdn *cdn.Client
Cognitive *cognitiveServices.Client
Compute *compute.Client
Containers *containerServices.Client
Cosmos *cosmosdb.Client
CostManagement *costmanagement.Client
CustomProviders *customproviders.Client
DatabaseMigration *datamigration.Client
DataBricks *databricks.Client
DataFactory *datafactory.Client
Datalake *datalake.Client
DevSpace *devspace.Client
DevTestLabs *devtestlabs.Client
Dns *dns.Client
EventGrid *eventgrid.Client
Eventhub *eventhub.Client
Frontdoor *frontdoor.Client
HDInsight *hdinsight.Client
HealthCare *healthcare.Client
IoTHub *iothub.Client
IoTCentral *iotcentral.Client
KeyVault *keyvault.Client
Kusto *kusto.Client
LogAnalytics *loganalytics.Client
Logic *logic.Client
MachineLearning *machinelearning.Client
ManagedApplication *managedapplication.Client
ManagementGroups *managementgroup.Client
Maps *maps.Client
MariaDB *mariadb.Client
Media *media.Client
MixedReality *mixedreality.Client
Monitor *monitor.Client
MSI *msi.Client
MSSQL *mssql.Client
MySQL *mysql.Client
NetApp *netapp.Client
Network *network.Client
NotificationHubs *notificationhub.Client
Policy *policy.Client
Portal *portal.Client
Postgres *postgres.Client
PowerBI *powerBI.Client
PrivateDns *privatedns.Client
RecoveryServices *recoveryServices.Client
Redis *redis.Client
Relay *relay.Client
Resource *resource.Client
Search *search.Client
SecurityCenter *securityCenter.Client
ServiceBus *serviceBus.Client
ServiceFabric *serviceFabric.Client
SignalR *signalr.Client
Storage *storage.Client
StreamAnalytics *streamAnalytics.Client
Subscription *subscription.Client
Sql *sql.Client
TrafficManager *trafficManager.Client
Web *web.Client
}

// NOTE: it should be possible for this method to become Private once the top level Client's removed
Expand Down Expand Up @@ -191,6 +193,7 @@ func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error
client.LogAnalytics = loganalytics.NewClient(o)
client.Logic = logic.NewClient(o)
client.MachineLearning = machinelearning.NewClient(o)
client.ManagedApplication = managedapplication.NewClient(o)
client.ManagementGroups = managementgroup.NewClient(o)
client.Maps = maps.NewClient(o)
client.MariaDB = mariadb.NewClient(o)
Expand Down
2 changes: 2 additions & 0 deletions azurerm/internal/provider/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ import (
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/loganalytics"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/logic"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/machinelearning"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/managedapplications"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/managementgroup"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/maps"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mariadb"
Expand Down Expand Up @@ -108,6 +109,7 @@ func SupportedServices() []common.ServiceRegistration {
loganalytics.Registration{},
logic.Registration{},
machinelearning.Registration{},
managedapplications.Registration{},
managementgroup.Registration{},
maps.Registration{},
mariadb.Registration{},
Expand Down
19 changes: 19 additions & 0 deletions azurerm/internal/services/managedapplications/client/client.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package client

import (
"github.com/Azure/azure-sdk-for-go/services/resources/mgmt/2019-07-01/managedapplications"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
)

type Client struct {
ApplicationDefinitionClient *managedapplications.ApplicationDefinitionsClient
}

func NewClient(o *common.ClientOptions) *Client {
applicationDefinitionClient := managedapplications.NewApplicationDefinitionsClientWithBaseURI(o.ResourceManagerEndpoint, o.SubscriptionId)
o.ConfigureClient(&applicationDefinitionClient.Client, o.ResourceManagerAuthorizer)

return &Client{
ApplicationDefinitionClient: &applicationDefinitionClient,
}
}
Loading

0 comments on commit ae23b1a

Please sign in to comment.