forked from hashicorp/terraform-provider-azurerm
/
client.go
246 lines (236 loc) · 14.6 KB
/
client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
package clients
import (
"context"
"github.com/Azure/go-autorest/autorest"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/common"
"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/features"
advisor "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/advisor/client"
analysisServices "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/analysisservices/client"
apiManagement "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/apimanagement/client"
appConfiguration "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/appconfiguration/client"
applicationInsights "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/applicationinsights/client"
appPlatform "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/appplatform/client"
authorization "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/authorization/client"
automation "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/automation/client"
batch "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/batch/client"
bot "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/bot/client"
cdn "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cdn/client"
cognitiveServices "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cognitive/client"
compute "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/compute/client"
containerServices "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/containers/client"
cosmosdb "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/cosmos/client"
costmanagement "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/costmanagement/client"
customproviders "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/customproviders/client"
datamigration "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/databasemigration/client"
databricks "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/databricks/client"
datafactory "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/datafactory/client"
datalake "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/datalake/client"
datashare "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/datashare/client"
devspace "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/devspace/client"
devtestlabs "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/devtestlabs/client"
dns "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/dns/client"
eventgrid "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/eventgrid/client"
eventhub "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/eventhub/client"
frontdoor "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/frontdoor/client"
hdinsight "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/hdinsight/client"
healthcare "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/healthcare/client"
iotcentral "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/iotcentral/client"
iothub "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/iothub/client"
keyvault "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/keyvault/client"
kusto "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/kusto/client"
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"
maintenance "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/maintenance/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"
media "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/media/client"
mixedreality "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mixedreality/client"
monitor "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/monitor/client"
msi "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/msi/client"
mssql "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mssql/client"
mysql "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/mysql/client"
netapp "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/netapp/client"
network "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network/client"
notificationhub "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/notificationhub/client"
policy "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/policy/client"
portal "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/portal/client"
postgres "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/postgres/client"
powerBI "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/powerbi/client"
privatedns "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/privatedns/client"
recoveryServices "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/recoveryservices/client"
redis "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/redis/client"
relay "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/relay/client"
resource "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/resource/client"
search "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/search/client"
securityCenter "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/securitycenter/client"
sentinel "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/sentinel/client"
serviceBus "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/servicebus/client"
serviceFabric "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/servicefabric/client"
signalr "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/signalr/client"
sql "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/sql/client"
storage "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/storage/client"
streamAnalytics "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/streamanalytics/client"
subscription "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/subscription/client"
trafficManager "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/trafficmanager/client"
web "github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/web/client"
)
type Client struct {
// StopContext is used for propagating control from Terraform Core (e.g. Ctrl/Cmd+C)
StopContext context.Context
Account *ResourceManagerAccount
Features features.UserFeatures
Advisor *advisor.Client
AnalysisServices *analysisServices.Client
ApiManagement *apiManagement.Client
AppConfiguration *appConfiguration.Client
AppInsights *applicationInsights.Client
AppPlatform *appPlatform.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
DataShare *datashare.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
Maintenance *maintenance.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
Sentinel *sentinel.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
func (client *Client) Build(ctx context.Context, o *common.ClientOptions) error {
autorest.Count429AsRetry = false
client.Features = o.Features
client.StopContext = ctx
client.Advisor = advisor.NewClient(o)
client.AnalysisServices = analysisServices.NewClient(o)
client.ApiManagement = apiManagement.NewClient(o)
client.AppConfiguration = appConfiguration.NewClient(o)
client.AppInsights = applicationInsights.NewClient(o)
client.AppPlatform = appPlatform.NewClient(o)
client.Authorization = authorization.NewClient(o)
client.Automation = automation.NewClient(o)
client.Batch = batch.NewClient(o)
client.Bot = bot.NewClient(o)
client.Cdn = cdn.NewClient(o)
client.Cognitive = cognitiveServices.NewClient(o)
client.Compute = compute.NewClient(o)
client.Containers = containerServices.NewClient(o)
client.Cosmos = cosmosdb.NewClient(o)
client.CostManagement = costmanagement.NewClient(o)
client.CustomProviders = customproviders.NewClient(o)
client.DatabaseMigration = datamigration.NewClient(o)
client.DataBricks = databricks.NewClient(o)
client.DataFactory = datafactory.NewClient(o)
client.Datalake = datalake.NewClient(o)
client.DataShare = datashare.NewClient(o)
client.DevSpace = devspace.NewClient(o)
client.DevTestLabs = devtestlabs.NewClient(o)
client.Dns = dns.NewClient(o)
client.EventGrid = eventgrid.NewClient(o)
client.Eventhub = eventhub.NewClient(o)
client.Frontdoor = frontdoor.NewClient(o)
client.HDInsight = hdinsight.NewClient(o)
client.HealthCare = healthcare.NewClient(o)
client.IoTHub = iothub.NewClient(o)
client.IoTCentral = iotcentral.NewClient(o)
client.KeyVault = keyvault.NewClient(o)
client.Kusto = kusto.NewClient(o)
client.LogAnalytics = loganalytics.NewClient(o)
client.Logic = logic.NewClient(o)
client.MachineLearning = machinelearning.NewClient(o)
client.Maintenance = maintenance.NewClient(o)
client.ManagedApplication = managedapplication.NewClient(o)
client.ManagementGroups = managementgroup.NewClient(o)
client.Maps = maps.NewClient(o)
client.MariaDB = mariadb.NewClient(o)
client.Media = media.NewClient(o)
client.MixedReality = mixedreality.NewClient(o)
client.Monitor = monitor.NewClient(o)
client.MSI = msi.NewClient(o)
client.MSSQL = mssql.NewClient(o)
client.MySQL = mysql.NewClient(o)
client.NetApp = netapp.NewClient(o)
client.Network = network.NewClient(o)
client.NotificationHubs = notificationhub.NewClient(o)
client.Policy = policy.NewClient(o)
client.Portal = portal.NewClient(o)
client.Postgres = postgres.NewClient(o)
client.PowerBI = powerBI.NewClient(o)
client.PrivateDns = privatedns.NewClient(o)
client.RecoveryServices = recoveryServices.NewClient(o)
client.Redis = redis.NewClient(o)
client.Relay = relay.NewClient(o)
client.Resource = resource.NewClient(o)
client.Search = search.NewClient(o)
client.SecurityCenter = securityCenter.NewClient(o)
client.Sentinel = sentinel.NewClient(o)
client.ServiceBus = serviceBus.NewClient(o)
client.ServiceFabric = serviceFabric.NewClient(o)
client.SignalR = signalr.NewClient(o)
client.Sql = sql.NewClient(o)
client.Storage = storage.NewClient(o)
client.StreamAnalytics = streamAnalytics.NewClient(o)
client.Subscription = subscription.NewClient(o)
client.TrafficManager = trafficManager.NewClient(o)
client.Web = web.NewClient(o)
return nil
}