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

Set the default value of enable_soft_delete to true #463

Merged
merged 3 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion plugins/modules/azure_rm_keyvault.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@
description:
- Property to specify whether the soft delete functionality is enabled for this key vault.
type: bool
default: True
recover_mode:
description:
- Create vault in recovery mode.
Expand Down Expand Up @@ -243,7 +244,8 @@ def __init__(self):
type='bool'
),
enable_soft_delete=dict(
type='bool'
type='bool',
default=True
),
recover_mode=dict(
type='bool'
Expand Down
7 changes: 7 additions & 0 deletions plugins/modules/azure_rm_keyvault_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,12 @@
returned: always
type: bool
sample: False
enable_soft_delete:
description:
- Property to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault.
type: bool
returned: always
sample: True
tags:
description:
- List of tags.
Expand Down Expand Up @@ -190,6 +196,7 @@ def keyvault_to_dict(vault):
enabled_for_deployment=vault.properties.enabled_for_deployment,
enabled_for_disk_encryption=vault.properties.enabled_for_disk_encryption,
enabled_for_template_deployment=vault.properties.enabled_for_template_deployment,
enable_soft_delete=vault.properties.enable_soft_delete,
access_policies=[dict(
tenant_id=policy.tenant_id,
object_id=policy.object_id,
Expand Down
1 change: 1 addition & 0 deletions tests/integration/targets/azure_rm_keyvault/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@
- facts['keyvaults'][0]['access_policies'] != None
- facts['keyvaults'][0]['sku'] != None
- facts['keyvaults'][0]['id'] != None
- facts['keyvaults'][0]['enable_soft_delete'] == true
#
# azure_rm_keyvaultkey tests
#
Expand Down