FlexibleEngineCloud / terraform-provider-flexibleengine

Terraform flexibleengine provider
https://www.terraform.io/docs/providers/flexibleengine/
Mozilla Public License 2.0
30 stars 53 forks source link

[Feature Request] Data Ingestion Service #620

Closed vlandemaine-orange closed 2 years ago

vlandemaine-orange commented 3 years ago

Hello,

We have a service called Data Ingestion Service on Flexible Engine, but we don't have any Terraform resource associated to this service. It's possible to add this service on the Terraform provider resources?

Thanks,

Regards,

Valentin LANDEMAINE (OCB/PS)

gllb commented 3 years ago

Hello,

I believe golangsdk does not support the DIS, and it might be a prerequisite for this feature. Here the issue to support DIS in the sdk https://github.com/chnsz/golangsdk/issues/27

gllb commented 3 years ago

The feature has been merged in golangsdk, i'm keen to work on this feature I already start implementation

gllb commented 3 years ago

PR to update golangsdk version : https://github.com/FlexibleEngineCloud/terraform-provider-flexibleengine/pull/633 A second PR will contain the DIS stream feature, unless you prefer to have the sdk update and the feature in the same PR.

gllb commented 3 years ago

Hello,

There is an issue with the API: What's describe in documentation (https://docs.prod-cloud-ocb.orange-business.com/api/dis/dis_02_0025.html) don't reflect the API result :

2021/10/28 15:19:37 [DEBUG] API Response Body: {
  "create_time": 1635427176753,
  "has_more_partitions": false,
  "last_modified_time": 1635427176753,
  "partitions": [
    {
      "hash_range": "[0 : 3074457345618258601]",
      "partition_id": "shardId-0000000000",
      "sequence_number_range": "[0 : 0]",
      "status": "ACTIVE"
    },
    {
      "hash_range": "[3074457345618258602 : 6148914691236517203]",
      "partition_id": "shardId-0000000001",
      "sequence_number_range": "[0 : 0]",
      "status": "ACTIVE"
    },
    {
      "hash_range": "[6148914691236517204 : 9223372036854775807]",
      "partition_id": "shardId-0000000002",
      "sequence_number_range": "[0 : 0]",
      "status": "ACTIVE"
    }
  ],
  "retention_period": 24,
  "status": "RUNNING",
  "stream_name": "ACCPTTEST-91znz"
}
    resource_flexibleengine_dis_stream_v2_test.go:18: Step 1/1 error: Check failed: Check 3/5 error: flexibleengine_dis_stream.test: Attribute 'stream_type' expected "COMMON", got ""

stream_type is missing among other attributes

ShiChangkuo commented 3 years ago

@gllb any updates? Can we not set the stream_type field if the API issue still exists?

gllb commented 3 years ago

Yes we can, here is a PR : https://github.com/FlexibleEngineCloud/terraform-provider-flexibleengine/pull/656 I guess it would be nice to have the right API result and documentation but we could still release this.

gllb commented 2 years ago

data_type and data_schema are also missing, so if a user try to set one of those missing value each plan will try to update the existing stream. IMO this is a real pain, specially for data_type and data_schema.