Open juanforo opened 2 years ago
A related error is that whenever I put around 60 values in the variable tasks, I got this error
A workaround that I found is to create an almost empty flow, with only two or three attributes, and then put the remaining ones, run an apply, and then, you will find the error that is the name of this issue
I added this information, just to give additional context https://aws.github.io/aws-sdk-go-v2/docs/making-requests/#advanced-waiter-configuration-overrides
Hello, I'm facing this same issue and is impacting our productive environments, the terraform apply will always end with an error.
Is there any workaround for this issue?
Also, sometimes when I try to add some new fields to a flow in AppFlow via Terraform, they are added. But sometimes not. When they are not added, as a workaround, I delete the flow from AWS Console, and run terraform apply one more time. After this workaround, all new fields are added to the flow.
I believe this is not a bug in the awscc provider, but is actually a bug in either AWS appflow or the awscc api itself. I've gotten all of the errors listed above, and I think the one below is related. The awscc api is returning incorrect status information, and I can reproduce this without terraform.
From the AWS CLI, I can run a command like aws cloudcontrol create-resource --type-name AWS::AppFlow::Flow --desired-state "..."
which returns a request token. Then with that token I can poll the get-resource-request-status endpoint like so aws cloudcontrol get-resource-request-status--request-token <token>
and I'll get a series of responses indicating "IN_PROGRESS" (including for tens of seconds after the new flow is showing in the AWS console) before starting to get
"OperationStatus": "FAILED",
"StatusMessage": "Conflict executing request: Flow with name <flowname> already exists. (Service: Appflow, Status Code: 409, Request ID: ...)",
"ErrorCode": "AlreadyExists"
Which is nuts, because the flow is successfully created and no flow with that name has ever existed before.
The workaround that I know of is to manually untaint the resources. A subsequent plan should show if there is, in fact, any diff. In my case, there never has been so far.
I'm going to file a ticket with AWS about this.
I have the same issue with trying to register transit gateways:
Error: AWS SDK Go Service Operation Incomplete
with awscc_networkmanager_transit_gateway_registration.tgw_eu_north_1,
on cloudwan.tf line 74, in resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_north_1":
74: resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_north_1" {
Waiting for Cloud Control API service CreateResource operation completion
returned: waiter state transitioned to FAILED. StatusMessage: Incorrect
input. (Service: NetworkManager, Status Code: 400, Request ID:
2728ee2f-8a03-4c99-9f50-d07e86cbee57). ErrorCode: AlreadyExists
Error: AWS SDK Go Service Operation Incomplete
with awscc_networkmanager_transit_gateway_registration.tgw_eu_west_1,
on cloudwan.tf line 79, in resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_west_1":
79: resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_west_1" {
Waiting for Cloud Control API service CreateResource operation completion
returned: waiter state transitioned to FAILED. StatusMessage: Incorrect
input. (Service: NetworkManager, Status Code: 400, Request ID:
4d5bb688-bc0c-41a6-b5b0-28eabad20b53). ErrorCode: AlreadyExists
and even subsequent plans fail:
awscc_networkmanager_transit_gateway_registration.tgw_eu_west_1: Refreshing state... [id=global-network-xxxxx|tgw-xxxxxx]
awscc_networkmanager_transit_gateway_registration.tgw_eu_north_1: Refreshing state... [id=global-network-xxxx|tgw-xxxxyy]
╷
│ Error: AWS SDK Go Service Operation Unsuccessful
│
│ with awscc_networkmanager_transit_gateway_registration.tgw_eu_north_1,
│ on cloudwan.tf line 74, in resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_north_1":
│ 74: resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_north_1" {
│
│ Calling Cloud Control API service GetResource operation returned: operation
│ error CloudControl: GetResource, https response error StatusCode: 400,
│ RequestID: c1bf028d-9ced-4552-a2cc-4821c0d5288b, InvalidRequestException:
│ AWS::NetworkManager::TransitGatewayRegistration Handler returned status
│ FAILED: Incorrect input. (Service: NetworkManager, Status Code: 400,
│ Request ID: 2ca76099-e673-4ca6-b1a9-db1a016dae0c) (HandlerErrorCode:
│ InvalidRequest, RequestToken: 806fc738-c693-4230-8aa0-c0eb35ebc168)
╵
╷
│ Error: AWS SDK Go Service Operation Unsuccessful
│
│ with awscc_networkmanager_transit_gateway_registration.tgw_eu_west_1,
│ on cloudwan.tf line 79, in resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_west_1":
│ 79: resource "awscc_networkmanager_transit_gateway_registration" "tgw_eu_west_1" {
│
│ Calling Cloud Control API service GetResource operation returned: operation
│ error CloudControl: GetResource, https response error StatusCode: 400,
│ RequestID: 7d516c8f-e666-48b7-affd-d91bff24a725, InvalidRequestException:
│ AWS::NetworkManager::TransitGatewayRegistration Handler returned status
│ FAILED: Incorrect input. (Service: NetworkManager, Status Code: 400,
│ Request ID: 0d788e66-02ca-41f8-8ef2-3c1c9952bade) (HandlerErrorCode:
│ InvalidRequest, RequestToken: 4de16066-a3da-4ad0-a23d-a3cc463c9107)
Did you come up with any solutions? I have similar error but with quicksight dashboard.
Yes, even I am getting same error despite using same example task given in awscc appflow documentation.
Error:
╷ │ Error: AWS SDK Go Service Operation Incomplete │ │ with awscc_appflow_flow.example, │ on main.tf line 63, in resource "awscc_appflow_flow" "example": │ 63: resource "awscc_appflow_flow" "example" { │ │ Waiting for Cloud Control API service CreateResource operation completion returned: waiter state transitioned to FAILED. StatusMessage: Invalid request provided: AWS::AppFlow::FlowCreate Flow │ request failed: [Task Validation Error: You must specify a projection task or a MAP_ALL task] (Service: Appflow, Status Code: 400, Request ID: bf5be62f-71ee-4214-bdba-e0a866e72820). │ ErrorCode: InvalidRequest
resource "awscc_appflow_flow" "example" {
flow_name = "awsccflow"
source_flow_config = {
connector_type = "CustomConnector"
api_version = "v3"
connector_profile_name = "githubconnector"
source_connector_properties = {
custom_connector = {
entity_name = "repos/username=<my-username>"
}
}
}
destination_flow_config_list = [{
connector_type = "S3"
destination_connector_properties = {
s3 = {
bucket_name = aws_s3_bucket.appflow_bucket.bucket
bucket_prefix = "awscc"
}
}
}]
tasks = [{
source_fields = ["name"]
destination_field = "name"
task_type = "Map"
connector_operator = {
s3 = "NO_OP"
}
}]
trigger_config = {
trigger_type = "OnDemand"
}
}
Community Note
Terraform CLI and Terraform AWS Cloud Control Provider Version
Affected Resource(s)
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
Debug Output
https://gist.github.com/juanforo/164465fa253db65f498514d4b69a6306
Expected Behavior
Appflow flow should be updated with the new task elements
Actual Behavior
Flow being modified, but terraform gave this error
Steps to Reproduce
terraform plan
terraform apply
Important Factoids
References
0000