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

Disable/Enable Rotation Policy support for kms key #4110

Merged
merged 8 commits into from
Nov 10, 2022

Conversation

harshit777
Copy link
Contributor

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@harshit777 harshit777 force-pushed the RotationPolicyDisable branch 2 times, most recently from e15d2bc to 123dbb4 Compare October 14, 2022 09:16
@harshit777
Copy link
Contributor Author

harshit777 commented Oct 14, 2022

Reference to this PR, #4071, its a replication of the same, had to close it because many of conflicts, creating this one with the same changes.

@harshit777 harshit777 changed the title Disable Rotation Policy Disable/Enable Rotation Policy support for kms key Oct 14, 2022
Copy link

@dinesh-venkatraman-g dinesh-venkatraman-g left a comment

Choose a reason for hiding this comment

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

Add evidences of all test cases passing without any failures

ibm/service/kms/resource_ibm_kms_key.go Outdated Show resolved Hide resolved
ibm/service/kms/resource_ibm_kms_key.go Outdated Show resolved Hide resolved
ibm/service/kms/resource_ibm_kms_key_policies_test.go Outdated Show resolved Hide resolved
@harshit777 harshit777 force-pushed the RotationPolicyDisable branch 2 times, most recently from 4659ba7 to c47aaba Compare October 17, 2022 11:02
@harshit777 harshit777 force-pushed the RotationPolicyDisable branch from c47aaba to 28cca8b Compare October 17, 2022 11:15
@harshit777 harshit777 force-pushed the RotationPolicyDisable branch 4 times, most recently from 5a56bac to 105f8a5 Compare October 25, 2022 10:56
Copy link
Contributor

@Sidd-kp Sidd-kp left a comment

Choose a reason for hiding this comment

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

LGTM!! Great work. Well done cleaning up the other test suits as well.

@harshit777 harshit777 force-pushed the RotationPolicyDisable branch 3 times, most recently from 4e1267f to 8f49032 Compare October 28, 2022 09:59
@harshit777
Copy link
Contributor Author

=== RUN TestAccIBMKMSDataSourceKeyPolicy_basicNew
--- PASS: TestAccIBMKMSDataSourceKeyPolicy_basicNew (74.93s)
=== RUN TestAccIBMKMSKeyRingDataSource_basic
--- PASS: TestAccIBMKMSKeyRingDataSource_basic (58.46s)
=== RUN TestAccIBMKMSKeyDataSource_basic
--- PASS: TestAccIBMKMSKeyDataSource_basic (65.46s)
=== RUN TestAccIBMKMSKeyDataSource_Key
--- PASS: TestAccIBMKMSKeyDataSource_Key (74.49s)
=== RUN TestAccIBMKMSKeyDataSourceHPCS_basic
data_source_ibm_kms_key_test.go:57:
--- SKIP: TestAccIBMKMSKeyDataSourceHPCS_basic (0.00s)
=== RUN TestAccIBMKmsDataSourceKeyPolicy_basic
--- PASS: TestAccIBMKmsDataSourceKeyPolicy_basic (69.19s)
=== RUN TestAccIBMKMSDataSource_basic
--- PASS: TestAccIBMKMSDataSource_basic (64.17s)
=== RUN TestAccIBMKMSKeyDataSource_Keys
--- PASS: TestAccIBMKMSKeyDataSource_Keys (73.55s)
=== RUN TestAccIBMKmsDataSourceKeysPolicy_basic
--- PASS: TestAccIBMKmsDataSourceKeysPolicy_basic (70.80s)
=== RUN TestAccIBMKpDataSource_basic
--- PASS: TestAccIBMKpDataSource_basic (54.59s)
=== RUN TestAccIBMKMSResource_Key_Alias_Name
--- PASS: TestAccIBMKMSResource_Key_Alias_Name (68.41s)
=== RUN TestAccIBMKMSResource_Key_Alias_Duplicate
--- PASS: TestAccIBMKMSResource_Key_Alias_Duplicate (49.13s)
=== RUN TestAccIBMKMSResource_Key_Alias_Key_Check
--- PASS: TestAccIBMKMSResource_Key_Alias_Key_Check (134.42s)
=== RUN TestAccIBMKMSResource_Key_Alias_Key_Limit
--- PASS: TestAccIBMKMSResource_Key_Alias_Key_Limit (50.06s)
=== RUN TestAccIBMKMSKeyPolicy_basic_check
--- PASS: TestAccIBMKMSKeyPolicy_basic_check (99.74s)
=== RUN TestAccIBMKMSKeyPolicy_basic_check_enable
--- PASS: TestAccIBMKMSKeyPolicy_basic_check_enable (115.20s)
=== RUN TestAccIBMKMSKeyPolicy_rotation_check
--- PASS: TestAccIBMKMSKeyPolicy_rotation_check (69.22s)
=== RUN TestAccIBMKMSKeyPolicy_dualAuth_check
--- PASS: TestAccIBMKMSKeyPolicy_dualAuth_check (71.26s)
=== RUN TestAccIBMKMSKeyPolicy_dualAuth_check_with_Alias
--- PASS: TestAccIBMKMSKeyPolicy_dualAuth_check_with_Alias (72.68s)
=== RUN TestAccIBMKMSResource_Key_Ring_Name
--- PASS: TestAccIBMKMSResource_Key_Ring_Name (55.14s)
=== RUN TestAccIBMKMSResource_Key_Ring_Key
--- PASS: TestAccIBMKMSResource_Key_Ring_Key (63.63s)
=== RUN TestAccIBMKMSResource_Key_Ring_Not_Exist
--- PASS: TestAccIBMKMSResource_Key_Ring_Not_Exist (38.56s)
=== RUN TestAccIBMKMSResource_basic
resource_ibm_kms_key_test.go:20:
--- SKIP: TestAccIBMKMSResource_basic (0.00s)
=== RUN TestAccIBMKMSHPCSResource_basic
resource_ibm_kms_key_test.go:55:
--- SKIP: TestAccIBMKMSHPCSResource_basic (0.00s)
=== RUN TestAccIBMKMSResource_ValidExpDate
--- PASS: TestAccIBMKMSResource_ValidExpDate (84.84s)
=== RUN TestAccIBMKMSResource_InvalidExpDate
--- PASS: TestAccIBMKMSResource_InvalidExpDate (46.32s)
=== RUN TestAccIBMKpResource_basic
--- PASS: TestAccIBMKpResource_basic (56.61s)
PASS
ok github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/kms 1682.588s

