terraform-provider-oci icon indicating copy to clipboard operation
terraform-provider-oci copied to clipboard

ATP resource spins for 10 minutes before reporting "feature that's not currently enabled for this tenancy"

Open michael-cico opened this issue 5 years ago • 2 comments

I was trying to allocate an ATP instance in a new region, before ATP is actually available (yeah I know, don't do that).

However, the ATP resource happily spun for 10 minutes before timing out:

oci_database_autonomous_database.cnrc_database: Still creating... [9m0s elapsed] oci_database_autonomous_database.cnrc_database: Still creating... [9m10s elapsed] oci_database_autonomous_database.cnrc_database: Still creating... [9m20s elapsed] oci_database_autonomous_database.cnrc_database: Still creating... [9m30s elapsed] oci_database_autonomous_database.cnrc_database: Still creating... [9m40s elapsed] oci_database_autonomous_database.cnrc_database: Still creating... [9m50s elapsed] oci_database_autonomous_database.cnrc_database: Still creating... [10m0s elapsed] oci_database_autonomous_database.cnrc_database: Still creating... [10m10s elapsed]

Error: Service error:IncorrectState. You are attempting to use a feature that's not currently enabled for this tenancy.. http status code: 409. Opc request id: bab5fc484f062426b811cd56fae70b3d/CF7DC76C7AAC299711BCDF9C27DBC75F/79C0BBB2039577D4BF5FE0CDBE843A52

on atp.tf line 11, in resource "oci_database_autonomous_database" "cnrc_database": 11: resource "oci_database_autonomous_database" "cnrc_database" {

Is it possible to have the provider or resource short-circuit in this situation? OCI Console reports an error immediately.

michael-cico avatar Feb 05 '20 18:02 michael-cico

Hi @michael-cico Thank you for reporting this. 409 is also returned in other scenarios e.g. when there is already an operation running on a resource and we need to wait in that case and retry the operation. The ideal solution for this would be for service to return specific response codes based on different scenarios and then we can modify our retry logic accordingly to only retry when required.

parrneet avatar Feb 26 '20 21:02 parrneet

faced same error when we added max_cpu_core_count parameter to code..it took lot of time to figure out the issue.. after removing this everything worked fine..

nkm269 avatar Jun 30 '22 19:06 nkm269