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

New modules for webapp vnet connection #590

Merged
merged 23 commits into from
Aug 13, 2021

Conversation

l3ender
Copy link
Contributor

@l3ender l3ender commented Aug 3, 2021

SUMMARY

This PR includes new modules to accomplish ability to configure a webapp's vnet connection (integration), so that networking configuration can be defined for a web app.

Resolves #556.

ISSUE TYPE
  • New Module Pull Request
COMPONENT NAME

azure_rm_webappvnetconnection
azure_rm_webappvnetconnection_info

ADDITIONAL INFORMATION
- name: Configure web app with virtual network
 azure.azcollection.azure_rm_webappvnetconnection:
    name: "MyWebapp"
    resource_group: "MyResourceGroup"
    vnet_name: "MyVnetName"
    subnet: "MySubnetName"

- name: Configure web app with virtual network in different resource group
  azure.azcollection.azure_rm_webappvnetconnection:
    name: "MyWebapp"
    resource_group: "MyResourceGroup"
    vnet_name: "MyVnetName"
    subnet: "MySubnetName"
    vnet_resource_group: "MyOtherResourceGroup"

- name: Delete web app virtual network
  azure.azcollection.azure_rm_webappvnetconnection:
    name: "MyWebapp"
    resource_group: "MyResourceGroup"
    state: "absent"

- name: View web app vnet connection information
  azure.azcollection.azure_rm_webappvnetconnection_info:
    name: "MyWebapp"
    resource_group: "MyResourceGroup"

Output for a connection looks like:

ok: [localhost] => {
    "msg": {
        "changed": false,
        "connection": {
            "id": "/subscriptions/xxx-xxx/resourceGroups/test-rgproviders/Microsoft.Web/sites/webapp6654533/virtualNetworkConnections/9de64c0a-4bfd-4139-a4bb-2e130df586a1_subnet6654533",
            "name": "9de64c0a-4bfd-4139-a4bb-2e130df586a1_subnet6654533",
            "subnet_name": "subnet6654533",
            "vnet_name": "vnet6654533",
            "vnet_resource_group": "test-rg",
            "vnet_resource_id": "/subscriptions/xxx-xxx/resourceGroups/test-rg/providers/Microsoft.Network/virtualNetworks/vnet6654533/subnets/subnet6654533"
        }
    }
}

@l3ender l3ender changed the title Modules for webapp vnet integration Modules for webapp vnet connection Aug 3, 2021
@l3ender l3ender changed the title Modules for webapp vnet connection New modules for webapp vnet connection Aug 3, 2021
@l3ender l3ender marked this pull request as ready for review August 3, 2021 21:02
@l3ender
Copy link
Contributor Author

l3ender commented Aug 3, 2021

@Fred-sun Hello, this is now ready for review. Can you please take a look and advise when you are able?

@Fred-sun
Copy link
Collaborator

Fred-sun commented Aug 5, 2021

@l3ender Please add use cases related to the azure_rm_webapp_vnetconnection_info.py module in tests/integration/targets/azure_rm_webapp_vnetconnection/tasks/main.yml, thank you!

plugins/module_utils/azure_rm_common.py Outdated Show resolved Hide resolved
plugins/module_utils/azure_rm_common.py Outdated Show resolved Hide resolved
plugins/module_utils/azure_rm_common.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_webapp_vnetconnection.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_webapp_vnetconnection.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_webapp_vnetconnection_info.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_webapp_vnetconnection_info.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_webapp_vnetconnection.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_webapp_vnetconnection_info.py Outdated Show resolved Hide resolved
plugins/modules/azure_rm_webapp_vnetconnection.py Outdated Show resolved Hide resolved
@Fred-sun
Copy link
Collaborator

Fred-sun commented Aug 5, 2021

@l3ender You are advised to change the module name to --azure_rm_webappvnetconnnection. to ensure that the module name is consistent with other modules. Thank you very much!

@Fred-sun Fred-sun added medium_priority Medium priority new_module_pr Add new modules work in In trying to solve, or in working with contributors labels Aug 5, 2021
@l3ender l3ender requested a review from Fred-sun August 6, 2021 00:36
@l3ender
Copy link
Contributor Author

l3ender commented Aug 6, 2021

@Fred-sun Thank you for the review. I have updated--please let me know if there are other changes!

If can you provide a python linting file which can be used for style/formatting it would be helpful!

@Fred-sun Fred-sun added ready_for_review The PR has been modified and can be reviewed and merged and removed work in In trying to solve, or in working with contributors labels Aug 10, 2021
Copy link
Collaborator

@Fred-sun Fred-sun left a comment

Choose a reason for hiding this comment

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

@l3ender ansible core new request! Thank you very much!

@xuzhang3
Copy link
Collaborator

@l3ender can you resolve the file conflicting files

@l3ender
Copy link
Contributor Author

l3ender commented Aug 12, 2021

@xuzhang3 Merge conflict resolved...thanks!

@xuzhang3
Copy link
Collaborator

LGTM

@xuzhang3 xuzhang3 merged commit 45b239d into ansible-collections:dev Aug 13, 2021
@xuzhang3 xuzhang3 deleted the webapp-vnet-integration branch August 13, 2021 03:01
@l3ender
Copy link
Contributor Author

l3ender commented Aug 20, 2021

Thanks for merging this (and other PRs), @Fred-sun and @xuzhang3. Is it possible to have a new release including all the latest changes? Thank you!!

@xuzhang3
Copy link
Collaborator

@l3ender We are preparing the new release, we still have several tasks to do before the new version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium_priority Medium priority new_module_pr Add new modules ready_for_review The PR has been modified and can be reviewed and merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ability for webapp vnet integration
3 participants