segmentio / terraform-provider-segment

Terraform provider for Segment, using the Public API
https://registry.terraform.io/providers/segmentio/segment/latest
MIT License
25 stars 3 forks source link

Google Adwords destination requires `floodlightAccountId` though it should be optional #108

Closed alex-haproff closed 2 months ago

alex-haproff commented 2 months ago

Description When creating Google Adwords destination 5a03bfe73156760001ab34ec terraform apply throws this error:

422 Unprocessable Entity
 {
   "errors": [
     {
       "type": "input-validation",
       "field": "floodlightAccountId",
       "message": "Please enter a valid config ID. Example: DC-1234567",
       "data": {
         "description": "Enter your DoubleClick Floodlight Advertiser ID to have it passed to Gtag's `config` parameter. This ensures tags are loaded by first-party cookies. This value should look like DC-1234567. For more information, see [Google's documentation](https://support.google.com/campaignmanager/answer/7554821?hl=en).",
         "type": "string"
       }
     }
   ]
 }

floodlightAccountId should be optional!

To Reproduce

resource "segment_destination" "google_adwords" {
    enabled = var.enable
    name = var.name
    source_id = var.segment_source_id
    settings = jsonencode({
        "accountId": var.account_id,
        "clickConversions": var.click_conversions,
        "conversionLinker": true,
        "defaultPageConversion": "",
        "disableAdPersonalization": false,
        "pageLoadConversions": [],
        "sendPageView": true,
        "floodlightAccountId": ""
    })
    metadata = {
        id = "5a03bfe73156760001ab34ec" # Google Adwords
    }
}
deanhuynh commented 2 months ago

Hi @alex-haproff the issue with that field should be fixed now. Let me know if you run into any other issues and thanks for your patience!