Closed ifs-anthonylecarrer closed 1 year ago
@ifs-anthonylecarrer Thanks for reporting this issue. It appears our documentation and client SDK lists this parameter incorrectly as maxmemory-redis
instead of maxmemory
https://github.com/IBM/cloud-databases-go-sdk/blob/0addb2e7a3617770f607015235d776d62880ba1e/clouddatabasesv5/cloud_databases_v5.go#L2901-L2902
hello @alexhemard
Using `maxmeroy, i have this issue :
β Error: 1 error occurred:
β * [ERROR] configuration contained invalid field(s): [maxmemory]
β
β
β
β with ibm_database.db_redis[0],
β on main.tf line 5, in resource "ibm_database" "db_redis":
β 5: resource "ibm_database" "db_redis" {
using maxmemory-redis
, i have this issue :
β Error: [ERROR] Error updating database configuration failed Unprocessable Entity
β {
β "StatusCode": 422,
β "Headers": {
β "Cache-Control": [
β "no-cache"
β ],
β "Cf-Cache-Status": [
β "DYNAMIC"
β ],
β "Cf-Ray": [
β "7ba2dcf1da84024b-CDG"
β ],
β "Content-Security-Policy": [
β "frame-ancestors *.bluemix.net *.compose.fastkit *.cloud.ibm.com cloud.ibm.com"
β ],
β "Content-Type": [
β "application/json; charset=utf-8"
β ],
β "Date": [
β "Wed, 19 Apr 2023 05:49:15 GMT"
β ],
β "Referrer-Policy": [
β "strict-origin-when-cross-origin"
β ],
β "Server": [
β "cloudflare"
β ],
β "Strict-Transport-Security": [
β "max-age=0; includeSubDomains"
β ],
β "X-Content-Type-Options": [
β "nosniff"
β ],
β "X-Download-Options": [
β "noopen"
β ],
β "X-Envoy-Upstream-Service-Time": [
β "1242"
β ],
β "X-Permitted-Cross-Domain-Policies": [
β "none"
β ],
β "X-Request-Id": [
β "5441ec02-03c3-4058-bd7d-be1a5cec1dcd"
β ],
β "X-Runtime": [
β "1.240053"
β ],
β "X-Xss-Protection": [
β "1; mode=block"
β ]
β },
β "Result": {
β "errors": {
β "configuration.maxmemory-redis": [
β "not supported"
β ]
β }
β },
β "RawResult": null
β }
β
β
β with ibm_database.db_redis[0],
β on main.tf line 5, in resource "ibm_database" "db_redis":
β 5: resource "ibm_database" "db_redis" {
it seems the right parameter is maxmemory-redis
but as soon as i try to override this parameter using redis configuration, the result is that the parameter is not supported. If i do not override redis configuration, it works using
{
"region": "eu-de",
"vpc_name": "vpc2",
"resource_group_id": "681ed5c0507740ad9226a7d87cabbbfa",
"environment_id": "test123",
"tags": [
"environmentid:test123"
],
"redis_instance_info": {
"name" : "myredis-db",
"plan": "standard",
"version": "latest",
"members_memory_allocation_mb": 6144,
"members_disk_allocation_mb": 28672,
"endpoint" : "private"
}
}
instead of :
{
"region": "eu-de",
"vpc_name": "vpc2",
"resource_group_id": "681ed5c0507740ad9226a7d87cabbbfa",
"environment_id": "test123",
"tags": [
"environmentid:test123"
],
"redis_instance_info": {
"name" : "myredis-db",
"plan": "standard",
"version": "latest",
"members_memory_allocation_mb": 6144,
"members_disk_allocation_mb": 28672,
"endpoint" : "private"
},
"redis_config": {
"stop-writes-on-bgsave-error": "yes",
"maxmemory-samples": 5
}
}
@obai-1 Can you look into this
I've just hit this issue and can confirm the behaviour @ifs-anthonylecarrer has shown.
Community Note
Terraform CLI and Terraform IBM Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
Panic Output
Expected Behavior
It should work like in 1.50.0 even if i have to change the parameter name .... I can find in 1.51 release notes a change that should have caused this regression
Actual Behavior
With terraform ibmcloud provider 1.50.0, the configuration parameter name for max memory was
maxmerory
Since terraform ibmcloud provider 1.51.0, terraform ask to change this parameter to fix it to maxmemory-redis as described in API documentation
Error using maxmemory with ibmcloud terraform provider => 1.51.0
Documentation about redis configuration parameter
Provider documentation : https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/database#configuration API Documentation : https://cloud.ibm.com/apidocs/cloud-databases-api/cloud-databases-api-v4#setdatabaseconfiguration-request
Error using maxmemory-redis with ibmcloud terraform provider => 1.51.0
Steps to Reproduce
terraform init
terraform apply -var-file redis.json -auto-approve
Important Factoids
References
0000