Closed eonpatapon closed 2 years ago
@eonpatapon it seems that the API response was changed, can you provide the debug log with API request and response?
the response of Querying a Tracker has two formats:
CTS may support multiple trackers in the future. If the query request GET /v1.0/{project_id}/tracker does not contain parameter tracker_name, the response is in array format. Otherwise, the response is in object format.
@ShiChangkuo here's what I can find:
flexibleengine_s3_bucket_policy.bucket_policies: Refreshing state... [id=xxxxx]
flexibleengine_cts_tracker_v1.tracker: Refreshing state... [id=system]
2022-04-14T09:12:30.251+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [DEBUG] initialize Swift S3 session: timestamp=2022-04-14T09:12:30.251+0200
2022-04-14T09:12:30.251+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [INFO] Building Swift S3 auth structure: timestamp=2022-04-14T09:12:30.251+0200
2022-04-14T09:12:30.251+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [INFO] Setting AWS metadata API timeout to 100ms: timestamp=2022-04-14T09:12:30.251+0200
2022-04-14T09:12:30.251+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [DEBUG] API Request URL: GET https://cts.eu-west-0.prod-cloud-ocb.orange-business.com/v1.0/9f2e36b98a1149aab266626ffbbfXXXX/tracker: timestamp=2022-04-14T09:12:30.251+0200
2022-04-14T09:12:30.251+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [DEBUG] API Request Headers:
Accept: application/json
User-Agent: terraform-provider-flexibleengine golangsdk/2.0.0
X-Auth-Token: ***: timestamp=2022-04-14T09:12:30.251+0200
2022-04-14T09:12:30.726+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [DEBUG] API Response Code: 200: timestamp=2022-04-14T09:12:30.726+0200
2022-04-14T09:12:30.726+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [DEBUG] API Response Headers:
Connection: keep-alive
Content-Length: 115
Content-Type: application/json
Date: Thu, 14 Apr 2022 07:12:30 GMT
Set-Cookie: Path=/;Secure;HttpOnly
Strict-Transport-Security: max-age=16070400; includeSubDomains
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Request-Id: 8628abb8bcb92ddaaf4e729c28197806
X-Xss-Protection: 1; mode=block;: timestamp=2022-04-14T09:12:30.726+0200
2022-04-14T09:12:30.726+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [DEBUG] Unable to parse JSON: json: cannot unmarshal array into Go value of type map[string]interface {}: timestamp=2022-04-14T09:12:30.726+0200
2022-04-14T09:12:30.726+0200 [INFO] provider.terraform-provider-flexibleengine_1.28.0: 2022/04/14 09:12:30 [DEBUG] API Response Body: [{"bucket_name":"xxxxx","tracker_name":"system","detail":"noBucket","file_prefix_name":"","status":"error"}]: timestamp=2022-04-14T09:12:30.726+0200
2022-04-14T09:12:30.727+0200 [ERROR] vertex "flexibleengine_cts_tracker_v1.tracker" error: can not find CTS tracker system
2022-04-14T09:12:30.727+0200 [ERROR] vertex "flexibleengine_cts_tracker_v1.tracker" error: can not find CTS tracker system
2022-04-14T09:12:30.727+0200 [ERROR] vertex "flexibleengine_cts_tracker_v1.tracker (expand)" error: can not find CTS tracker system
I believe the call is: [DEBUG] API Request URL: GET https://cts.eu-west-0.prod-cloud-ocb.orange-business.com/v1.0/9f2e36b98a1149aab266626ffbbfXXXX/tracker:
Where 9f2e36b98a1149aab266626ffbbfXXXX
is my tenant ID.
@eonpatapon the root reason is the system tracker in error status, I will fixed it asap.
Terraform Version
Affected Resource(s)
Terraform Configuration Files
The tracker and bucket was created some time ago. Then plans started to fail with:
I saw that this was fixed in 1.28.0 via c4e39c8d6ea1183a6eb85fd1174f582055ee65bb, but now with 1.28.0 I get this:
Debug Output
Looks like the API response is not what is expected:
Related #727