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

Support check_disks in the device_posture_rule input block schema #2280

Conversation

aborrello
Copy link

@aborrello aborrello commented Mar 9, 2023

Note: This PR is pending the cloudflare/cloudflare-go#1197 enhancement to be released in v0.63.0 of the cloudflare-go library.

Implements the check_disks configuration value in the input nested schema for the device_posture_rule resource. This value accepts a list of strings, each of which is a discrete volume to check for encryption.

This PR additionally splits the TestAccCloudflareDevicePostureRule_DiskEncryption test into _RequireAll and _CheckDisks.

@jacobbednarz an additional PR may be required to remove Computed from the schema for require_all as this value is now user-configurable.

Related Issues
Closes #1644

@github-actions
Copy link

github-actions bot commented Mar 9, 2023

changelog detected ✅

@jacobbednarz jacobbednarz added the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label Mar 10, 2023
@jacobbednarz jacobbednarz removed the workflow/pending-upstream-library Indicates an issue or PR requires changes from an upstream library. label Mar 15, 2023
Ordering isn't important with this value so TypeSet is better suited to avoid permadiffs.
@jacobbednarz jacobbednarz marked this pull request as ready for review March 15, 2023 01:29
@jacobbednarz jacobbednarz self-requested a review as a code owner March 15, 2023 01:29
@jacobbednarz
Copy link
Member

acceptance tests are passing

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareDevicePostureRule_" -timeout 120m -parallel 1
=== RUN   TestAccCloudflareDevicePostureRule_SerialNumber
--- PASS: TestAccCloudflareDevicePostureRule_SerialNumber (37.99s)
=== RUN   TestAccCloudflareDevicePostureRule_OsVersion
--- PASS: TestAccCloudflareDevicePostureRule_OsVersion (24.75s)
=== RUN   TestAccCloudflareDevicePostureRule_LinuxOsDistro
--- PASS: TestAccCloudflareDevicePostureRule_LinuxOsDistro (20.36s)
=== RUN   TestAccCloudflareDevicePostureRule_DomainJoined
--- PASS: TestAccCloudflareDevicePostureRule_DomainJoined (22.43s)
=== RUN   TestAccCloudflareDevicePostureRule_Firewall
--- PASS: TestAccCloudflareDevicePostureRule_Firewall (18.23s)
=== RUN   TestAccCloudflareDevicePostureRule_DiskEncryption_RequireAll
--- PASS: TestAccCloudflareDevicePostureRule_DiskEncryption_RequireAll (27.92s)
=== RUN   TestAccCloudflareDevicePostureRule_DiskEncryption_CheckDisks
--- PASS: TestAccCloudflareDevicePostureRule_DiskEncryption_CheckDisks (18.08s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	170.796s

@aborrello this looks ready to merge. do you have any other changes before i merge it in?

@aborrello
Copy link
Author

Nope, everything looks good on my end. Happy for you to merge when ready 🚀

@jacobbednarz jacobbednarz merged commit 754f8dd into cloudflare:master Mar 15, 2023
@jacobbednarz
Copy link
Member

thanks for this, you rock 🤘

@github-actions github-actions bot added this to the v4.2.0 milestone Mar 15, 2023
github-actions bot pushed a commit that referenced this pull request Mar 15, 2023
@aborrello aborrello deleted the posture-rule-add-disk-encryption-check-disks branch March 16, 2023 04:01
@github-actions
Copy link

This functionality has been released in v4.2.0 of the Terraform Cloudflare Provider.

Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: custom configuration for disk_encryption in cloudflare_device_posture_rule resource
2 participants