terraform-provider-ibm: Creating RabbitMQ instance crash when instance is in provisioning state
Hi there,
Terraform Version
Terraform v0.12.23
- provider.ibm v1.2.4
Affected Resource(s)
- ibm_database
Terraform Configuration Files
resource "ibm_database" "database" {
name = "mq-test"
plan = "standard"
location = var.region
resource_group_id = var.rg_id"
service = "messages-for-rabbitmq"
version = "3.7"
service_endpoints = "public-and-private"
members_memory_allocation_mb = 3072
members_disk_allocation_mb = 3072
}
Debug Output
ibm_database.database: Creating...
2020/03/17 15:31:43 [TRACE] <root>: eval: *terraform.EvalApply
2020/03/17 15:31:43 [DEBUG] ibm_database.database: applying the planned Create change
2020/03/17 15:31:43 [TRACE] GRPCProvider: ApplyResourceChange
2020-03-17T15:31:43.589+0100 [DEBUG] plugin.terraform-provider-ibm_v1.2.4: 2020/03/17 15:31:43 [DEBUG] setting computed for "groups" from ComputedKeys
2020-03-17T15:31:43.589+0100 [DEBUG] plugin.terraform-provider-ibm_v1.2.4: 2020/03/17 15:31:43 [DEBUG] setting computed for "connectionstrings" from ComputedKeys
2020/03/17 15:31:45 [TRACE] dag/walk: vertex "provider.ibm (close)" is waiting for "ibm_database.database"
2020/03/17 15:31:45 [TRACE] dag/walk: vertex "meta.count-boundary (EachMode fixup)" is waiting for "ibm_database.database"
2020/03/17 15:31:45 [TRACE] dag/walk: vertex "root" is waiting for "meta.count-boundary (EachMode fixup)"
2020-03-17T15:31:48.506+0100 [DEBUG] plugin.terraform-provider-ibm_v1.2.4: 2020/03/17 15:31:48 [DEBUG] Waiting for state to become: [active]
2020/03/17 15:31:50 [TRACE] dag/walk: vertex "root" is waiting for "meta.count-boundary (EachMode fixup)"
2020/03/17 15:31:50 [TRACE] dag/walk: vertex "provider.ibm (close)" is waiting for "ibm_database.database"
2020/03/17 15:31:50 [TRACE] dag/walk: vertex "meta.count-boundary (EachMode fixup)" is waiting for "ibm_database.database"
ibm_database.database: Still creating... [10s elapsed]
2020/03/17 15:31:55 [TRACE] dag/walk: vertex "provider.ibm (close)" is waiting for "ibm_database.database"
2020/03/17 15:31:55 [TRACE] dag/walk: vertex "meta.count-boundary (EachMode fixup)" is waiting for "ibm_database.database"
2020/03/17 15:31:55 [TRACE] dag/walk: vertex "root" is waiting for "meta.count-boundary (EachMode fixup)"
2020/03/17 15:31:58 [DEBUG] ibm_database.database: apply errored, but we're indicating that via the Error pointer rather than returning it: Error waiting for create database instance () to complete: unexpected state 'provisioning', wanted target 'active'. last error: %!s(<nil>)
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020/03/17 15:31:58 [TRACE] EvalMaybeTainted: ibm_database.database encountered an error during creation, so it is now marked as tainted
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalWriteState
2020/03/17 15:31:58 [TRACE] EvalWriteState: removing state object for ibm_database.database
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalApplyProvisioners
2020/03/17 15:31:58 [TRACE] EvalApplyProvisioners: ibm_database.database has no state, so skipping provisioners
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalMaybeTainted
2020/03/17 15:31:58 [TRACE] EvalMaybeTainted: ibm_database.database encountered an error during creation, so it is now marked as tainted
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalWriteState
2020/03/17 15:31:58 [TRACE] EvalWriteState: removing state object for ibm_database.database
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalIf
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalIf
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalWriteDiff
2020/03/17 15:31:58 [TRACE] <root>: eval: *terraform.EvalApplyPost
2020/03/17 15:31:58 [ERROR] <root>: eval: *terraform.EvalApplyPost, err: Error waiting for create database instance () to complete: unexpected state 'provisioning', wanted target 'active'. last error: %!s(<nil>)
2020/03/17 15:31:58 [ERROR] <root>: eval: *terraform.EvalSequence, err: Error waiting for create database instance () to complete: unexpected state 'provisioning', wanted target 'active'. last error: %!s(<nil>)
2020/03/17 15:31:58 [TRACE] [walkApply] Exiting eval tree: ibm_database.database
2020/03/17 15:31:58 [TRACE] vertex "ibm_database.database": visit complete
2020/03/17 15:31:58 [TRACE] dag/walk: upstream of "provider.ibm (close)" errored, so skipping
2020/03/17 15:31:58 [TRACE] dag/walk: upstream of "meta.count-boundary (EachMode fixup)" errored, so skipping
2020/03/17 15:31:58 [TRACE] dag/walk: upstream of "root" errored, so skipping
Error: Error waiting for create database instance () to complete: unexpected state 'provisioning', wanted target 'active'. last error: %!s(<nil>)
on main.tf line 25, in resource "ibm_database" "database":
25: resource "ibm_database" "database" {
2020-03-17T15:31:58.905+0100 [DEBUG] plugin: plugin process exited: path=/Users/sibellas/.terraform.d/plugins/terraform-provider-ibm_v1.2.4 pid=94924
2020-03-17T15:31:58.905+0100 [DEBUG] plugin: plugin exited
Expected Behavior
Terraform deployment end when RabbitMQ instance is up and running.
Actual Behavior
Terraform deployment end with an error when RabbitMQ instance is in provisioning state.
Steps to Reproduce
terraform apply
References
May have the same root cause as #1190
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 2
- Comments: 15 (3 by maintainers)
PR to solved. https://github.com/IBM-Cloud/terraform-provider-ibm/pull/1192
Yes …we are checking the response from API team the status is in “provisioning” we are planning to consider that status also. https://github.com/IBM-Cloud/terraform-provider-ibm/blob/bf4bcd0cdfb52d7ce6230472bfc0bd239ff3fdec/ibm/resource_ibm_database.go#L1158 We will fix the problem and push to master branch…