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

Bug Fix: azurerm_express_route_circuit #3496

Merged
merged 2 commits into from
May 22, 2019
Merged

Conversation

mbfrahry
Copy link
Member

@mbfrahry mbfrahry commented May 22, 2019

The Express Route Circuit resource would overwrite any sub resources (ie. peering and authorization) associated it when updating. This PR changes that by passing in the resource obtained from the api with only the circuit attributes managed by Terraform being changed.

This resource may also become out of sync after the service provider updates the express route circuit outside of Azure. We can get around this by updating the resource prior to updating any values.

Addresses #2250

This test is prior to the changes below:

--- FAIL: TestAccAzureRMExpressRouteCircuitPeering_azurePrivatePeeringWithCircuitUpdate (214.88s)

After:

--- PASS: TestAccAzureRMExpressRouteCircuit (1942.40s)
    --- PASS: TestAccAzureRMExpressRouteCircuit/basic (1002.60s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/update (168.30s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/allowClassicOperationsUpdate (166.48s)
        --- SKIP: TestAccAzureRMExpressRouteCircuit/basic/requiresImport (0.00s)
            resource_arm_express_route_circuit_test.go:84: Skipping since resources aren't required to be imported
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/metered (118.72s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/unlimited (128.62s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/premiumUnlimited (128.01s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/tierUpdate (165.50s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/premiumMetered (126.97s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/basic/data_basic (133.05s)
    --- PASS: TestAccAzureRMExpressRouteCircuit/PrivatePeering (387.35s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/PrivatePeering/azurePrivatePeering (387.35s)
        --- SKIP: TestAccAzureRMExpressRouteCircuit/PrivatePeering/requiresImport (0.00s)
            resource_arm_express_route_circuit_peering_test.go:44: Skipping since resources aren't required to be imported
    --- PASS: TestAccAzureRMExpressRouteCircuit/MicrosoftPeering (246.58s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/MicrosoftPeering/microsoftPeering (246.58s)
    --- PASS: TestAccAzureRMExpressRouteCircuit/authorization (0.00s)
        --- SKIP: TestAccAzureRMExpressRouteCircuit/authorization/requiresImport (0.00s)
            resource_arm_express_route_circuit_authorization_test.go:41: Skipping since resources aren't required to be imported
        --- PASS: TestAccAzureRMExpressRouteCircuit/authorization/basic (151.11s)
        --- PASS: TestAccAzureRMExpressRouteCircuit/authorization/multiple (172.81s)
PASS

@ghost ghost added the size/M label May 22, 2019
@mbfrahry mbfrahry requested a review from a team May 22, 2019 05:43
@mbfrahry mbfrahry changed the title Bug Fix: azurerm_express_route_circuit [WIP] Bug Fix: azurerm_express_route_circuit May 22, 2019
@mbfrahry mbfrahry changed the title [WIP] Bug Fix: azurerm_express_route_circuit Bug Fix: azurerm_express_route_circuit May 22, 2019
@tombuildsstuff tombuildsstuff added this to the v1.29.0 milestone May 22, 2019
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@mbfrahry mbfrahry merged commit 929a937 into master May 22, 2019
@mbfrahry mbfrahry deleted the b-circuit-express-route branch May 22, 2019 22:15
@ghost
Copy link

ghost commented May 26, 2019

This has been released in version 1.29.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
	version = "~> 1.29.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Jun 22, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Jun 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants