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

google_data_loss_prevention_job_trigger -> big_query_options is missing rows_limit for sampling #12938

Closed
eblaauw opened this issue Nov 3, 2022 · 6 comments

Comments

@eblaauw
Copy link

eblaauw commented Nov 3, 2022

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

1.3.4

Affected Resource(s)

  • google_data_loss_prevention_job_trigger

Terraform Configuration Files

resource "google_data_loss_prevention_job_trigger" "basic" {
  
  parent       = "projects/${var.project}"
  description  = "DLP job trigger  generated by terraform on ${formatdate("YYYYMMDDhhmmss", timestamp())}"
  display_name = "Displayname"


  triggers {
    schedule {
      recurrence_period_duration = "86400s"
    }
  }

  inspect_job {
    inspect_template_name = "projects/XXX/locations/global/inspectTemplates/XXX"
    storage_config {
      big_query_options {
        rows_limit = 100
        table_reference {
          project_id = var.project
          dataset_id = "XXX"
          table_id   = "XXX"
        }
      }
    }
    actions {
      save_findings {
        output_config {
          table {
            project_id = var.project
            dataset_id = "XXX"
            table_id   = "XXX"
          }
        }
      }
    }
  }
}

Debug Output

An argument named "rows_limit" is not expected here.

Expected Behavior

It should have rows_limit and other sampling values as per documentation: https://cloud.google.com/dlp/docs/reference/rest/v2/InspectJobConfig#bigqueryoptions

Actual Behavior

It is missing sampling methods

Steps to Reproduce

  1. terraform apply

References

  • #0000
@eblaauw eblaauw added the bug label Nov 3, 2022
@edzotalabat
Copy link

It's missing here, I can see:

"big_query_options": {
Type: schema.TypeList,
Optional: true,
Description: `Options defining BigQuery table and row identifiers.`,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"table_reference": {
Type: schema.TypeList,
Required: true,
Description: `Set of files to scan.`,
MaxItems: 1,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"dataset_id": {
Type: schema.TypeString,
Required: true,
Description: `The dataset ID of the table.`,
},
"project_id": {
Type: schema.TypeString,
Required: true,
Description: `The Google Cloud Platform project ID of the project containing the table.`,
},
"table_id": {
Type: schema.TypeString,
Required: true,
Description: `The name of the table.`,
},
},
},
},
},
},
},

@edwardmedia
Copy link
Contributor

edwardmedia commented Nov 3, 2022

This is not a bug. The field has not been implemented. Changing label to enhancement

@Wallace99
Copy link

Wallace99 commented Nov 3, 2022

There is an open PR to add these GoogleCloudPlatform/magic-modules#6749

@eblaauw
Copy link
Author

eblaauw commented Nov 3, 2022

That’s fantastic — thank you @Wallace99. I’ll add myself as a watcher and close this issue once it’s merged. Happy to assist where needed.

@eblaauw
Copy link
Author

eblaauw commented Nov 16, 2022

Fixed in this PR: #12980

@eblaauw eblaauw closed this as completed Nov 16, 2022
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants