imperva / terraform-provider-incapsula

This package is a plugin for Terraform, and is designed to be used to auto-provision sites in Incapsula via Incapsula’s API from the terraform cli/yaml configurations.
Mozilla Public License 2.0
44 stars 72 forks source link

Datacenter resource import is not working #24

Closed stokkie90 closed 4 years ago

stokkie90 commented 4 years ago

I'm trying to import existing datacenter config of a configured site into the state. but i'm getting the following error:

Error: Error parsing data centers list JSON response for siteID:  json: cannot unmarshal number into Go struct field DataCenterListResponse.res of type string
response: {"res":2,"res_message":"Invalid input","debug_info":{"id-info":"13008","extSiteId":"invalid site : null"}}

command used for import

terraform import incapsula_data_center.aws  site_id/dc_id

Any idea what this could be?

anandkunal commented 4 years ago

Hi @stokkie90 - I'm unaware of doing an import by using / between arguments. Have you tried doing an import while specifying the site_id in a configuration file or via a specific variable? I'm going off the latest docs: https://www.terraform.io/docs/commands/import.html

anandkunal commented 4 years ago

Hi @stokkie90 - I wanted to give you an update. I've found and fixed the issue over the holidays. The fix has now landed in master. I'm going to close this out. The format that you specified above of site_id/dc_id is correct. Please re-open if you are still having an issue. Thanks.