You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
terraform apply should only add the required attributes to the resource state.
Actual Behavior
After terraform apply of the above code, undefined optional resource attributes like batch_rollover_size_in_mbs, batch_rollover_time_in_ms, batch_size_in_kbs, batch_size_in_num, batch_time_in_sec, etc. get added to the terraform resource state.
When trying to terraform apply new changes to the resource, it fails with the following error since batch_size_in_kbs and batch_time_in_sec are set to 0 which were not defined in the initial resource.
╷
│ Error: 400-InvalidParameter, target.batchSizeInNum must be greater than or equal to 1; target.batchSizeInKbs must be greater than or equal to 1; target.batchTimeInSec must be greater than or equal to 60
│ Suggestion: Please update the parameter(s) in the Terraform config as per error message target.batchSizeInNum must be greater than or equal to 1; target.batchSizeInKbs must be greater than or equal to 1; target.batchTimeInSec must be greater than or equal to 60
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/sch_service_connector
│ API Reference: https://docs.oracle.com/iaas/api/#/en/serviceconnectors/20200909/ServiceConnector/UpdateServiceConnector
│ Request Target: PUT https://service-connector-hub.us-region-1.oci.oraclecloud.com/20200909/serviceConnectors/ocid1.serviceconnector.oc1.region.aaaamyconnector123456789abcdefghijklmnop
│ Provider version: 5.35.0, released on 2024-03-27.
│ Service: Sch Service Connector
│ Operation Name: UpdateServiceConnector
│ OPC request ID: SomeValue
│
│
│ with oci_sch_service_connector.test_connector,
│ on service-connector.tf line 1, in resource "oci_sch_service_connector" "test_connector":
│ 1: resource "oci_sch_service_connector" "test_connector" {
Setting the batch parameters would enable batching, however, we do not want batching to be enabled
Steps to Reproduce
terraform apply the above terraform configuration file (update the OCIDs)
make updates to the configuration file. For example, update the description.
Community Note
Terraform Version and Provider Version
Affected Resource(s)
oci_sch_service_connector
Terraform Configuration Files
Expected Behavior
terraform apply
should only add the required attributes to the resource state.Actual Behavior
After
terraform apply
of the above code, undefined optional resource attributes likebatch_rollover_size_in_mbs
,batch_rollover_time_in_ms
,batch_size_in_kbs
,batch_size_in_num
,batch_time_in_sec
, etc. get added to the terraform resource state.When trying to
terraform apply
new changes to the resource, it fails with the following error sincebatch_size_in_kbs
andbatch_time_in_sec
are set to0
which were not defined in the initial resource.Setting the batch parameters would enable batching, however, we do not want batching to be enabled
Steps to Reproduce
terraform apply
the above terraform configuration file (update the OCIDs)terraform apply
the updated configuration file.References
Similar Github issue - #1897
The text was updated successfully, but these errors were encountered: