Skip to content

Add support for managing the 'Firewall and virtual networks' settings of a Storage Account. - #108

Merged
haiyuazhang merged 10 commits into
ansible-collections:devfrom
GerbenWelter:storageaccount_firewall
May 18, 2020
Merged

Add support for managing the 'Firewall and virtual networks' settings of a Storage Account.#108
haiyuazhang merged 10 commits into
ansible-collections:devfrom
GerbenWelter:storageaccount_firewall

Conversation

@GerbenWelter

Copy link
Copy Markdown
Contributor

Add support for managing the 'Firewall and virtual networks' settings of a Storage Account.

SUMMARY

This PR adds support for managing the 'Firewall and virtual networks' settings of a Storage account.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

Storage Account, Firewall and virtual networks

ADDITIONAL INFORMATION

Additionally this PR fixes not setting the https_only setting on creation of the storage account as this was a one line fix.

@Fred-sun Fred-sun left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@GerbenWelter Thank you very much for submitting this PR. There is no problem with the added feature. If the document format is consistent with https://docs.ansible.com/ansible/latest/dev_guide/developing_modules_documenting.html, it will be more perfect. Thank you!

Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
description:
- When C(default_action) is set to 'Deny' this controls which Azure components can still reach the Storage Account.
- The list is comma separated.
- It can be any combination of the following: AzureServices, Logging, Metrics.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- It can be any combination of the following: AzureServices, Logging, Metrics.
- It can be any combination of the following: C(AzureServices), C(Logging), C(Metrics).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@Fred-sun your comment is valid but I'm having second thoughts on keeping this on the Ansible side a string. Would it be more Ansible like to make this a list and convert it to comma separated string for the Azure api?

Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
Comment thread plugins/modules/azure_rm_storageaccount.py Outdated
@haiyuazhang

Copy link
Copy Markdown
Contributor

GerbenWelter and others added 8 commits May 15, 2020 12:06
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
@GerbenWelter

Copy link
Copy Markdown
Contributor Author

@haiyuazhang I did briefly look around for tests but I missed that file. I'll update the test case.

@GerbenWelter

Copy link
Copy Markdown
Contributor Author

@haiyuazhang I have added the tests for https_only (was already missing) and network_acls. The network_acls test only adds an IP rule because testing of virtual_network_rules requires an existing subnet.

