-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Outbound Routes issue - Moving from 1.48 to later versions impacts production #1398
Comments
Are you saying that, without defining any The routes should stay contained within the sites resource unless you set the env variable "ENABLE_STANDALONE_OUTBOUND_ROUTES". This env variable is supposed to enable the new -Charlie |
Hello @charliecon
I have added all the steps below with screenshot. Please let me know if you need any further information:
My Terraform genesys provider is at version 1.48 currently.
Below is my outbound route config:
resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-routes" {
site_id = genesyscloud_telephony_providers_edges_site.SIT_Hatfield.id
outbound_routes {
distribution = "SEQUENTIAL"
enabled = true
external_trunk_base_ids = [data.genesyscloud_telephony_providers_edges_trunkbasesettings.PureCloud_Voice_AWS.id]
name = "Default Outbound Route"
classification_types = ["Emergency", "National", "Network"]
}
outbound_routes{
distribution = "SEQUENTIAL"
enabled = true
external_trunk_base_ids = [data.genesyscloud_telephony_providers_edges_trunkbasesettings.PureCloud_Voice_AWS.id]
name = "Outbound Route 2"
classification_types = ["Extension", "International"]
}
}
And it looks like below in frontend:
***@***.***
Now Next step is to upgrade provider:
required_providers {
genesyscloud = {
source = "mypurecloud/genesyscloud"
#version = ">= 1.23"
version = ">= 1.48"
}
}
***@***.***
After this, even if I run terraform plan, it fails as we need to update the config:
$ terraform plan
╷
│ Error: Missing required argument
│
│ on site_outbound_route.tf line 21, in resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-routes":
│ 21: resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-routes" {
│
│ The argument "name" is required, but no definition was found.
╵
╷
│ Error: Missing required argument
│
│ on site_outbound_route.tf line 21, in resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-routes":
│ 21: resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-routes" {
│
│ The argument "classification_types" is required, but no definition was found.
╵
╷
│ Error: Unsupported block type
│
│ on site_outbound_route.tf line 23, in resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-routes":
│ 23: outbound_routes {
│
│ Blocks of type "outbound_routes" are not expected here.
╵
╷
│ Error: Unsupported block type
│
│ on site_outbound_route.tf line 30, in resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-routes":
│ 30: outbound_routes{
│
│ Blocks of type "outbound_routes" are not expected here.
Updated config for provider 1.53 as below (split into two resources)
resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-route1" {
site_id = genesyscloud_telephony_providers_edges_site.SIT_Hatfield.id
distribution = "SEQUENTIAL"
enabled = true
external_trunk_base_ids = [data.genesyscloud_telephony_providers_edges_trunkbasesettings.PureCloud_Voice_AWS.id]
name = "Default Outbound Route"
classification_types = ["Emergency", "National", "Network"]
}
resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-route2" {
site_id = genesyscloud_telephony_providers_edges_site.SIT_Hatfield.id
distribution = "SEQUENTIAL"
enabled = true
external_trunk_base_ids = [data.genesyscloud_telephony_providers_edges_trunkbasesettings.PureCloud_Voice_AWS.id]
name = "Outbound Route 2"
classification_types = ["Extension", "International"]
}
Terraform plan hangs for almost 5 minutes and then display failure error:
# genesyscloud_telephony_providers_edges_site_outbound_route.SIT_Hatfield-route1 will be created
+ resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-route1" {
+ classification_types = [
+ "Emergency",
+ "National",
+ "Network",
]
+ distribution = "SEQUENTIAL"
+ enabled = true
+ external_trunk_base_ids = [
+ "a659ca6b-c741-44e5-a684-3f792f7170c1",
]
+ id = (known after apply)
+ name = "Default Outbound Route"
+ route_id = (known after apply)
+ site_id = "8ec1860c-7780-443c-8039-aa17175360cc"
}
# genesyscloud_telephony_providers_edges_site_outbound_route.SIT_Hatfield-route2 will be created
+ resource "genesyscloud_telephony_providers_edges_site_outbound_route" "SIT_Hatfield-route2" {
+ classification_types = [
+ "Extension",
+ "International",
]
+ distribution = "SEQUENTIAL"
+ enabled = true
+ external_trunk_base_ids = [
+ "a659ca6b-c741-44e5-a684-3f792f7170c1",
]
+ id = (known after apply)
+ name = "Outbound Route 2"
+ route_id = (known after apply)
+ site_id = "8ec1860c-7780-443c-8039-aa17175360cc"
}
Plan: 2 to add, 0 to change, 0 to destroy.
╷
│ Error: failed to read outbound route 8ec1860c-7780-443c-8039-aa17175360cc for site | error: API Error: 404 - HTTP 404 Not Found (57590c26-36e9-45d4-adb0-f438f76554f9)
│ {"resourceName":"genesyscloud_telephony_providers_edges_site_outbound_route","method":"GET","path":"/api/v2/telephony/providers/edges/sites//outboundroutes/","statusCode":404,"errorMessage":"API Error: 404 - HTTP 404 Not Found (57590c26-36e9-45d4-adb0-f438f76554f9)","correlationId":"57590c26-36e9-45d4-adb0-f438f76554f9"}
│
***@***.***
So to resolve this – I have to remove the outbound routes from Genesys frontend, Remove them from my state file and then run the terraform apply to get them recreated.
Recreation of Outbound routes is a production impacting activity.
Can we have a solution where upgrade of Provider doesn’t ask to recreate outbound routes?
Jyoti Sharma
Senior Design Consultant
GSD Systems
From: Charlie Conneely ***@***.***>
Sent: 02 December 2024 11:57
To: MyPureCloud/terraform-provider-genesyscloud ***@***.***>
Cc: Sharma, Jyoti ***@***.***>; Mention ***@***.***>
Subject: Re: [MyPureCloud/terraform-provider-genesyscloud] Outbound Routes issue - Moving from 1.48 to later versions impacts production (Issue #1398)
You don't often get email from ***@***.******@***.***>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
EXTERNAL EMAIL - EXERCISE CARE WITH LINKS AND ATTACHMENTS
Hi @JyotiSharma101<https://github.com/JyotiSharma101>
Are you saying that, without defining any genesyscloud_telephony_providers_edges_site_outbound_routes resources in your config, the Terraform command is failing just by upgrading the version?
The routes should stay contained within the sites resource unless you set the env variable "ENABLE_STANDALONE_OUTBOUND_ROUTES". This env variable is supposed to enable the new genesyscloud_telephony_providers_edges_site_outbound_routes resource to ensure backward compatibility. If you do not have this var set, then nothing should break when you upgrade version.
…-Charlie
—
|
I understand the problem now. With v1.49.0 we restructured the genesyscloud_telephony_providers_edges_site_outbound_router resource without given proper thought to how we should roll out this breaking change. Apologies—this was a mistake on our part. All we can do from here is help you to get set up with the latest version and take measures to prevent this sort of behaviour happening on future upgrades. Sorry for the inconvenience and thank you for bringing this to our attention! -Charlie |
@charliecon,
I had attached tests and screenshots from my Dev environment. I cannot move this change in Production because of service impact.
Can this issue be handled in upcoming versions of provider so we can have some solution?
Jyoti Sharma
Senior Design Consultant
GSD Systems
From: Charlie Conneely ***@***.***>
Sent: 02 December 2024 16:30
To: MyPureCloud/terraform-provider-genesyscloud ***@***.***>
Cc: Sharma, Jyoti ***@***.***>; Mention ***@***.***>
Subject: Re: [MyPureCloud/terraform-provider-genesyscloud] Outbound Routes issue - Moving from 1.48 to later versions impacts production (Issue #1398)
You don't often get email from ***@***.******@***.***>. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
EXTERNAL EMAIL - EXERCISE CARE WITH LINKS AND ATTACHMENTS
I understand the problem now. With v1.49.0 we restructured the genesyscloud_telephony_providers_edges_site_outbound_router resource without given proper thought to how we should roll out this breaking change. Apologies-this was a mistake on our part.
All we can do from here is help you to get set up with the latest version and take measures to prevent this sort of behaviour happening on future upgrades.
Sorry for the inconvenience and thank you for bringing this to our attention!
…-Charlie
-
|
I cannot view these attachments on GitHub. You might have to attach them directly on GitHub instead of replying via email. I have created a ticket. We will investigate further and see if a resolution can be included in a later version. (Tracking with DEVTOOLING-970) |
Hey @JyotiSharma101 , Did you manage to get around this issue for PROD? |
Hello @kavinbalagen, Because of holidays, this went on hold. Our Provider is restricted at 1.48 version. Is there a solution in any new release? |
@JyotiSharma101 we're looking at it. |
@kavinbalagen, yes I do have access to Prod state file.
…________________________________
From: kavinbalagen ***@***.***>
Sent: Wednesday, January 8, 2025 7:17:42 PM
To: MyPureCloud/terraform-provider-genesyscloud ***@***.***>
Cc: Sharma, Jyoti ***@***.***>; Mention ***@***.***>
Subject: Re: [MyPureCloud/terraform-provider-genesyscloud] Outbound Routes issue - Moving from 1.48 to later versions impacts production (Issue #1398)
EXTERNAL EMAIL - EXERCISE CARE WITH LINKS AND ATTACHMENTS
@JyotiSharma101<https://github.com/JyotiSharma101> we're looking at it. Can you help with the following
Do you by anychance have read-write access to the PROD state files?
—
Reply to this email directly, view it on GitHub<#1398 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BELLUYP26XTWNQEXY5NVUCL2JV2VNAVCNFSM6AAAAABSXQFZNSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNZYGQ2DAMZUGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
**********************************************************************
COMPUTACENTER PLC is registered in England and Wales with the registered number 03110569. Its registered office is at Hatfield Business Park, Hatfield Avenue, Hatfield, Hertfordshire AL10 9TW
COMPUTACENTER (UK) Limited is registered in England and Wales with the registered number 01584718. Its registered office is at Hatfield Business Park, Hatfield Avenue, Hatfield, Hertfordshire AL10 9TW
COMPUTACENTER (Mid-Market) Limited is registered in England and Wales with the registered number 3434654. Its registered office is at Hatfield Business Park, Hatfield Avenue, Hatfield, Hertfordshire AL10 9TW
COMPUTACENTER (FMS) Limited is registered in England and Wales with the registered number 3798091. Its registered office is at Hatfield Business Park, Hatfield Avenue, Hatfield, Hertfordshire AL10 9TW
The contents of this email are intended for the named addressee only.
It contains information which may be confidential and which may also be privileged.
Unless you are the named addressee (or authorised to receive mail for the addressee) you may not copy or use it, or disclose it to anyone else.
If you receive it in error please notify us immediately and then destroy it.
Computacenter information is available from: http://www.computacenter.com<http://www.computacenter.com/>
Privacy Notice<https://www.computacenter.com/en/privacy-notice-art-13-14/>
**********************************************************************
|
Hey @JyotiSharma101
|
Version greater then 1.48 requires outbound route to be present as individual resources. Splitting the outbound routes into individual resources hangs the terraform plan as the updated provider cannot understand the old config in state file and errors out. The only way to bring up the new format is to delete the existing outbound resource from state file, delete the config from front end and then create the outbound routes again through new format. This process is production impacting.
Can we have seemless way of moving to new structure for outbound routes without requirements of recreating them.
Steps to reproduce:
Create a site with two outbound routes with old provider (1.48)
The state file will have one resource for outbound route.
Now upgrade the provider (1.53)
change the config in terraform to support new format (two outbound resources)
run terraform plan.
Terraform plan errors out - You will see the error as below:
│ Error: failed to read outbound route 8ec1860c-7780-443c-8039-aa17175360cc for site | error: API Error: 404 - HTTP 404 Not Found (413f4aac-ad03-4e25-adf5-680078799438)
│ {"resourceName":"genesyscloud_telephony_providers_edges_site_outbound_route","method":"GET","path":"/api/v2/telephony/providers/edges/sites//outboundroutes/","statusCode":404,"errorMessage":"API Error: 404 - HTTP 404 Not Found (413f4aac-ad03-4e25-adf5-680078799438)","correlationId":"413f4aac-ad03-4e25-adf5-680078799438"}
Terraform plan is looking for old resource for outbound route and provider is not able to read the format.
To get rid of this error:
The text was updated successfully, but these errors were encountered: