-
Notifications
You must be signed in to change notification settings - Fork 113
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
consul_certificate_authority Vault Connect-CA #331
Comments
consul_certificate_authority
Vault Connect-CA
consul_certificate_authority
Vault Connect-CA
Tried to do the same with HTTP request like this:
and the error was the same:
Also I tried setting all capabilities to policy:
with the same error. So, I guess the issue is not about provider, but about Consul itself or documentation. |
I also tried this method with
Error:
Again, token policies are:
|
Verify than token has documented policies:
|
Hi @nullc4t, I think there is an issue with the way you have setup permissions for Consul to access the Vault PKI mount as is reported in Consul's log. I had no issues to use the Vault CA with the following configuration: locals {
vault_token = "iY1KK0A7MygzZUwz3WoIkSvq"
}
terraform {
required_providers {
vault = {
source = "hashicorp/vault"
version = "3.15.0"
}
consul = {
source = "hashicorp/consul"
version = "2.17.0"
}
}
}
provider "vault" {
address = "http://localhost:8200"
token = local.vault_token
}
provider "consul" {}
resource "vault_mount" "pki" {
path = "pki"
type = "pki"
default_lease_ttl_seconds = 315360000
max_lease_ttl_seconds = 315360000
}
resource "consul_certificate_authority" "connect" {
connect_provider = "vault"
config = {
Address = "http://localhost:8200/"
Token = local.vault_token
RootPKIPath = vault_mount.pki.path
IntermediatePKIPath = vault_mount.pki.path
}
} Can you please check that the ACL in Vault are properly configured for your usage? The audit log should have a lot of information to help you debug the issue. |
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Affected Resource(s)
consul_certificate_authority
Terraform Configuration Files
Debug Output
Expected Behavior
Consul set up Vault as Connect CA as mentioned here and here
Actual Behavior
Got error
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
ACL disabled
The text was updated successfully, but these errors were encountered: