terraform-provider-rabbitmq
terraform-provider-rabbitmq copied to clipboard
DNS issue with OpenVPN connected
OS
MacOS
Terraform Version
1.0.9
Affected Resource(s)
All for provider
Terraform Configuration Files
provider "rabbitmq" {
endpoint = "https://rabbitmq.test.local"
username = "user"
password = data.aws_ssm_parameter.rabbitmq_password.value
}
resource "rabbitmq_user" "monitoring" {
name = "monitoring"
password = "monitoring"
tags = ["monitoring"]
}
Expected Behavior
The resource is created
Actual Behavior
Error: Put "https://rabbitmq.test.local/api/users/monitoring": dial tcp: lookup rabbitmq.test.local on 192.168.1.1:53: no such host
Steps to Reproduce
-
terraform apply
Important Factoids
I use OpenVPN with split dns configuration:
$ scutil --dns
DNS configuration
resolver #1
search domain[0] : test.local
nameserver[0] : 192.168.1.1
if_index : 6 (en0)
flags : Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
resolver #2
domain : test.local
nameserver[0] : 10.250.0.2
flags : Supplemental, Request A records
reach : 0x00000002 (Reachable)
order : 101202
...
DNS configuration (for scoped queries)
resolver #1
nameserver[0] : 192.168.1.1
if_index : 6 (en0)
flags : Scoped, Request A records
reach : 0x00020002 (Reachable,Directly Reachable Address)
Here the "10.250.0.2" is a DNS server behind VPN.
The system resolving works OK:
$ ping rabbitmq.test.local
PING rabbitmq.test.local (10.250.111.111): 56 data bytes
References
The similar issues:
- https://github.com/hashicorp/terraform-provider-consul/issues/283
- https://github.com/hashicorp/terraform/issues/3536
- https://github.com/hashicorp/vault/issues/12012
This should be fixed now with Go 1.20. See also https://github.com/golang/go/issues/12524 and https://github.com/hashicorp/terraform-provider-vault/pull/1941. It requires this provider to upgrade to Go 1.20 apparently.
Update available (Go 1.21) into a duplicate provider :
terraform {
required_providers {
rabbitmq = {
source = "rfd59/rabbitmq"
version = "2.0.0"
}
}
}
https://registry.terraform.io/providers/rfd59/rabbitmq/latest/docs