terraform-provider-rediscloud
terraform-provider-rediscloud copied to clipboard
Cannot create an Essentials database with TLS enabled
Terraform Version
Terraform v1.8.2 on darwin_arm64 [...]
- provider registry.terraform.io/redislabs/rediscloud v1.7.0
Affected Resource(s)
Please list the resources as a list, for example:
- rediscloud_essentials_database
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
resource "rediscloud_essentials_subscription" "subscription" {
name = "${var.environment}-with-tls"
plan_id = data.rediscloud_essentials_plan.plan.id
payment_method_id = data.rediscloud_payment_method.card.id
}
resource "rediscloud_essentials_database" "redis" {
subscription_id = rediscloud_essentials_subscription.subscription.id
name = var.environment
data_persistence = "none"
enable_tls = false
replication = false
enable_payg_features = true
# Omitting alerts{} because of #530
}
Debug Output
Expected Behavior
A Redis database is created with TLS enabled; or, an existing database is updated to enable TLS.
Actual Behavior
Error: 400 BAD_REQUEST - BAD_REQUEST: Bad request detected. Please see additional info for more details
Steps to Reproduce
terraform apply -target module.common.rediscloud_essentials_database.redis
I doubt it's relevant that my database and subscription are inside a module.
Important Factoids
I can enable and disable TLS in the console, and I can even do it using the API:
curl -X 'PUT' \
'https://api.redislabs.com/v1/fixed/subscriptions/2363872/databases/12395251' \
-H 'accept: application/json' \
-H 'x-api-key: foo' \
-H 'x-api-secret-key: bar' \
-H 'Content-Type: application/json' \
-d '{
"enableTls": true
}'
I am also unable to create a database without TLS if I specify enable_payg_features
. I don't know what that means but I do know it's required for enable_tls
to function. Maybe it shouldn't be?