Closed wade-schee closed 3 years ago
Hi @wade-schee, were you able to get a solution for this? You may need to contact support for this one.
@wade-schee if you did not figure this out, I have tested successfully with the below example #localcsv locals { csv_data = <<-CSV local_id,domain,site_ip 1,tf1.dev.impervademo.com,"209.22.1.2" 2,tf2.dev.impervademo.com,"209.22.2.2" 3,tf3.dev.impervademo.com,"209.22.3.2" 4,tf4.dev.impervademo.com,"209.22.4.2" CSV
site = csvdecode(local.csv_data) } resource "incapsula_site" "example-sites" { for_each = { for site in local.site : site.local_id => site} domain = each.value.domain account_id = "0000" site_ip = each.value.site_ip }
I used _foreach to batch deploy sites after passing _incapsulasite a map of csvdecode processed csv file.
And got error message like:
{"res":2,"res_message":"Invalid input","debug_info":{"id-info":"13023","Invalid site
cname":"foo.bar.com"}}
If the site_ip column at the csv file contained either valid or invalid cname.
However, this error won't occur by neither assigning only ip addresses to the csv file at site_ip column, nor directly assigning canme address to resource section.(like site_ip="foo.bar.com" )