Closed RomeoAva closed 2 months ago
Confirmed issue!
According to Google Cloud documentation in the bq section
describes the next format for the assets
param:
params='{"assets":["Account"]
But after running a terraform apply
it returns the next error:
Inappropriate value for attribute "params": element "assets": string required.
Wrapping just the assets list in jsonencode
can get through the type validation. Can you try and see?
"assets" = jsonencode(["Project_ABC"])
Wrapping just the assets list in
jsonencode
can get through the type validation. Can you try and see?"assets" = jsonencode(["Project_ABC"])
Hi, like mentioned in the last point of my « Actual Behavior » section, I tried that and it doesn’t work.
Thanks for the clarification. I see what you meant now - the transfer config could be created through Terraform but the actual transfer would fail for that error you mentioned. We'll continue to look into it.
PR has been merged and should be released to the Google provider as part of v5.40.0. A working config would be:
resource "google_bigquery_data_transfer_config" "salesforce_config" {
display_name = "import_salesforce"
location = "US"
data_source_id = "salesforce"
destination_dataset_id = "analysis"
params = {
"connector.authentication.oauth.clientId" = ""
"connector.authentication.oauth.clientSecret" = ""
"connector.authentication.username" = ""
"connector.authentication.password" = ""
"connector.authentication.securityToken" = ""
"assets" = "[\"Project_ABC\",\"Project_XYZ\"]"
}
}
PR has been merged and should be released to the Google provider as part of v5.40.0. A working config would be:
resource "google_bigquery_data_transfer_config" "salesforce_config" { display_name = "import_salesforce" location = "US" data_source_id = "salesforce" destination_dataset_id = "analysis" params = { "connector.authentication.oauth.clientId" = "" "connector.authentication.oauth.clientSecret" = "" "connector.authentication.username" = "" "connector.authentication.password" = "" "connector.authentication.securityToken" = "" "assets" = "[Project_ABC, Project_XYZ]" } }
Thanks for the work and help !
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.
Community Note
Terraform Version & Provider Version(s)
Terraform v1.5.7 on MacOS
Affected Resource(s)
google_bigquery_data_transfer_config
Terraform Configuration
Debug Output
No response
Expected Behavior
Hello, I am trying to create a Salesforce Transfer for BQ using Terraform. Here is my current config to create that ressource:
Actual Behavior
When specifying a list in the
assets
parameter, terraform tells me:When I try to convert it to a String, the transfer is created but on BigQuery I get the following error:
I also tried to json_encode the list, but same result on BQ side:
Steps to reproduce
terraform apply
Important Factoids
No response
References
No response
b/348691952