From 9aaedf6f4ba10a499c4303c62f3c09ee7b916e4d Mon Sep 17 00:00:00 2001 From: Greg Dubicki Date: Mon, 22 Apr 2024 14:04:41 +0100 Subject: [PATCH] Depend explicitly on the challenge to prevent some errors like ``` "registry.terraform.io/cloudflare/cloudflare" produced an invalid new value for .ownership_challenge: was null, but now cty.StringVal("[redacted]..[redacted]") ``` As recommended by @jacobbednarz in https://github.com/cloudflare/terraform-provider-cloudflare/issues/2752#issuecomment-1712190497 Workaround for issue like https://github.com/cloudflare/terraform-provider-cloudflare/issues/2794 https://github.com/cloudflare/terraform-provider-cloudflare/issues/2752 https://github.com/cloudflare/terraform-provider-cloudflare/issues/3001 --- examples/resources/cloudflare_logpush_job/resource.tf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/resources/cloudflare_logpush_job/resource.tf b/examples/resources/cloudflare_logpush_job/resource.tf index cb95e33f60c..60f8b8c03b0 100644 --- a/examples/resources/cloudflare_logpush_job/resource.tf +++ b/examples/resources/cloudflare_logpush_job/resource.tf @@ -45,6 +45,9 @@ data "aws_s3_bucket_object" "challenge_file" { } resource "cloudflare_logpush_job" "example_job" { + depends_on = [ + cloudflare_logpush_ownership_challenge.ownership_challenge, data.aws_s3_bucket_object.challenge_file + ] enabled = true zone_id = "0da42c8d2132a9ddaf714f9e7c920711" name = "My-logpush-job"