hashicorp / terraform-provider-aws

The AWS Provider enables Terraform to manage AWS resources.
https://registry.terraform.io/providers/hashicorp/aws
Mozilla Public License 2.0
9.62k stars 9.01k forks source link

[Bug]: aws_appflow_connector_profile Connector:BigQueryConnector is not registered. Please register it first before creating ConnectorProfile. #37826

Open Maxlotl opened 1 month ago

Maxlotl commented 1 month ago

Terraform Core Version

v1.8.2

AWS Provider Version

v5.46.0

Affected Resource(s)

I try to create the following resource to build a connection ro BigQuery for AppFlow: (first question - is it right resource definition? cause there is no any example of how to use it with GCP)

resource "aws_appflow_connector_profile" "bigquery_profile" {
  name              = "${var.naming_prefix}-bigquery-profile"
  connector_type    = "CustomConnector"
  connector_label   = "BigQueryConnector"
  connection_mode   = "Public"

  connector_profile_config {

    connector_profile_credentials {
      custom_connector {
        authentication_type = "APIKEY"
        api_key {
          api_key = var.gcp_api_key
        }
      }
    }

    connector_profile_properties {
      custom_connector {
        profile_properties = {
          service_account_email = "<account email>"
          project_id            = "<project id>"
        }
      }
    }
  }
}

Expected Behavior

At least resource fails on some wrong configuration or even (in the best case scenario) works: the connector resource is successfully created

Actual Behavior

│ Error: creating AppFlow Connector Profile (axo-client-default-bigquery-profile): operation error Appflow: CreateConnectorProfile, https response error StatusCode: 404, RequestID: a7a43186-cc36-4b84-b8c3-de127740c3d5, api error ResourceNotFoundException: Connector:BigQueryConnector is not registered. Please register it first before creating ConnectorProfile.
│
│   with module.app_flow.aws_appflow_connector_profile.bigquery_profile,
│   on modules\app_flow\main.tf line 57, in resource "aws_appflow_connector_profile" "bigquery_profile":
│   57: resource "aws_appflow_connector_profile" "bigquery_profile" {
│

Relevant Error/Panic Output Snippet

│ Error: creating AppFlow Connector Profile (axo-client-default-bigquery-profile): operation error Appflow: CreateConnectorProfile, https response error StatusCode: 404, RequestID: a7a43186-cc36-4b84-b8c3-de127740c3d5, api error ResourceNotFoundException: Connector:BigQueryConnector is not registered. Please register it first before creating ConnectorProfile.
│
│   with module.app_flow.aws_appflow_connector_profile.bigquery_profile,
│   on modules\app_flow\main.tf line 57, in resource "aws_appflow_connector_profile" "bigquery_profile":
│   57: resource "aws_appflow_connector_profile" "bigquery_profile" {
│

Terraform Configuration Files

there is no specific configurations. The example is simple and contain just the resource itself

Steps to Reproduce

resource "aws_appflow_connector_profile" "bigquery_profile" {
  name              = "${var.naming_prefix}-bigquery-profile"
  connector_type    = "CustomConnector"
  connector_label   = "BigQueryConnector"
  connection_mode   = "Public"

  connector_profile_config {

    connector_profile_credentials {
      custom_connector {
        authentication_type = "APIKEY"
        api_key {
          api_key = var.gcp_api_key
        }
      }
    }

    connector_profile_properties {
      custom_connector {
        profile_properties = {
          service_account_email = "axo-gcp-aws-sa@symmetric-blade-424710-h3.iam.gserviceaccount.com"
          project_id            = "symmetric-blade-424710-h3"
        }
      }
    }
  }
}

Debug Output

No response

Panic Output

No response

Important Factoids

No response

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue