We're currently using version 1.8.0 of your Terraform provider, and are excited to see the continuous improvements and feature enhancements you're doing. We use the timescale_peering_connection resource to set up the peering connections.
While this works for the most part, we ran into a situation where we had to remove two peering connections manually through the Timescale Cloud Console. Terraform didn't recognize that they were removed and didn't try to recreate them.
Expected behavior
We expect the timescale_peering_connection resource to be idempotent, so that if a resource is removed manually through the Timescale console, Terraform should recreate it next time we run a terraform plan. Other Terraform providers like the AWS Terraform provider also work this way.
Actual behavior
When running a terraform plan after the resources were removed manually, these errors showed up:
│ Error: Value Conversion Error
│
│ with timescale_peering_connection.timescale_peering["REDACTED"],
│ on timescale.tf line 139, in resource "timescale_peering_connection" "timescale_peering":
│ 139: peer_account_id = each.value.aws_account_id
│
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│
│ Received null value, however the target type cannot handle null values. Use the corresponding `types` package type, a pointer type or a custom type that handles null values.
│
│ Path: peer_account_id
│ Target Type: string
│ Suggested `types` Type: basetypes.StringValue
│ Suggested Pointer Type: *string
╵
╷
│ Error: Value Conversion Error
│
│ with timescale_peering_connection.timescale_peering["REDACTED"],
│ on timescale.tf line 140, in resource "timescale_peering_connection" "timescale_peering":
│ 140: peer_region_code = local.region
│
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│
│ Received null value, however the target type cannot handle null values. Use the corresponding `types` package type, a pointer type or a custom type that handles null values.
│
│ Path: peer_region_code
│ Target Type: string
│ Suggested `types` Type: basetypes.StringValue
│ Suggested Pointer Type: *string
╵
╷
│ Error: Value Conversion Error
│
│ with timescale_peering_connection.timescale_peering["REDACTED"],
│ on timescale.tf line 141, in resource "timescale_peering_connection" "timescale_peering":
│ 141: peer_vpc_id = each.value.vpc_id
│
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│
│ Received null value, however the target type cannot handle null values. Use the corresponding `types` package type, a pointer type or a custom type that handles null values.
│
│ Path: peer_vpc_id
│ Target Type: string
│ Suggested `types` Type: basetypes.StringValue
│ Suggested Pointer Type: *string
╵
╷
│ Error: Value Conversion Error
│
│ with timescale_peering_connection.timescale_peering["REDACTED"],
│ on timescale.tf line 142, in resource "timescale_peering_connection" "timescale_peering":
│ 142: timescale_vpc_id = timescale_vpcs.timescale_vpc.id
│
│ An unexpected error was encountered trying to build a value. This is always an error in the provider. Please report the following to the provider developer:
│
│ Received null value, however the target type cannot handle null values. Use the corresponding `types` package type, a pointer type or a custom type that handles null values.
│
│ Path: timescale_vpc_id
│ Target Type: int64
│ Suggested `types` Type: basetypes.Int64Value
│ Suggested Pointer Type: *int64
We then had to remove the resources from the Terraform state manually through:
terraform state rm "timescale_peering_connection.timescale_peering[\"REDACTED\"]"
Please let me know if you need any additional information from our side. Thanks!
Hi Timescale team,
We're currently using version 1.8.0 of your Terraform provider, and are excited to see the continuous improvements and feature enhancements you're doing. We use the
timescale_peering_connection
resource to set up the peering connections.While this works for the most part, we ran into a situation where we had to remove two peering connections manually through the Timescale Cloud Console. Terraform didn't recognize that they were removed and didn't try to recreate them.
Expected behavior
We expect the
timescale_peering_connection
resource to be idempotent, so that if a resource is removed manually through the Timescale console, Terraform should recreate it next time we run aterraform plan
. Other Terraform providers like the AWS Terraform provider also work this way.Actual behavior
When running a
terraform plan
after the resources were removed manually, these errors showed up:We then had to remove the resources from the Terraform state manually through:
Please let me know if you need any additional information from our side. Thanks!