@harshit777 harshit777 force-pushed the RotationPolicyDisable branch 3 times, most recently from 8486a98 to 67fa9c0 Compare November 2, 2022 12:06
@harshit777
Copy link
Contributor Author

harshit777 commented Nov 2, 2022

List of successful scenarios

rotationInterval as 3
Screenshot 2022-11-02 at 9 37 58 PM Screenshot 2022-11-02 at 9 38 10 PM
rotationInterval as 5 and disabled
Screenshot 2022-11-02 at 9 18 06 PM Screenshot 2022-11-02 at 9 18 24 PM
rotationInterval as 3 and enabled
Screenshot 2022-11-02 at 9 24 25 PM Screenshot 2022-11-02 at 9 24 42 PM
disable rotation policy
Screenshot 2022-11-02 at 9 22 11 PM Screenshot 2022-11-02 at 9 21 57 PM
enable rotation policy
Screenshot 2022-11-02 at 9 26 31 PM Screenshot 2022-11-02 at 9 26 42 PM

List of Failures

enable with invalid interval_month
Screenshot 2022-11-02 at 9 28 42 PM Screenshot 2022-11-02 at 9 29 26 PM
disable with invalid interval_month
Screenshot 2022-11-02 at 9 30 38 PM Screenshot 2022-11-02 at 9 31 04 PM
enable with no rotation policy
Screenshot 2022-11-02 at 9 32 59 PM Screenshot 2022-11-02 at 9 33 06 PM
disable with no rotation policy
Screenshot 2022-11-02 at 9 33 58 PM Screenshot 2022-11-02 at 9 34 52 PM

Copy link

@dinesh-venkatraman-g dinesh-venkatraman-g left a comment

Choose a reason for hiding this comment

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

  • Can you also add a test case for updating enabled: false and interval_month: x
  • Also, can you run all test case once, since there are changes in ibm_kms_key resource and data source?

@harshit777 harshit777 force-pushed the RotationPolicyDisable branch from 67fa9c0 to d009863 Compare November 3, 2022 17:13
@harshit777 harshit777 force-pushed the RotationPolicyDisable branch from d009863 to 30bb83c Compare November 3, 2022 17:16
Copy link

@dinesh-venkatraman-g dinesh-venkatraman-g left a comment

Choose a reason for hiding this comment

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

lgtm!!! Thanks @harshit777 for thorough testing and evidences.

@hkantare hkantare merged commit d29ec89 into IBM-Cloud:master Nov 10, 2022
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.

4 participants