@haiyuazhang
haiyuazhang merged commit 4a9c723 into ansible-collections:dev May 18, 2020
Fred-sun pushed a commit to Fred-sun/ansible_collections_azure that referenced this pull request Sep 3, 2020
… of a Storage Account. (ansible-collections#108)

* Add support for managing the 'Firewall and virtual networks' settings of
a Storage Account.

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

Update azure_rm_publicipaddress

add test sample

codebase cleanup: update format (ansible-collections#131)

* Update format

refine azure devops pipeline (ansible-collections#138)

* refine azure devops pipeline

enable single module test (ansible-collections#144)

*  enable single module test

bug fixing in azure_rm_aks module(ansible-collections#170)

* bug fixing in azure_rm_aks module

For Test( 2.9 to 2.10) (ansible-collections#140)

* adding more testing dimensions

Add FileEndpoint to azure_rm_storageaccount_info (ansible-collections#102)

* Add FileEndpoint to azure_rm_storageaccount_info

Use hasattr instead of dir (ansible-collections#75)

Add ephemeral OS disk for azure_rm_virtualmachine (ansible-collections#124)

* Add ephemeral OS disk  support for azure_rm_virtualmachine

Add ephemeral OS disk for azure_rm_virtualmachinescaleset (ansible-collections#128)

* Add ephemeral OS disk support for azure_rm_virtualmachinescaleset

Change network_client api_version to match latest default api_version (ansible-collections#157)

* #Fixes 156
Change network_client api_version to match latest default api_version

* #Fixes 156
Update azure-mgmt-network to 10.2.0
Update 'latest' version listing and default version for Network Client to 2018-08-01

Add ability to remove all Subnet Service Endpoints when supplying an empty list. (ansible-collections#148)

New azure_rm_privatednszone module with tests (ansible-collections#122)

* New azure_rm_privatednszone module with tests

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: Fred-sun <xiuxi.sun@qq.com>

Add new azure active directory related modules (ansible-collections#179)

* add ad related modules

* release v0.2.0 preparation and minor ad module bug fixing

fixing sanity testing errors in ad related modules (ansible-collections#182)

* disable ad relate module test
* fixing sanity testing errors in ad related modules

Fixing issues in azure_rm_deployment_info.py  (ansible-collections#180)

- Fixing getting the template_link when it does not exist.
- Feature: Return the correlation_id

Co-authored-by: Steve Kieu <steve.kieu@xvt.com.au>

azure_rm_virtualmachine: Protect against no diskSizeGB (ansible-collections#185)

Disks `diskSizeGB` is not reported if the Virtual Machine is
deallocated.  Trying to fetch it is causing a `KeyError`. This guards
against that KeyError and then nulls out the key so it isn't set
incorrectly in the update call.

Fix wrong module deprecate statement format (ansible-collections#176)

* fix wrong module deprecate statement format

update doc

add batch upload feature in azure_rm_storageblob (ansible-collections#203)

Co-authored-by: haiyuazhang <haiyuan.zhang1982@gmaile.com>

fixing status code issue in azure_rm_deployment (ansible-collections#204)

Co-authored-by: haiyuazhang <haiyuan.zhang1982@gmaile.com>

fixing update check bug in azure_rm_adserviceprincipal (ansible-collections#205)

Bump version to v0.3.0

update doc

change service_url to service_uri (ansible-collections#212)

Storageaccount tlsversion (ansible-collections#207)

* add support for minimum_tls_version

fix(vm): fix boot diagnistics option "no" caused an error (ansible-collections#200)

Fix the issue ansible-collections#158 (ansible-collections#214)

* fix issue ansible-collections#158 and add tests

azure_rm_appgateway.py: Support Version 2 SKUs (ansible-collections#198)

fix sanity test issues (ansible-collections#223)

Bump version to v0.4.0

lift v0.4.0 to v1.0.0

update new pr-pipeline (ansible-collections#229)

Add execution environment metadata (ansible-collections#220)

Storage account allow blob public access parameter (ansible-collections#219)

* Storage account allow blob public access parameter

* Change name of test to match correct attribute.

Update azure_rm_virtualmachine boot_diagnostics resource group config… (ansible-collections#208)

* Update azure_rm_virtualmachine boot_diagnostics resource group configuration

Update azure_rm_storageaccount.py file (ansible-collections#233)

* Uneatable parameters do not need to set default values

fix the problem of disk lun self-increment (ansible-collections#237)

Fixing rule_type reference (ansible-collections#99)

Reference to ev instead of item is preventing the expected rule_type values from functioning

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

add load_balancer_sku option for aks (ansible-collections#199)

* added load_balancer_sku option for aks

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>

Improve OS detection when VM has no osProfile (ansible-collections#197)

We have VM without OS profile (checked on https://resources.azure.com/) and they appear as "unknown" os :-/

This appear to be a known issue: https://support.microsoft.com/en-ph/help/4018140/computer-names-of-specialized-virtual-machines-are-missing-or-blank-in

Co-authored-by: Fred-sun <37327967+Fred-sun@users.noreply.github.com>
Co-authored-by: haiyuan_zhang <haiyuan.zhang1982@gmail.com>

Add IPv6 address for azure_rm_subnet (ansible-collections#240)

* Add IPv6 address for azure_rm_subnet

Get address_prefixes info from virtualnetwork (ansible-collections#239)

* Add new parameter for get subnet IPv6 info

Support azure cli credentials with multiple `subscription_id`s (ansible-collections#195)

* feat: Support azure cli credentials with multiple `subscription_id`s

If the `subscription_id` is specified as module parameter or in the
environment then try to find that subscription in either the MSI (existing) or
CLI credentials (new). This patch brings those two scenarios in line.

* docs: Improve documentation on auth_source

* refactor: Move defaults up to class

Just trying to make the `__init__` fn a bit slimmer and easier to
reason about.

* refactor: Use python kwargs instead of passing dict

This is an isomorphic change, just using python syntax to accomplish
the exact same thing.

* refactor: Use ansible builtin `env_fallback` for `auth_source`

Ansible modules have a pattern for looking up a module parameter in
the environment with precedence of explicit param -> env -> default.
Use this pattern to simplify our code here.

This shouldn't change any behavior of `auth_source`, just using
standard ansible patterns to accomplish it.

* style: Split long line

No semantic change, just wrapping a long line to be a bit more
readable.

* refactor: helper fun _get_env

Somewhat frequently there is a lookup in the environment for the key that
matches a module parameter. This simple helper just encapsulates that
to make it a bit easier elsewhere-- lookup the same key in params,
credentials, env

* fix: typo in log message

Co-authored-by: Justin Ossevoort <justin.ossevoort@tesorion.nl>

Add 10.3 version for azure_rm_mariadbserver module (ansible-collections#244)

* add new version for azure_rm_mariadbserver

Update azure_rm_storageaccount yaml (ansible-collections#226)

* update azure_rm_storageaccount test
* update pipeline file
p3ck pushed a commit to p3ck/ansible-collections_azure that referenced this pull request Jun 16, 2025
- The rulebooks moved to extensions/eda/rulebooks
- The event_source moved to extensions/eda/plugins/event_sources
- The event_filter moved to extensions/eda/plugins/event_filters

Please note that event_source and event_filter are plural forms now
event_transport has been removed
magodo pushed a commit that referenced this pull request Jul 15, 2025
* Make azure_service_bus asyncio compatible

* [AAP-10253] New collection layout (#108)

- The rulebooks moved to extensions/eda/rulebooks
- The event_source moved to extensions/eda/plugins/event_sources
- The event_filter moved to extensions/eda/plugins/event_filters

Please note that event_source and event_filter are plural forms now
event_transport has been removed

* [AAP-11474] Use singular form for event_source/event_filter (#119)

https://issues.redhat.com/browse/AAP-11474

Move
* plugins/event_filters => plugins/event_filter
* plugins/event_sources => plugins/event_source

* Fix all auto-fixable ruff issues

* Fix some ruff issues in azure_service_bus.py

Remaining issues:
66:30: ANN101 Missing type annotation for `self` in method

* Fix remaining ruff issues

* Add tox-pylint linters, move tox to the project root, update pre-commit (#158)

* Add tox-pylint linters, move tox to the project root

* d

* Solve systemdlib issues

* Fix tox issues

* Revert - Fix tox issues

This reverts commit
90a8b55

* Address arg-type, return and return-value type errors (#261)

* Address arg-type, return and return-value type errors

Related: #258
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Address more typing errors (#264)

Related: #258

* Add schemas for our source plugins (#198)

* feat: Added schemas for our source plugins

This is some of the work needed for the UI to generate source
args for Fanout.

* Fix spelling

---------

Co-authored-by: Mauricio Magnani Jr <magnani@redhat.com>
Co-authored-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>

* Add more types (#282)

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* More types (#287)

* type: make code respect mypy strict mode (#290)

Fixes: #258

* feat: [AAP-38755] add documentation for azure_service_bus, file and file_watch plugins (#390)

* Update requirements for eda extensions and for unit tests

* Update Example to use new name

azure.azcollection.azure_service_bus

* Add basic README about how to use EDA rulesets with Azure

* Link to Ansible rulebook documentation

---------

Signed-off-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Bill Wei <bilwei@redhat.com>
Co-authored-by: Madhu Kanoor <mkanoor@redhat.com>
Co-authored-by: Erik Clarizio <eclarizio@gmail.com>
Co-authored-by: Erik Clarizio <eclarizi@redhat.com>
Co-authored-by: Alex <aizquier@redhat.com>
Co-authored-by: Laszlo Szomor <laszomor@gmail.com>
Co-authored-by: Sorin Sbarnea <sorin.sbarnea@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Mauricio Magnani Jr <magnani@redhat.com>
Co-authored-by: Sorin Sbarnea <ssbarnea@redhat.com>
Co-authored-by: Alina Buzachis <abuzachis@redhat.com>
Co-authored-by: Doston <31990136+Dostonbek1@users.noreply.github.com>
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.

3 participants