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

Application gateway resource #413

Merged
merged 3 commits into from
Oct 23, 2017
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ test: fmtcheck
xargs -t -n4 go test $(TESTARGS) -timeout=30s -parallel=4

testacc: fmtcheck
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 120m
TF_ACC=1 go test $(TEST) -v $(TESTARGS) -timeout 180m

vet:
@echo "go vet ."
Expand Down
4 changes: 2 additions & 2 deletions azurerm/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type ArmClient struct {
automationCredentialClient automation.CredentialClient
automationScheduleClient automation.ScheduleClient

appGatewayClient network.ApplicationGatewaysClient
applicationGatewayClient network.ApplicationGatewaysClient
ifaceClient network.InterfacesClient
expressRouteCircuitClient network.ExpressRouteCircuitsClient
loadBalancerClient network.LoadBalancersClient
Expand Down Expand Up @@ -325,7 +325,7 @@ func (c *Config) getArmClient() (*ArmClient, error) {
setUserAgent(&agc.Client)
agc.Authorizer = auth
agc.Sender = sender
client.appGatewayClient = agc
client.applicationGatewayClient = agc

crc := containerregistry.NewRegistriesClientWithBaseURI(endpoint, c.SubscriptionID)
setUserAgent(&crc.Client)
Expand Down
31 changes: 31 additions & 0 deletions azurerm/import_arm_application_gateway_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package azurerm

import (
"testing"

"github.com/hashicorp/terraform/helper/acctest"
"github.com/hashicorp/terraform/helper/resource"
)

func TestAzureRMApplicationGateway_importBasic(t *testing.T) {
resourceName := "azurerm_application_gateway.test"

ri := acctest.RandInt()
config := testAccAzureRMApplicationGateway_basic(ri)

resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Providers: testAccProviders,
CheckDestroy: testCheckAzureRMApplicationGatewayDestroy,
Steps: []resource.TestStep{
{
Config: config,
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
},
},
})
}
1 change: 1 addition & 0 deletions azurerm/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ func Provider() terraform.ResourceProvider {
},

ResourcesMap: map[string]*schema.Resource{
"azurerm_application_gateway": resourceArmApplicationGateway(),
"azurerm_application_insights": resourceArmApplicationInsights(),
"azurerm_app_service": resourceArmAppService(),
"azurerm_app_service_plan": resourceArmAppServicePlan(),
Expand Down
Loading