terraform-provider-ovh icon indicating copy to clipboard operation
terraform-provider-ovh copied to clipboard

json: cannot unmarshal number 100.0 into Go struct field DbaasLogsOutputGraylogStream.indexingMaxSize of type int64

Open juluanb opened this issue 3 years ago • 1 comments

Terraform Version

Terraform v1.1.4 on linux_amd64

  • provider registry.terraform.io/ovh/ovh v0.16.0

Affected Resource(s)

ovh_dbaas_logs_output_graylog_stream

Terraform Configuration Files

resource "ovh_dbaas_logs_output_graylog_stream" "my_stream" {
  service_name = var.DBAAS_LOGS_SERVICE_NAME
  title        = "my_stream"
  description  = "My stream description."
  retention_id = "031a3e38-858b-4202-9451-f2cb98a4395f"
  cold_storage_enabled = false
  cold_storage_compression = "GZIP"
  cold_storage_content = "ALL"
  cold_storage_notify_enabled = true
  cold_storage_retention = 1
  cold_storage_target = "PCA"
  indexing_enabled = true
  indexing_max_size = "100" # This setting results in an error "cannot unmarshal number 100.0 into Go struct field DbaasLogsOutputGraylogStream.indexingMaxSize of type int64". No error if omitted.
  indexing_notify_enabled = true
  pause_indexing_on_max_size = false
  web_socket_enabled = true
}

Expected Behavior

terraform apply command should terminate normally without error messages.

Actual Behavior

terraform apply command terminates with the following error messages.

ovh_dbaas_logs_output_graylog_stream.my_stream: Still creating... [10s elapsed]
╷
│ Error: calling /dbaas/logs/*******/output/graylog/stream/******:
│        json: cannot unmarshal number 100.0 into Go struct field DbaasLogsOutputGraylogStream.indexingMaxSize of type int64
│ 
│   with ovh_dbaas_logs_output_graylog_stream.my_stream,
│   on ldp.tf line 71, in resource "ovh_dbaas_logs_output_graylog_stream" "my_stream":
│   71: resource "ovh_dbaas_logs_output_graylog_stream" "my_stream" {
│ 
╵

Steps to Reproduce

  1. terraform apply

juluanb avatar Feb 02 '22 15:02 juluanb

Any news on this issue ?

qmartouzet avatar Sep 05 '22 14:09 qmartouzet

Hello, sorry for the delay. I have informed the product team.

yomovh avatar Jan 31 '23 14:01 yomovh

HI, did you try with 100.0 as a number (like cold storage) ? indexing_max_size is defined as a number in the terraform provider

jehuty0shift avatar Jan 31 '23 14:01 jehuty0shift

Documentation shall be updated to define the type of each attribute.

yomovh avatar Mar 09 '23 14:03 yomovh

I'm not reproducing the error with the version v0.34.0 of the 'ovh' provider. I consider this issue can be closed. Thanks !

juluanb avatar Oct 11 '23 16:10 juluanb