hashicorp / hashicorp/consul

Cannot deregister a service which was registered via Terraform without using Terraform

Open
#12,251 5 comments 0 reactions 0 assignees View on GitHub
type/docs
Dominant language
Go
Stars
30.1k
Forks
4.6k
Avg merge
1d 18h
Merged PRs (30d)
39

Description

When filing a bug, please include the following headings if possible. Any example text in this template can be deleted.

#### Overview of the Issue

When a service is registered via Terraform, it appears to be impossible to remove said service without also using Terraform. This is a problem for when a state file has been lost 🙃

#### Reproduction Steps

1. Register a service via Terraform
2. Try to deregister the service using `consul services deregister` or to remove the node running the service using `consul force-leave`

### Consul info for both Client and Server

The client doesn't exist in my case, the service just exists without an actual running server running it.

The server is running version 1.7.1.

### Operating system and Environment details

Using CentOS7 on Amd64 hardware.

### Log Fragments

Nothing gets printed when trying to run my example commands.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Terraform registration, then run `consul services deregister` and `consul force-leave` against Consul 1.7.1 on CentOS 7. Check how each command handles a service with no running client or server. Done means a service registered through Terraform can be removed without access to its Terraform state.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
cli, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.