The api instance id is malformed when using the data anypoint_apim_instance which means you cannot programatically manage policies for API Instances that already exist.
Symptoms
When you attempt to manage an already existing API Manager Instance the id value is malformed.
Problem
The api instance id is malformed when using the data anypoint_apim_instance which means you cannot programatically manage policies for API Instances that already exist.
Symptoms
When you attempt to manage an already existing API Manager Instance the id value is malformed.
The output of the state file shows that the id is not correctly set:
Investigation
The OAS specification and the API endpoint defines and returns an integer: https://github.com/salesforce/anypoint-automation-client-generator/blob/master/spec/apim.yml#L523 but the id is set as string here: https://github.com/salesforce/terraform-provider-anypoint/blob/dev/anypoint/data_source_apim_instance.go#L448
Should the api id always be an integer in the client to successfully set this value in the terraform state file?