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

awscc_connect_approved_origin Error: AWS SDK Go Service Operation Incomplete #966

Closed
gregorycottone opened this issue May 30, 2023 · 3 comments

Comments

@gregorycottone
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 other comments that do not add relevant new information or questions, 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
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Terraform CLI and Terraform AWS Cloud Control Provider Version

terraform-provider-awscc_v0.52.0_x5

Affected Resource(s)

  • awscc_connect_approved_origin

Terraform Configuration Files

Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.

resource "awscc_connect_approved_origin" "approved_origin_domain" {
  instance_id = module.connect_instance.connect_instance_arn
  origin      = "http://localhost:8080"
}

Debug Output

Panic Output

Expected Behavior

I would expected the creation of an approved domain in my existing Amazon Connect Instance:
Capture

Actual Behavior

I got this terraform error:

│ Error: AWS SDK Go Service Operation Incomplete
│
│   with awscc_connect_approved_origin.approved_origin_domain,
│   on connect.tf line 377, in resource "awscc_connect_approved_origin" "approved_origin_domain":
│  377: resource "awscc_connect_approved_origin" "approved_origin_domain" {
│
│ Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED.
│ StatusMessage: Invalid parameter: arn:aws:connect:xx-xxxx-x:xxxxxxxxxxxx:instance/xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx (Service:     
│ Connect, Status Code: 400, Request ID: a69125be-1f42-4b4d-998c-99f7832a200f). ErrorCode: InvalidRequest

Steps to Reproduce

Important Factoids

References

  • #0000
@kadrach
Copy link
Contributor

kadrach commented Jun 8, 2023

Thank you for raising this @gregorycottone. Can you confirm the format of module.connect_instance.connect_instance_arn?

The example below works.

terraform {
  required_providers {
    aws = {
      source = "hashicorp/aws"
    }
    awscc = {
      source = "hashicorp/awscc"
    }
  }
}

resource "aws_connect_instance" "this" {
  identity_management_type = "CONNECT_MANAGED"
  inbound_calls_enabled    = false
  outbound_calls_enabled   = false
  instance_alias           = "potato-123456"
}

resource "awscc_connect_approved_origin" "this" {
  instance_id = aws_connect_instance.this.arn   # Something's going on here
  origin      = "http://localhost:8080"
}

If I set instance_id = aws_connect_instance.this.id I get a meaningful validation error

Attribute instance_id value must match regular expression '^arn:aws[-a-z0-9]:connect:[-a-z0-9]:[0-9]{12}:instance/[-a-zA-Z0-9]*$', got: e65bb6ce-1b7c-4b86-996c-1fd5850b1b71

So I tried giving it a definitely incorrect Arn by doing

instance_id = `${aws_connect_instance.this.arn}o` # appended a character to an otherwise valid arn

and ended up with the same issue you are seeing.

@gregorycottone
Copy link
Author

gregorycottone commented Jun 8, 2023

Thank you for the reply @kadrach

I confirm that the input that I set to instance_id is the correct arn. In particular this is how I have defined the output of my connect instance:

image

Also, from the error I get: "Invalid parameter: arn:aws:connect:xx-xxxx-x:xxxxxxxxxxxx:instance/xxxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx" which is an "arn", not an "id".

My code is exactly equal to your example except for this parameter: identity_management_type = "CONNECT_MANAGED", I didn't define this parameter in my resource

@gregorycottone
Copy link
Author

Ok I found the error in my code, I was configuring awscc provider in a different region with respect to the region of the connect instance.
Now it is working.
Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants