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

Implement schedule_deletion_days field for KMS vaults and keys #1987

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Omicron7
Copy link

@Omicron7 Omicron7 commented Nov 2, 2023

This adds a field called schedule_deletion_days to the following resources:

  • oci_kms_vault
  • oci_kms_key
  • oci_kms_key_version
  • oci_vault_secret

This allows Terrafrom to automatically set the value of TimeOfDeletion on a ScheduleDeletion API call when a resource is destroyed. If a resource already has time_of_deletion set, it will take precedence over the schedule_deletion_days field.

Implements #1986

Signed-off-by: Brian Zoetewey <brian.zoetewey@cru.org>
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 2, 2023
@tf-oci-pub tf-oci-pub added the Pending Test Pending Test label for PRs label Nov 3, 2023
@tf-oci-pub
Copy link
Member

Thank you for your valuable contribution. We greatly appreciate your efforts in submitting this pull request. However, I regret to inform you that we are unable to merge it directly on GitHub at this time.

Our internal policy requires that all pull requests undergo thorough local testing and review before they can be merged into the main codebase. This process ensures the quality and stability of Terraform-Provider-OCI.

We understand that this may cause some inconvenience, but please rest assured that your contribution is highly valued. Our team will carefully review and test your changes locally to ensure they meet our standards.

We appreciate your understanding and patience in this matter. If you have any questions or need further assistance, please don't hesitate to reach out. Thank you once again for your contribution.

@Omicron7
Copy link
Author

Omicron7 commented Nov 3, 2023

I am unable to run acceptance tests for this project. It appears that tests must be run with an older version of Terraform (0.12.x ?) which doesn't exist for my architecture (darwin-arm64).

[unsupported state format version: expected ["0.1" "0.2"], got "1.0"]

@Omicron7 Omicron7 marked this pull request as draft November 3, 2023 18:36
@Omicron7
Copy link
Author

Omicron7 commented Nov 6, 2023

I was able to run test locally after bumping the terraform-exec module, but have not been able to get them to pass successfully, even without any changes I've made. The KMS Vault tests seem to be in a failing state currently in master.

TF_ACC_TERRAFORM_PATH=$(asdf which terraform) make testacc TESTARGS='-run=TestKmsVaultResource_basic'

...
=== RUN   TestKmsVaultResource_basic
2023/11/06 13:28:04 bypassing.go:20: Not recording. TestKmsVaultResource_basic
test_helpers.go:562: Error running post-test destroy, there may be dangling resources: exit status 1

        Error: 400-InvalidParameter, timeOfDeletion must be between 7 to 30 days beyond the time of request.
        Suggestion: Please update the parameter(s) in the Terraform config as per error message timeOfDeletion must be between 7 to 30 days beyond the time of request.
        Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/kms_vault 
        API Reference: https://docs.oracle.com/iaas/api/#/en/key/release/Vault/ScheduleVaultDeletion 
        Request Target: POST https://kms.us-ashburn-1.oraclecloud.com/20180608/vaults/ocid1.vault.oc1.iad.ejsusmbxaabdg.abuwcljsksg26nr4dky2zsjimik2voiy4nbhnsdl6kuotadwellmedmiyypq/actions/scheduleDeletion 
        Provider version: 5.19.0, released on 2023-11-06.  
        Service: Kms Vault 
        Operation Name: ScheduleVaultDeletion 
        OPC request ID: 5ea3b9e59e6ddadf007939bf47990c7b/ED1035295133D7F50D3F9063FDCF68DE/ED07503E59FD8302ADDD14A5F2DAF6D4 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement. Pending Test Pending Test label for PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants