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

Add support for VNet integration #888

Merged
merged 14 commits into from
Mar 22, 2022

Conversation

TheRSP
Copy link
Contributor

@TheRSP TheRSP commented Mar 9, 2022

This PR closes #656 #797

The changes in this PR are as follows:

  • Added route_via_vnet to WebApp and functions

I have read the contributing guidelines and have completed the following:

  • Tested my code end-to-end against a live Azure subscription.
  • Updated the documentation in the docs folder for the affected changes.
  • Written unit tests against the modified code that I have made.
  • Updated the release notes with a new entry for this PR.
  • Checked the coding standards outlined in the contributions guide and ensured my code adheres to them.

If I haven't completed any of the tasks above, I include the reasons why here:

Below is a minimal example configuration that includes the new features, which can be used to deploy to Azure:

open Farmer
open Farmer.Builders

let vnet = 
    vnet {
        name $"my-vnet"

        build_address_spaces [
            addressSpace {
                space $"10.1.0.0/16"
                subnets [ 
                    subnetSpec {
                        name "workload"
                        size 18
                        add_delegations [ Network.SubnetDelegationService "Microsoft.Web/serverfarms" ]
                    }
                ]
            } 
        ]
    }

let app = webApp {
    name "my-vnet-app"
    sku Farmer.WebApp.Sku.S1
    app_insights_off
    vnet (vnet, ResourceName "workload")
}

arm {
    add_resource vnet
    add_resource app
}

Copy link
Collaborator

@ninjarobot ninjarobot left a comment

Choose a reason for hiding this comment

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

Looks great, thank you for the contribution! One small adjustment would be to follow the conventions used in other resources that attach to a subnet.

Also, IIRC there are pricing tier requirements for attaching to a vnet, so it would be good to enforce those.

RELEASE_NOTES.md Outdated Show resolved Hide resolved
src/Farmer/Builders/Builders.WebApp.fs Outdated Show resolved Hide resolved
@TheRSP
Copy link
Contributor Author

TheRSP commented Mar 15, 2022

Thanks for the review. I believe I have now addressed all the comments you have made.

@ninjarobot
Copy link
Collaborator

@TheRSP thanks for updating the operation to vnet, but also please update the docs to match. Also the behavior is still a little different in your implementation here. I cited the AKS builder before, but it might also be good to look at the VM builder for linking to managed and unmanaged resources so this can follow that same example.

@ninjarobot ninjarobot added this to the 1.6.30 milestone Mar 17, 2022
Copy link
Collaborator

@ninjarobot ninjarobot left a comment

Choose a reason for hiding this comment

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

Is the Standard SKU another name for the consumption plan?

src/Farmer/Builders/Builders.WebApp.fs Outdated Show resolved Hide resolved
@ninjarobot ninjarobot modified the milestones: 1.6.30, 1.6.31 Mar 17, 2022
@ninjarobot
Copy link
Collaborator

@TheRSP can you please check into the build errors?

@TheRSP
Copy link
Contributor Author

TheRSP commented Mar 22, 2022

Sorry about that, forgot to update the tests after I enhanced the validation

Copy link
Collaborator

@ninjarobot ninjarobot left a comment

Choose a reason for hiding this comment

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

Great, thanks for the updates!

@ninjarobot ninjarobot merged commit bf094e5 into CompositionalIT:master Mar 22, 2022
github-actions bot pushed a commit that referenced this pull request Mar 22, 2022
@TheRSP TheRSP deleted the vnet-integration branch March 22, 2022 13:58
@ninjarobot
Copy link
Collaborator

This is released in Farmer 1.6.31.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for WebApp VNet integration
2 participants