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

cloudflare_logpush_ownership_challenge should not be a required field #1055

Closed
2 tasks done
aidenvaines-bjss opened this issue May 10, 2021 · 1 comment
Closed
2 tasks done
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.

Comments

@aidenvaines-bjss
Copy link

Confirmation

  • My issue isn't already found on the issue tracker.
  • I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version

Noticed in provider 2.19.2 and 2.20.0
According to the Cloudflare documentation (https://developers.cloudflare.com/logs/logpush/datadog), when using Datadog as the target for a Log push job, there is not ownership challenge.

Unlike configuring Logpush jobs for AWS S3, GCS, or Azure, there is no ownership challenge when configuring Logpush to Datadog.

When trying to configure this a Datadog Log Push job in the terraform provider I get this output:

Error: Missing required argument

  on cloudflare_logpush_job.tf line 1, in resource "cloudflare_logpush_job" "datadog":
   1: resource "cloudflare_logpush_job" "datadog" {

The argument "ownership_challenge" is required, but no definition was found.

ERROR: Terraform plan failed

I assume the ownership_challenge parameter needs to be optional rather than mandatory. I can get through the plan phase by setting it to an empty string.

Affected resource(s)

cloudflare_logpush_job

Terraform configuration files

resource "cloudflare_logpush_job" "datadog" {
  enabled = true
  zone_id = cloudflare_zone.main.id
  name = "datadog-logpush-job"
  logpull_options = "fields=RayID,ClientIP,EdgeStartTimestamp&timestamps=rfc3339"
  destination_conf = "datadog://http-intake.logs.datadoghq.com/v1/input?header_DD-API_KEY=${data.aws_ssm_parameter.datadog_api_token.value}" #&service=<SERVICE>&host=<HOST>&ddsource=<SOURCE>"
  ownership_challenge = "" # Mandatory variable but not required for Datadog targets
  dataset = "http_requests"
}

Debug output

No response

Panic output

No response

Expected output

no failure state due to ownership_challenge being a mandatory parameter

Actual output

Error: Missing required argument

on cloudflare_logpush_job.tf line 1, in resource "cloudflare_logpush_job" "datadog":
1: resource "cloudflare_logpush_job" "datadog" {

The argument "ownership_challenge" is required, but no definition was found.

ERROR: Terraform plan failed

Steps to reproduce

Create cloudflare_logpush_job without a ownership_challenge resource when destination_conf is for a datadog target

Additional factoids

No response

References

No response

@aidenvaines-bjss aidenvaines-bjss added kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 10, 2021
@jacobbednarz jacobbednarz added triage/duplicate Indicates an issue is a duplicate of other open issue. and removed kind/bug Categorizes issue or PR as related to a bug. needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels May 10, 2021
@jacobbednarz
Copy link
Member

duplicate of #1010

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage/duplicate Indicates an issue is a duplicate of other open issue.
Projects
None yet
Development

No branches or pull requests

2 participants