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

add os_distro_name and os_distro_revision #1842

Merged
merged 8 commits into from
Sep 28, 2022

Conversation

imdawon
Copy link
Contributor

@imdawon imdawon commented Aug 17, 2022

update os_version device posture terraform docs for new linux fields

@imdawon imdawon requested a review from jacobbednarz as a code owner August 17, 2022 21:59
@github-actions
Copy link
Contributor

github-actions bot commented Aug 17, 2022

changelog detected ✅

@imdawon imdawon changed the title WDAPI-1066 add os_distro_name and os_distro_revision add os_distro_name and os_distro_revision Aug 17, 2022
Copy link
Member

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

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

you'll need to check out https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/registry-documentation.md on how to have this documentation updated as docs is the automatically generated version of these files.

@imdawon
Copy link
Contributor Author

imdawon commented Aug 19, 2022

you'll need to check out https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/contributing/registry-documentation.md on how to have this documentation updated as docs is the automatically generated version of these files.

I see, my bad. Thanks!

@imdawon imdawon force-pushed the patch-1 branch 2 times, most recently from b74219f to bbc554c Compare August 25, 2022 19:56
Comment on lines 26 to 29
version = 1.0.0
operator = <
os_distro_name = ubuntu
os_distro_revision = 1.0.0
Copy link
Member

Choose a reason for hiding this comment

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

these fields aren't present in the schema or public API docs; so we won't be able to add them at this time.

Copy link
Member

@jacobbednarz jacobbednarz left a comment

Choose a reason for hiding this comment

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

you're referencing non-existing API fields and schema values so this is unable to be merged. i'd suggest first getting the fields documentated then added to cloudflare-go before attempting to add them here.

@jacobbednarz
Copy link
Member

these fields are now present in the Go library so you can add them to the schema, CRUD operations and the docs.

@gitguardian
Copy link

gitguardian bot commented Sep 1, 2022

️✅ There are no secrets present in this pull request anymore.

If these secrets were true positive and are still valid, we highly recommend you to revoke them.
Once a secret has been leaked into a git repository, you should consider it compromised, even if it was deleted immediately.
Find here more information about risks.


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@jacobbednarz
Copy link
Member

i've pushed a few fixes here but the test suite is still failing with a service error. do you mind looking into this and getting the tests in the right shape?

TF_ACC=1 go test $(go list ./...) -v -run "^TestAccCloudflareDevicePostureRule_" -count 1 -parallel 1 -timeout 120m -parallel 1
?       github.com/cloudflare/terraform-provider-cloudflare     [no test files]
=== RUN   TestAccCloudflareDevicePostureRule_SerialNumber
--- PASS: TestAccCloudflareDevicePostureRule_SerialNumber (20.79s)
=== RUN   TestAccCloudflareDevicePostureRule_OsVersion
--- PASS: TestAccCloudflareDevicePostureRule_OsVersion (17.22s)
=== RUN   TestAccCloudflareDevicePostureRule_OsDistroName
    resource_cloudflare_device_posture_rule_test.go:103: Step 1/1 error: Error running apply: exit status 1

        Error: error creating Device Posture Rule for account "f037e56e89293a057740de681ac9abbe": access.api.error.invalid_device_posture_integration_type (12094)

          with cloudflare_device_posture_rule.phnddkhwtf,
          on terraform_plugin_test.tf line 2, in resource "cloudflare_device_posture_rule" "phnddkhwtf":
           2: resource "cloudflare_device_posture_rule" "phnddkhwtf" {

--- FAIL: TestAccCloudflareDevicePostureRule_OsDistroName (3.37s)
=== RUN   TestAccCloudflareDevicePostureRule_OsDistroRevision
    resource_cloudflare_device_posture_rule_test.go:140: Step 1/1 error: Error running apply: exit status 1

        Error: error creating Device Posture Rule for account "f037e56e89293a057740de681ac9abbe": access.api.error.invalid_device_posture_integration_type (12094)

          with cloudflare_device_posture_rule.xihdkeyskf,
          on terraform_plugin_test.tf line 2, in resource "cloudflare_device_posture_rule" "xihdkeyskf":
           2: resource "cloudflare_device_posture_rule" "xihdkeyskf" {

--- FAIL: TestAccCloudflareDevicePostureRule_OsDistroRevision (3.36s)
=== RUN   TestAccCloudflareDevicePostureRule_DomainJoined
--- PASS: TestAccCloudflareDevicePostureRule_DomainJoined (24.96s)
=== RUN   TestAccCloudflareDevicePostureRule_Firewall
--- PASS: TestAccCloudflareDevicePostureRule_Firewall (15.92s)
=== RUN   TestAccCloudflareDevicePostureRule_DiskEncryption
--- PASS: TestAccCloudflareDevicePostureRule_DiskEncryption (23.11s)
FAIL
FAIL    github.com/cloudflare/terraform-provider-cloudflare/internal/provider   109.388s
?       github.com/cloudflare/terraform-provider-cloudflare/version     [no test files]
FAIL
make: *** [testacc] Error 1

@jacobbednarz
Copy link
Member

depends on cloudflare/cloudflare-go#1087

@jacobbednarz
Copy link
Member

with the upstream PR shimmed in, tests are passing

TF_ACC=1 go test $(go list ./...) -v -run "^TestAccCloudflareDevicePostureRule_" -count 1 -parallel 1 -timeout 120m -parallel 1
?       github.com/cloudflare/terraform-provider-cloudflare     [no test files]
=== RUN   TestAccCloudflareDevicePostureRule_SerialNumber
--- PASS: TestAccCloudflareDevicePostureRule_SerialNumber (16.55s)
=== RUN   TestAccCloudflareDevicePostureRule_OsVersion
--- PASS: TestAccCloudflareDevicePostureRule_OsVersion (15.39s)
=== RUN   TestAccCloudflareDevicePostureRule_LinuxOsDistro
--- PASS: TestAccCloudflareDevicePostureRule_LinuxOsDistro (12.75s)
=== RUN   TestAccCloudflareDevicePostureRule_DomainJoined
--- PASS: TestAccCloudflareDevicePostureRule_DomainJoined (15.87s)
=== RUN   TestAccCloudflareDevicePostureRule_Firewall
--- PASS: TestAccCloudflareDevicePostureRule_Firewall (17.78s)
=== RUN   TestAccCloudflareDevicePostureRule_DiskEncryption
--- PASS: TestAccCloudflareDevicePostureRule_DiskEncryption (17.27s)
PASS
ok      github.com/cloudflare/terraform-provider-cloudflare/internal/provider   96.001s
?       github.com/cloudflare/terraform-provider-cloudflare/version     [no test files]

@jacobbednarz jacobbednarz merged commit fd36040 into cloudflare:master Sep 28, 2022
@github-actions github-actions bot added this to the v3.25.0 milestone Sep 28, 2022
github-actions bot pushed a commit that referenced this pull request Sep 28, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 4, 2022

This functionality has been released in v3.25.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!

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.

3 participants