Skip to content

Commit

Permalink
WIP: New Resource: azurerm_app_service_environment
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Mar 7, 2018
1 parent a743e07 commit 104e2fe
Show file tree
Hide file tree
Showing 4 changed files with 716 additions and 2 deletions.
12 changes: 10 additions & 2 deletions azurerm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,9 @@ type ArmClient struct {
trafficManagerEndpointsClient trafficmanager.EndpointsClient

// Web
appServicePlansClient web.AppServicePlansClient
appServicesClient web.AppsClient
appServiceEnvironmentsClient web.AppServiceEnvironmentsClient
appServicePlansClient web.AppServicePlansClient
appServicesClient web.AppsClient
}

func (c *ArmClient) configureClient(client *autorest.Client, auth autorest.Authorizer) {
Expand Down Expand Up @@ -823,6 +824,13 @@ func (c *ArmClient) registerTrafficManagerClients(endpoint, subscriptionId strin
}

func (c *ArmClient) registerWebClients(endpoint, subscriptionId string, auth autorest.Authorizer) {
appServiceEnvironmentsClient := web.NewAppServiceEnvironmentsClientWithBaseURI(endpoint, subscriptionId)
c.configureClient(&appServiceEnvironmentsClient.Client, auth)
// App Service Environments are s-l-o-w.
appServiceEnvironmentsClient.RetryAttempts = 300
appServiceEnvironmentsClient.RetryDuration = 60 * time.Second
c.appServiceEnvironmentsClient = appServiceEnvironmentsClient

appServicePlansClient := web.NewAppServicePlansClientWithBaseURI(endpoint, subscriptionId)
c.configureClient(&appServicePlansClient.Client, auth)
c.appServicePlansClient = appServicePlansClient
Expand Down
1 change: 1 addition & 0 deletions azurerm/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ func Provider() terraform.ResourceProvider {
"azurerm_application_insights": resourceArmApplicationInsights(),
"azurerm_application_security_group": resourceArmApplicationSecurityGroup(),
"azurerm_app_service": resourceArmAppService(),
"azurerm_app_service_environment": resourceArmAppServiceEnvironment(),
"azurerm_app_service_plan": resourceArmAppServicePlan(),
"azurerm_app_service_active_slot": resourceArmAppServiceActiveSlot(),
"azurerm_app_service_slot": resourceArmAppServiceSlot(),
Expand Down
Loading

0 comments on commit 104e2fe

Please sign in to comment.