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

Adds Resource azurerm_app_service_slot_virtual_network_swift_connection #5916

Merged
merged 17 commits into from
Jul 6, 2020
Merged

Adds Resource azurerm_app_service_slot_virtual_network_swift_connection #5916

merged 17 commits into from
Jul 6, 2020

Conversation

cimnine
Copy link
Contributor

@cimnine cimnine commented Feb 26, 2020

Adds a new resource azurerm_app_service_virtual_network_swift_connection_slot which uses the corresponding Azure API and is named after it.

Fixes #5458

Sponsored by nxt Engineering.

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.

Hey @cimnine,

I've given this PR a quick review as its a draft (is it ready?) and left some comments inline that should be addressed. Additionally while running the tests i got:

"azurerm/internal/services/web/tests/resource_arm_app_service_slot_virtual_network_association_test.go:178:9: Sprintf format %d reads arg #6, but call has 5 args"

@cimnine
Copy link
Contributor Author

cimnine commented Feb 27, 2020

Thank's for the early feedback.

I've given this PR a quick review as its a draft (is it ready?) ...

Indeed, I'm still validating the proposed change, hence the draft status of this PR.

... and left some comments inline that should be addressed. Additionally while running the tests i got: [error]

I have incorporated the feedback and fixed the test so far.

Except for the failing test – which was obviously a shortcoming on my side – would there have been any other way than the feedback to learn about these code conventions? I'm only asking because I did look out for a CONTRIBUTION.md or similar, but I have not succeeded in finding any relevant documentation.

@ghost ghost removed the waiting-response label Feb 27, 2020
@cimnine cimnine marked this pull request as ready for review February 27, 2020 12:30
@cimnine
Copy link
Contributor Author

cimnine commented Feb 27, 2020

The acceptance tests for the modified resources ran successfully on my machine, also the regular test suite. The new resource azurerm_app_service_virtual_network_swift_connection_slot is modelled according to the existing resource azurerm_app_service_virtual_network_swift_connection.

An early idea was making the azurerm_app_service_virtual_network_swift_connection resource capable of doing both, slot and regular swift connections. But I think that the chosen solution – copying the existing resource code and adjusting the relevant lines – yields code that is easier to comprehend and therefore more maintainable in the long run.

@cimnine
Copy link
Contributor Author

cimnine commented Mar 4, 2020

Just because I was not sure that this is clear: From my point of view this PR is ready to be reviewed and eventually be merged.

@cimnine
Copy link
Contributor Author

cimnine commented Mar 12, 2020

Rebased onto latest master

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.

Hi @cimnine,

Thanks for the new resource, overall this looks good. I've left some comments inline that once addressed this will be good to merge!

@cimnine
Copy link
Contributor Author

cimnine commented Apr 7, 2020

I have implemented all but one requested change, for which I've made my case. The branch is also rebased onto the latest master.

@ghost ghost removed the waiting-response label Apr 7, 2020
@cimnine
Copy link
Contributor Author

cimnine commented May 5, 2020

Rebased onto master.

@cimnine cimnine requested a review from katbyte May 5, 2020 08:24
@cimnine
Copy link
Contributor Author

cimnine commented May 14, 2020

Rebased onto master and renames resource to azurerm_app_service_slot_virtual_network_swift_connection as suggested by @katbyte.

@cimnine cimnine changed the title Adds Resource azurerm_app_service_virtual_network_swift_connection_slot Adds Resource azurerm_app_service_slot_virtual_network_swift_connection May 14, 2020
@JSkimming
Copy link

Just wondering where we are with this. Judging by the replies it's awaiting your review @katbyte

@schlbra
Copy link

schlbra commented Jun 16, 2020

Any updates on this @katbyte ?

cimnine added 9 commits June 17, 2020 15:36
This is done by the maintainers after the PR is merged.
The examples for the `virtual_network_swift_connect` and `virtual_network_swift_connect_slot` have been updated to be nicer to read. I.e. everything _test_ has been replaced by _example_.
Fixes the following error in the tests:
"azurerm/internal/services/web/tests/resource_arm_app_service_slot_virtual_network_association_test.go:178:9: Sprintf format %d reads arg #6, but call has 5 args"
…nSlot

... to TestAccAzureRMAppServiceSlotVirtualNetworkSwiftConnection.
The reason is that otherwise it's not possible to just run the test for `TestAccAzureRMAppServiceVirtualNetworkSwiftConnection`, as the `TestAccAzureRMAppServiceVirtualNetworkSwiftConnectionSlot` also matches that filter.
The value `slot.Name` contains "app_service_name/slot_name". If this were retained as `slot_name` in the Terraform state then terraform would try to re-create the resource in every run. Thankfully, this was caught during the integration tests.
@cimnine
Copy link
Contributor Author

cimnine commented Jun 17, 2020

IMO it's ready to merge. I've rebased just now once more onto master in order to resolve the merge conflict.

@ghost ghost added size/XXL and removed size/XL labels Jul 3, 2020
Copy link
Member

@jackofallops jackofallops left a comment

Choose a reason for hiding this comment

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

Thanks @cimnine!

I've pushed some updates while I had opportunity to resolve some todo's on the resource you based your change on and reflected those in the new resource too. I'm on vacation today, so I'll run the tests on CI and merge when I get back Monday if one of the team doesn't get to it before then.

Thanks again

Copy link

@schlbra schlbra left a comment

Choose a reason for hiding this comment

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

Lgtm

@jackofallops
Copy link
Member

Tests passing
image

@jackofallops jackofallops dismissed katbyte’s stale review July 6, 2020 07:43

changes superseded

@jackofallops jackofallops merged commit b65a290 into hashicorp:master Jul 6, 2020
@jackofallops jackofallops deleted the azurerm_app_service_virtual_network_swift_connection_slot branch July 6, 2020 07:43
jackofallops added a commit that referenced this pull request Jul 6, 2020
@cimnine
Copy link
Contributor Author

cimnine commented Jul 6, 2020

Thanks for merging 🥳

@jackofallops jackofallops added this to the v2.18.0 milestone Jul 6, 2020
@ghost
Copy link

ghost commented Jul 10, 2020

This has been released in version 2.18.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 = "~> 2.18.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Aug 5, 2020

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 👉 [email protected]. Thanks!

@ghost ghost locked and limited conversation to collaborators Aug 5, 2020
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.

Support for App Service Slots with azurerm_app_service_virtual_network_swift_connection
5 participants