-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feat.] Update resource `opentelekomcloud_identity_protection_policy_…
…v3` (#2752) [Feat.] Update resource `opentelekomcloud_identity_protection_policy_v3` Update resource with new options opentelekomcloud_identity_protection_policy_v3 Summary of the Pull Request PR Checklist Refers to: #2747 Tests added/passed. Documentation updated. Schema updated. Release notes added. Acceptance Steps Performed === RUN TestAccIdentityV3Protection_basic --- PASS: TestAccIdentityV3Protection_basic (57.12s) PASS Process finished with exit code 0 Reviewed-by: Muneeb H. Jan <[email protected]> Reviewed-by: Artem Lifshits
- Loading branch information
1 parent
43185f9
commit 100cba0
Showing
6 changed files
with
189 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,9 +24,26 @@ cloud to use this resource. Please refer to [User Management Model](https://docs | |
|
||
## Example Usage | ||
|
||
### Self-Verification | ||
|
||
```hcl | ||
resource "opentelekomcloud_identity_protection_policy_v3" "policy_1" { | ||
enable_operation_protection_policy = false | ||
enable_operation_protection_policy = true | ||
self_management { | ||
access_key = true | ||
password = true | ||
email = false | ||
mobile = false | ||
} | ||
} | ||
``` | ||
|
||
### Verification by another person | ||
|
||
```hcl | ||
resource "opentelekomcloud_identity_protection_policy_v3" "policy_2" { | ||
enable_operation_protection_policy = true | ||
verification_email = "[email protected]" | ||
} | ||
``` | ||
|
||
|
@@ -37,12 +54,35 @@ The following arguments are supported: | |
* `enable_operation_protection_policy` - (Optional, Bool) Indicates whether operation protection has been enabled. | ||
The value can be `true` or `false`. Default: `false` | ||
|
||
* `verification_email` - (Optional, String) Specifies the email address used for verification. An example value is `[email protected]`. | ||
|
||
* `verification_mobile` - (Optional, String) Specifies the mobile number used for verification. | ||
|
||
-> If `protection_enabled` is set to true and neither `verification_email` nor `verification_mobile` is specified, IAM users | ||
perform verification by themselves when performing a critical operation. | ||
|
||
* `self_management` - (Optional, List) Specifies the attributes IAM users can modify. | ||
The [object](#self_management_policy) structure is documented below. | ||
|
||
<a name="self_management_policy"></a> | ||
The `self_management` block supports: | ||
|
||
* `access_key` - (Optional, Bool) Specifies whether to allow IAM users to manage access keys by themselves. | ||
|
||
* `password` - (Optional, Bool) Specifies whether to allow IAM users to change their passwords. | ||
|
||
* `email` - (Optional, Bool) Specifies whether to allow IAM users to change their email addresses. | ||
|
||
* `mobile` - (Optional, Bool) Specifies whether to allow IAM users to change their mobile numbers. | ||
|
||
## Attribute Reference | ||
|
||
In addition to all arguments above, the following attributes are exported: | ||
|
||
* `id` - The ID of account protection policy, which is the same as the domain ID. | ||
|
||
* `self_verification` - Indicates whether the IAM users perform verification by themselves. | ||
|
||
## Import | ||
|
||
Identity operation protection policy can be imported using the account ID or domain ID, e.g. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
releasenotes/notes/iam-protection-policy-update-cc13ec822b120ace.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
enhancements: | ||
- | | ||
**[IAM]** Add ``self_management`` and other verification arguments to ``resource/opentelekomcloud_identity_protection_policy_v3`` (`#2752 <https://github.com/opentelekomcloud/terraform-provider-opentelekomcloud/pull/2752>`_) |