Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HCP Consul Cluster failed to launch #335

Closed
webdog opened this issue Jun 21, 2022 · 4 comments · Fixed by #326
Closed

HCP Consul Cluster failed to launch #335

webdog opened this issue Jun 21, 2022 · 4 comments · Fixed by #326
Labels
bug Something isn't working

Comments

@webdog
Copy link

webdog commented Jun 21, 2022

Error: unable to create Consul cluster (): create Consul cluster operation () failed [code=13, message=failed to deploy consul cluster: failed to provision Consul cluster: rpc error: code = Internal desc = error applying Terraform: Provider produced inconsistent result after apply When applying changes to aws_iam_role.doormat_ssh, provider "registry.terraform.io/-/aws" produced an unexpected new value for was present, but now absent. This is a bug in the provider, which should be reported in the provider's own issue tracker.]

image

Unable to import the resource into the project:

$ terraform import module.tutorial_infrastructure.module.resources.hcp_consul_cluster.server 
module.tutorial_infrastructure.module.resources.hcp_consul_cluster.server: Importing from ID ""...
module.tutorial_infrastructure.module.resources.hcp_consul_cluster.server: Import prepared!
 Prepared hcp_consul_cluster for import
module.tutorial_infrastructure.module.resources.hcp_consul_cluster.server: Refreshing state... [id=//hashicorp.consul.cluster/]
╷
│ Error: Cannot import non-existent remote object
│ 
│ While attempting to import an existing object to "module.tutorial_infrastructure.module.resources.hcp_consul_cluster.server", the provider detected that no object exists with the given id. Only pre-existing objects can be imported; check that the id is correct and that it
│ is associated with the provider's configured region or endpoint, or use "terraform apply" to create a new remote object for this resource.
@webdog webdog added the bug Something isn't working label Jun 21, 2022
@webdog
Copy link
Author

webdog commented Jun 21, 2022

This is a bit of a flow-breaking/less than great UX. Because the cluster is in this nebulous state, I have to manually delete this cluster from the UI, and then run terraform destroy, as I don't trust the state of the infrastructure after this failure.

Since the HCP Consul Cluster with the HVN can take 15-30 minutes to create/destroy in some cases, this is a bit of a time sink. 😢

@jjti
Copy link
Contributor

jjti commented Jun 21, 2022

This is a bit of a flow-breaking/less than great UX. Because the cluster is in this nebulous state, I have to manually delete this cluster from the UI, and then run terraform destroy, as I don't trust the state of the infrastructure after this failure.

A PR to fix this is in progress here: #326. You're right about having to delete in UI being unexpected, undesirable

@webdog
Copy link
Author

webdog commented Jun 21, 2022

@jjtimmons

A PR to fix this is in progress here: #326. You're right about having to delete in UI being unexpected, undesirable

w00t! 😸 Looking forward to the merge. Thanks for the quick follow up!

@jjti
Copy link
Contributor

jjti commented Jun 21, 2022

@webdog in terms of the failure root cause, we're going to work on a fix shortly. Thank you for reporting

error applying Terraform: Provider produced inconsistent result after apply

@jjti jjti closed this as completed in #326 Jun 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants