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

Fix multiple emails in notification policy #2248

Merged
merged 3 commits into from
Mar 5, 2023

Conversation

Qantas94Heavy
Copy link
Contributor

Setting data["id"] only saves the last value as it keeps writing to the same map. Instead a new map should be created for each value.

Fixes: #1917

@github-actions
Copy link
Contributor

github-actions bot commented Feb 21, 2023

changelog detected ✅

@jacobbednarz
Copy link
Member

thanks for this @Qantas94Heavy. can you please add an acceptance test that will demonstrate this fixes the issue?

Setting data["id"] only saves the last value as it keeps writing to the same map.
Instead a new map should be created for each value.

Fixes: cloudflare#1917
@Qantas94Heavy Qantas94Heavy force-pushed the patch-1 branch 2 times, most recently from a38388a to 4245bef Compare March 1, 2023 02:08
@jacobbednarz
Copy link
Member

acceptance tests all looking good

TF_ACC=1 go test ./internal/sdkv2provider -v -run "^TestAccCloudflareNotificationPolicy_" -timeout 120m -parallel 1
=== RUN   TestAccCloudflareNotificationPolicy_Basic
--- PASS: TestAccCloudflareNotificationPolicy_Basic (26.83s)
=== RUN   TestAccCloudflareNotificationPolicy_WithFiltersAttribute
--- PASS: TestAccCloudflareNotificationPolicy_WithFiltersAttribute (24.59s)
PASS
ok  	github.com/cloudflare/terraform-provider-cloudflare/internal/sdkv2provider	52.330s

thanks @Qantas94Heavy 💯

@jacobbednarz jacobbednarz merged commit a659080 into cloudflare:master Mar 5, 2023
@github-actions github-actions bot added this to the v4.1.0 milestone Mar 5, 2023
github-actions bot pushed a commit that referenced this pull request Mar 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2023

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

@Qantas94Heavy Qantas94Heavy deleted the patch-1 branch July 5, 2023 03:36
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.

notification policy import: only last email gets saved in tfstate
2 participants