favoretti / terraform-provider-adx

Mozilla Public License 2.0
14 stars 5 forks source link

Multiple Update Policy's not working on same table. #44

Open guy-radford-sunswap opened 1 year ago

guy-radford-sunswap commented 1 year ago

Is there an existing issue for this?

Terraform Version

v1.3.7

ADX Provider Version

v0.0.21

Terraform Configuration Files

resource "adx_table_update_policy" "adx_table_update_policy_device_sensor_values" {
  database_name = var.database_name
  table_name    = adx_table.adx_table_device_sensor_values.name
  query         = adx_function.fn_extract_device_sensor_values_v1.name
  source_table  = adx_table.events.name
  transactional = true

  depends_on = [adx_function.fn_extract_device_sensor_values_v1]
}

resource "adx_table_update_policy" "adx_table_update_policy_device_sensor_values_for_version_1" {
  database_name = var.database_name
  table_name    = adx_table.adx_table_device_sensor_values.name
  query         = adx_function.fn_extract_device_sensor_values_for_version_1_events.name
  source_table  = adx_table.events.name
  transactional = true

  depends_on = [adx_function.fn_extract_device_sensor_values_for_version_1_events]
}

Debug Output/Panic Output

None

Expected Behaviour

I would expect the two Update Policy's to be applied to the table.

Actual Behaviour

.show table device_sensor_values policy update

[ { "IsEnabled": true, "Source": "events", "Query": "fn_extract_device_sensor_values_for_version_1_events", "IsTransactional": true, "PropagateIngestionProperties": false } ]

Steps to Reproduce

Apply two separate Update Policy's to the same table, I would expect both policies to be listed, appears that only one is applied (order by be random).

Important Factoids

No response

References

No response

slwbuild commented 1 year ago

Thanks for raising this. I was completely unaware that you could set more than one policy for a table.

guy-radford-sunswap commented 1 year ago

Not a worry, I have temporarily updated the function to do both jobs. I used the feature for function versioning and separation of concerns.

Thank you for a great TF Plugin :) This is my first time with TF and ADX, As I get more familiar (and learn Go) Ill try to help and raise some PRs.

guy-radford-sunswap commented 1 year ago

Hi, Wondering if there has been any progress on this issue?

Thank you Guy

guy-radford-sunswap commented 9 months ago

Hi,

I see you have done a load of updates... did this one get done or is it scheduled to get fixed?

Thank you Guy