Skip to content
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

Issue deploying Dialogflow CX Version in europe-west2 #12880

Assignees
Labels

Comments

@BolajiAkerele2013
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
  • Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.
  • If an issue is assigned to the modular-magician user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned to hashibot, a community member has claimed the issue already.

Terraform Version

Terraform v0.15.5

Affected Resource(s)

  • google_dialogflow_cx_version

Terraform Configuration Files

resource "google_dialogflow_cx_agent" "agent" {
  display_name = "dialogflowcx-agent"
  location = "europe-west2"
  default_language_code = "en"
  supported_language_codes = ["fr","de","es"]
  time_zone = "Europe/London"
  description = "CX BOT Agent"
  enable_stackdriver_logging = true
    speech_to_text_settings {
        enable_speech_adaptation = true
    }
}


resource "google_dialogflow_cx_version" "version_1" {
  parent       = google_dialogflow_cx_agent.agent.start_flow
  display_name = "1.0.0"
  description  = "version 1.0.0"
}

Debug Output

Panic Output

Expected Behavior

Version should be created in 'europe-west2'

Actual Behavior

"Error waiting to create Version: Error waiting for creating Version: error while retrieving operation: googleapi: Error 400: Please switch to 'europe-west2-dialogflow.googleapis.com' to access resources located in 'europe-west2'

Steps to Reproduce

  1. terraform apply

Important Factoids

I'm authenticating as a Service Account to create these resources.

References

@edwardmedia edwardmedia self-assigned this Oct 26, 2022
@BolajiAkerele2013
Copy link
Author

@jcanizalez Please were you able to test this with the #9809 fix?

@BolajiAkerele2013
Copy link
Author

When I check the dialogflow console, I notice the version gets successfully created but then Terraform still flags the error about location.
"Error waiting to create Version: Error waiting for creating Version: error while retrieving operation: googleapi: Error 400: Please switch to 'europe-west2-dialogflow.googleapis.com' to access resources located in 'europe-west2'

@edwardmedia
Copy link
Contributor

@BolajiAkerele2013 did you ever receive below error? If yes, how did you resolve it?

Error creating Agent: googleapi: Error 400: com.google.apps.framework.request.FailedPreconditionException: Location settings have to be initialized before creating the agent in location: europe-west2. Code: FAILED_PRECONDITION

@BolajiAkerele2013
Copy link
Author

BolajiAkerele2013 commented Oct 27, 2022

Yes, I configured the location settings on the Dialogflow CX console to europe-west2.

@BolajiAkerele2013 did you ever receive below error? If yes, how did you resolve it?

Error creating Agent: googleapi: Error 400: com.google.apps.framework.request.FailedPreconditionException: Location settings have to be initialized before creating the agent in location: europe-west2. Code: FAILED_PRECONDITION

@BolajiAkerele2013
Copy link
Author

@shuyama1 please this is still pending for your review.

@gorecki-k
Copy link

gorecki-k commented Nov 2, 2022

@edwardmedia
The problem is the verification of the status of creating version operation.
Create request is made properly to the regional endpoint (Host property) and the version is successfully created, but verification fails as is made to the global endpoint. Pleas check the debug output below.

Create version request

---[ REQUEST ]---------------------------------------
POST /v3/projects/project_name/locations/europe-west2/agents/000000000-1111-2222-4444-555555555555/flows/000000000-0000-0000-0000-0000000000000/versions?alt=json HTTP/1.1
Host: europe-west2-dialogflow.googleapis.com
User-Agent: Terraform/0.14.1 (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google/dev
Content-Length: 54
Content-Type: application/json
Accept-Encoding: gzip

{
"description": "version 0.0.0",
"displayName": "0.0.0"
}

Check the operation status request

---[ REQUEST ]---------------------------------------
GET /v3/projects/project_name/locations/europe-west2/operations/00000000-06051666875920-63550066-0000-23f0-8870-2405887f6620?alt=json HTTP/1.1
Host: dialogflow.googleapis.com          # it should be europe-west2-dialogflow.googleapis.com as above
User-Agent: Terraform/0.14.1 (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google/dev
Content-Type: application/json
Accept-Encoding: gzip

[...]

{
  "error": {
    "code": 400,
    "message": "Please switch to 'europe-west2-dialogflow.googleapis.com' to access resources located in 'europe-west2'.",
    "status": "INVALID_ARGUMENT"
  }
} 

@shuyama1
Copy link
Collaborator

shuyama1 commented Nov 2, 2022

@shuyama1 please this is still pending for your review.

Thanks for the ping! This is on my review list and will get to it soon!

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.