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 waiting room event #1509

Merged
merged 41 commits into from
Mar 16, 2022
Merged

Conversation

broswen
Copy link
Contributor

@broswen broswen commented Mar 12, 2022

Add support for managing Waiting Room Events in Terraform.

cloudflare_waiting_room_event depends on a cloudflare_waiting_room to be created. Added into the Terraform template to create the acceptance test resources.

This is my first Terraform contribution so please let me know if there are things that should be done differently.

@github-actions
Copy link
Contributor

This project handles dependency version bumps (including upstream changes from cloudflare-go) independently of the standard PR process using automation. This allows the dependency upgrades to land without causing merge conflicts in multiple branches and handled in a consistent way. The exception to this is security related dependency upgrades but they should be co-ordinated with the maintainer team privately.

Please remove the changes to the go.mod or go.sum files from this PR in order to proceed with review and merging.

@github-actions
Copy link
Contributor

Oops! It looks like no changelog entry is attached to this PR. Please include a release note as described in https://github.com/cloudflare/terraform-provider-cloudflare/blob/master/docs/changelog-process.md.

Example:

```release-note:TYPE
Release note
```

If you do not require a release note to be included, please add the workflow/skip-changelog-entry label.

cloudflare/resource_cloudflare_waiting_room_event.go Outdated Show resolved Hide resolved
Comment on lines 34 to 39
switch b := d.Get("disable_session_renewal").(type) {
case bool:
disableSessionRenewal = &b
case nil:
disableSessionRenewal = nil
}
Copy link
Member

Choose a reason for hiding this comment

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

i think we can swap this for a d.GetOkExists and the value can use cloudflare.BoolPtr to take the boolean and return a *bool.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It looks like d.GetOkExists is deprecated and might be removed. Would just using d.GetOk be sufficient?

cloudflare/resource_cloudflare_waiting_room_event.go Outdated Show resolved Hide resolved
website/docs/r/waiting_room_event.html.markdown Outdated Show resolved Hide resolved
website/docs/r/waiting_room_event.html.markdown Outdated Show resolved Hide resolved
website/docs/r/waiting_room_event.html.markdown Outdated Show resolved Hide resolved
broswen and others added 6 commits March 15, 2022 21:22
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
Co-authored-by: Jacob Bednarz <jacob.bednarz@hey.com>
@jacobbednarz
Copy link
Member

acceptance tests are passing locally

TF_ACC=1 go test $(go list ./...) -v -run "^TestAccCloudflareWaitingRoomEvent_Create" -count 1 -parallel 1 -timeout 120m -parallel 1
?   	github.com/cloudflare/terraform-provider-cloudflare	[no test files]
=== RUN   TestAccCloudflareWaitingRoomEvent_Create
=== PAUSE TestAccCloudflareWaitingRoomEvent_Create
=== CONT  TestAccCloudflareWaitingRoomEvent_Create
--- PASS: TestAccCloudflareWaitingRoomEvent_Create (12.98s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/cloudflare	13.359s
?   	github.com/cloudflare/terraform-provider-cloudflare/tools/cmd/changelog-check	[no test files]
?   	github.com/cloudflare/terraform-provider-cloudflare/tools/cmd/maintainer-only-file-check	[no test files]
?   	github.com/cloudflare/terraform-provider-cloudflare/tools/cmd/tf-log-check	[no test files]
?   	github.com/cloudflare/terraform-provider-cloudflare/version	[no test files]

thank you for the solid effort here @broswen

@jacobbednarz jacobbednarz merged commit 5796a77 into cloudflare:master Mar 16, 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.

2 participants