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.76k stars 9.12k forks source link

[Bug]: Invalid dataSetArn error when creating a Quicksight data set #33568

Open DWatts15 opened 1 year ago

DWatts15 commented 1 year ago

Terraform Core Version

1.5.7

AWS Provider Version

5.17.0

Affected Resource(s)

aws_quicksight_data_set

Expected Behavior

The Terraform resource "aws_quicksight_data_set", given the required attributes, should create an AWS Quicksight dataset based on a given aws_quicksight_data_source.

Actual Behavior

The resource cannot be created due to an 'Invalid dataSetArn' error. The error implies that the data set itself has an invalid arn, which is preventing it from being created.

Relevant Error/Panic Output Snippet

Error: creating QuickSight Data Set: InvalidParameterValueException: Invalid dataSetArn
│ {
│   RespMetadata: {
│     StatusCode: 400,
│     RequestID: "a98718ad-80a6-49e8-a692-..."
│   },
│   Message_: "Invalid dataSetArn"
│ }
│ 
│   with aws_quicksight_data_set.example,
│   on aws_quicksight.tf line 24, in resource "aws_quicksight_data_set" "example":
│   24: resource "aws_quicksight_data_set" "example" {
│

Terraform Configuration Files

resource "aws_s3_bucket" "sample_data" {
  bucket = "testing-quicksight-dataset"
}

resource "aws_s3_bucket_object" "csv" {
    bucket = aws_s3_bucket.sample_data.bucket
    key = "business-operations-survey-2022-business-finance.csv"
    source = data.local_file.csv.filename
}

resource "aws_quicksight_data_source" "datasource" {
  data_source_id = "testdata"
  name           = "testdata"

  parameters {
    s3 {
      manifest_file_location {
        bucket = aws_s3_bucket.sample_data.id
        key    = "manifest.json"
      }
    }
  }

  type = "S3"
}

resource "aws_quicksight_data_set" "example" {
  data_set_id = aws_quicksight_data_source.datasource.id
  name        = "testdata"
  import_mode = "SPICE"

  physical_table_map {
    physical_table_map_id = "testdata"
    s3_source {
      data_source_arn = "${aws_quicksight_data_source.datasource.arn}"
      input_columns {
        name = "description"
        type = "STRING"
      }
      upload_settings {
        format    = "CSV"
        delimiter = ","
      }
    }
  }

  depends_on = [aws_quicksight_data_source.datasource]
}

Steps to Reproduce

terraform init
terraform apply

Debug Output

...
aws_s3_bucket_object.csv: Creating...
2023-09-21T15:14:53.708+0100 [INFO]  Starting apply for aws_s3_bucket_object.csv
2023-09-21T15:14:53.734+0100 [DEBUG] aws_s3_bucket_object.csv: applying the planned Create change
2023-09-21T15:14:53.735+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] setting computed for "tags_all" from ComputedKeys
2023-09-21T15:14:54.222+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: http.status_code=202 tf_mux_provider=*schema.GRPCProviderServer http.response.body="{"Arn":"arn:aws:quicksight:eu-west-2:777189825714:datasource/testdata","CreationStatus":"CREATION_IN_PROGRESS","DataSourceId":"testdata","RequestId":"265ece84-c164-4435-9098-9d83cd5e5ace"}
" aws.service=QuickSight tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=8024eced-8529-13b6-b003-b39641bff2df @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 aws.operation=CreateDataSource http.response.header.content_type=application/json http.response.header.date="Thu, 21 Sep 2023 14:14:55 GMT" http.response.header.x_amzn_requestid=265ece84-c164-4435-9098-9d83cd5e5ace tf_rpc=ApplyResourceChange http.duration=531 aws.region=eu-west-2 aws.sdk=aws-sdk-go tf_resource_type=aws_quicksight_data_source @module=aws timestamp=2023-09-21T15:14:54.221+0100
2023-09-21T15:14:54.222+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] Waiting for state to become: [CREATION_SUCCESSFUL]
2023-09-21T15:14:54.223+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Request Sent: @module=aws http.request.header.x_amz_date=20230921T141454Z tf_req_id=8024eced-8529-13b6-b003-b39641bff2df tf_rpc=ApplyResourceChange aws.region=eu-west-2 aws.service=QuickSight http.method=GET http.request.body= @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:96 aws.operation=DescribeDataSource tf_resource_type=aws_quicksight_data_source aws.sdk=aws-sdk-go http.url=https://quicksight.eu-west-2.amazonaws.com/accounts/777189825714/data-sources/testdata tf_provider_addr=registry.terraform.io/hashicorp/aws tf_mux_provider=*schema.GRPCProviderServer http.flavor=1.1 http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************WJ6L/20230921/eu-west-2/quicksight/aws4_request, SignedHeaders=host;x-amz-date, Signature=*****" http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.5.7 (+https://www.terraform.io) terraform-provider-aws/5.17.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.9 (go1.20.7; linux; amd64)" net.peer.name=quicksight.eu-west-2.amazonaws.com timestamp=2023-09-21T15:14:54.222+0100
2023-09-21T15:14:54.476+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] Waiting for state to become: [success]
2023-09-21T15:14:54.477+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Request Sent: http.request.header.x_amz_date=20230921T141454Z tf_provider_addr=registry.terraform.io/hashicorp/aws aws.sdk=aws-sdk-go http.request.body= http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************WJ6L/20230921/eu-west-2/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=*****" http.request.header.x_amz_content_sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 http.url=https://testing-quicksight-dataset.s3.eu-west-2.amazonaws.com/business-operations-survey-2022-business-finance.csv tf_mux_provider=*schema.GRPCProviderServer tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:96 @module=aws aws.region=eu-west-2 tf_req_id=ac552f2e-c331-65e1-a2d8-fa245010966d tf_resource_type=aws_s3_bucket_object aws.operation=HeadObject aws.service=S3 http.flavor=1.1 http.method=HEAD http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.5.7 (+https://www.terraform.io) terraform-provider-aws/5.17.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.9 (go1.20.7; linux; amd64)" net.peer.name=testing-quicksight-dataset.s3.eu-west-2.amazonaws.com timestamp=2023-09-21T15:14:54.477+0100
2023-09-21T15:14:54.500+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: aws.operation=HeadObject aws.service=S3 http.response.header.content_type=binary/octet-stream tf_resource_type=aws_s3_bucket_object @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 http.response.header.accept_ranges=bytes http.response.header.date="Thu, 21 Sep 2023 14:14:56 GMT" tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws http.response.header.last_modified="Thu, 21 Sep 2023 14:14:56 GMT" aws.region=eu-west-2 http.response.body= http.response.header.etag="78ad65a7f075dd396416c7619de9bbf0" http.response.header.server=AmazonS3 http.response.header.x_amz_id_2=XI0M3b6qVX8JLC0IefCbecAj1mMu7soL0mFJnU4m1XmE1BRRQyN6MMjylA837qUwcM6x9+NS3R8= http.response.header.x_amz_server_side_encryption=AES256 http.duration=22 http.response.header.x_amz_request_id=GFYTC70MVM3TERZ7 http.status_code=200 @module=aws aws.sdk=aws-sdk-go http.response_content_length=680782 tf_req_id=ac552f2e-c331-65e1-a2d8-fa245010966d tf_rpc=ApplyResourceChange timestamp=2023-09-21T15:14:54.500+0100
2023-09-21T15:14:54.501+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] Waiting for state to become: [success]
2023-09-21T15:14:54.501+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] Waiting for state to become: [success]
2023-09-21T15:14:54.502+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Request Sent: aws.sdk=aws-sdk-go http.url=https://testing-quicksight-dataset.s3.eu-west-2.amazonaws.com/business-operations-survey-2022-business-finance.csv?tagging= tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:96 aws.region=eu-west-2 http.request.body= tf_req_id=ac552f2e-c331-65e1-a2d8-fa245010966d @module=aws aws.operation=GetObjectTagging aws.service=S3 http.flavor=1.1 http.request.header.x_amz_content_sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 http.request.header.x_amz_date=20230921T141454Z http.method=GET http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************WJ6L/20230921/eu-west-2/s3/aws4_request, SignedHeaders=host;x-amz-content-sha256;x-amz-date, Signature=*****" http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.5.7 (+https://www.terraform.io) terraform-provider-aws/5.17.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.9 (go1.20.7; linux; amd64)" net.peer.name=testing-quicksight-dataset.s3.eu-west-2.amazonaws.com tf_resource_type=aws_s3_bucket_object timestamp=2023-09-21T15:14:54.502+0100
2023-09-21T15:14:54.526+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: @module=aws http.response.header.date="Thu, 21 Sep 2023 14:14:56 GMT" http.response.header.x_amz_id_2=ulwrNZxoZkS/0AJZG15eIpm9q4ciZuVblTnw5dlrkKxF8JVPcoPbEwiE/R6+w6TM/tKYunoe3Yw= http.response.header.x_amz_request_id=GFYZ1R0NYKPBP71A aws.operation=GetObjectTagging aws.region=eu-west-2 http.response.header.server=AmazonS3 tf_req_id=ac552f2e-c331-65e1-a2d8-fa245010966d http.duration=24 http.status_code=200 tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 aws.sdk=aws-sdk-go aws.service=S3 http.response.body="<?xml version="1.0" encoding="UTF-8"?>
<Tagging xmlns="http://s3.amazonaws.com/doc/2006-03-01/"><TagSet/></Tagging>
" tf_mux_provider=*schema.GRPCProviderServer tf_resource_type=aws_s3_bucket_object timestamp=2023-09-21T15:14:54.526+0100
2023-09-21T15:14:54.527+0100 [WARN]  Provider "provider[\"registry.terraform.io/hashicorp/aws\"]" produced an unexpected new value for aws_s3_bucket_object.csv, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .content_encoding: was null, but now cty.StringVal("")
      - .content_disposition: was null, but now cty.StringVal("")
      - .content_language: was null, but now cty.StringVal("")
      - .object_lock_mode: was null, but now cty.StringVal("")
      - .website_redirect: was null, but now cty.StringVal("")
      - .object_lock_retain_until_date: was null, but now cty.StringVal("")
      - .cache_control: was null, but now cty.StringVal("")
      - .object_lock_legal_hold_status: was null, but now cty.StringVal("")
aws_s3_bucket_object.csv: Creation complete after 1s [id=business-operations-survey-2022-business-finance.csv]
2023-09-21T15:14:54.625+0100 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2023-09-21T15:14:54.906+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: aws.region=eu-west-2 aws.service=QuickSight http.duration=682 http.response.header.content_type=application/json http.response.body="{"DataSource":{"AlternateDataSourceParameters":null,"Arn":"arn:aws:quicksight:eu-west-2:777189825714:datasource/testdata","CreatedTime":1.695305695063E9,"DataSourceId":"testdata","DataSourceParameters":{"AmazonElasticsearchParameters":null,"AmazonOpenSearchParameters":null,"AppFlowParameters":null,"AthenaParameters":null,"AuroraParameters":null,"AuroraPostgreSqlParameters":null,"AwsIotAnalyticsParameters":null,"BigQueryParameters":null,"DatabricksParameters":null,"Db2Parameters":null,"DenodoParameters":null,"DocumentDBParameters":null,"DremioParameters":null,"ExasolParameters":null,"GoogleAnalyticsParameters":null,"JiraParameters":null,"MariaDbParameters":null,"MongoAtlasParameters":null,"MongoDBParameters":null,"MySqlParameters":null,"OracleParameters":null,"PostgreSqlParameters":null,"PrestoParameters":null,"RdsParameters":null,"RedshiftParameters":null,"S3Parameters":{"IsUploaded":false,"ManifestFileLocation":{"Bucket":"testing-quicksight-dataset","Key":"manifest.json"},"RoleArn":null},"SalesforceParameters":null,"SapHanaParameters":null,"ServiceNowParameters":null,"SnowflakeParameters":null,"SparkParameters":null,"SqlServerParameters":null,"StarburstParameters":null,"TeradataParameters":null,"TrinoParameters":null,"TwitterParameters":null},"ErrorInfo":null,"LastUpdatedTime":1.695305695063E9,"Name":"testdata","SecretArn":null,"SslProperties":null,"Status":"CREATION_SUCCESSFUL","Type":"S3","VpcConnectionProperties":null},"RequestId":"0f44263d-6f2d-4997-b980-19c08c13b8fe"}
" http.response.header.date="Thu, 21 Sep 2023 14:14:55 GMT" http.response.header.x_amzn_requestid=0f44263d-6f2d-4997-b980-19c08c13b8fe tf_req_id=8024eced-8529-13b6-b003-b39641bff2df aws.sdk=aws-sdk-go http.status_code=200 tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 aws.operation=DescribeDataSource tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws tf_resource_type=aws_quicksight_data_source @module=aws timestamp=2023-09-21T15:14:54.905+0100
2023-09-21T15:14:54.907+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Request Sent: @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:96 aws.region=eu-west-2 http.request.header.x_amz_date=20230921T141454Z tf_mux_provider=*schema.GRPCProviderServer tf_resource_type=aws_quicksight_data_source aws.sdk=aws-sdk-go http.method=GET http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************WJ6L/20230921/eu-west-2/quicksight/aws4_request, SignedHeaders=host;x-amz-date, Signature=*****" http.url=https://quicksight.eu-west-2.amazonaws.com/accounts/777189825714/data-sources/testdata tf_rpc=ApplyResourceChange @module=aws net.peer.name=quicksight.eu-west-2.amazonaws.com tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=8024eced-8529-13b6-b003-b39641bff2df aws.operation=DescribeDataSource aws.service=QuickSight http.flavor=1.1 http.request.body= http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.5.7 (+https://www.terraform.io) terraform-provider-aws/5.17.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.9 (go1.20.7; linux; amd64)" timestamp=2023-09-21T15:14:54.906+0100
2023-09-21T15:14:55.398+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: aws.service=QuickSight http.response.body="{"DataSource":{"AlternateDataSourceParameters":null,"Arn":"arn:aws:quicksight:eu-west-2:777189825714:datasource/testdata","CreatedTime":1.695305695063E9,"DataSourceId":"testdata","DataSourceParameters":{"AmazonElasticsearchParameters":null,"AmazonOpenSearchParameters":null,"AppFlowParameters":null,"AthenaParameters":null,"AuroraParameters":null,"AuroraPostgreSqlParameters":null,"AwsIotAnalyticsParameters":null,"BigQueryParameters":null,"DatabricksParameters":null,"Db2Parameters":null,"DenodoParameters":null,"DocumentDBParameters":null,"DremioParameters":null,"ExasolParameters":null,"GoogleAnalyticsParameters":null,"JiraParameters":null,"MariaDbParameters":null,"MongoAtlasParameters":null,"MongoDBParameters":null,"MySqlParameters":null,"OracleParameters":null,"PostgreSqlParameters":null,"PrestoParameters":null,"RdsParameters":null,"RedshiftParameters":null,"S3Parameters":{"IsUploaded":false,"ManifestFileLocation":{"Bucket":"testing-quicksight-dataset","Key":"manifest.json"},"RoleArn":null},"SalesforceParameters":null,"SapHanaParameters":null,"ServiceNowParameters":null,"SnowflakeParameters":null,"SparkParameters":null,"SqlServerParameters":null,"StarburstParameters":null,"TeradataParameters":null,"TrinoParameters":null,"TwitterParameters":null},"ErrorInfo":null,"LastUpdatedTime":1.695305695063E9,"Name":"testdata","SecretArn":null,"SslProperties":null,"Status":"CREATION_SUCCESSFUL","Type":"S3","VpcConnectionProperties":null},"RequestId":"b9d50813-1dff-4eb4-b40e-99e8f6be8986"}
" http.response.header.date="Thu, 21 Sep 2023 14:14:56 GMT" http.response.header.x_amzn_requestid=b9d50813-1dff-4eb4-b40e-99e8f6be8986 tf_rpc=ApplyResourceChange aws.sdk=aws-sdk-go http.response.header.content_type=application/json tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=8024eced-8529-13b6-b003-b39641bff2df @module=aws aws.region=eu-west-2 http.status_code=200 http.duration=490 aws.operation=DescribeDataSource tf_resource_type=aws_quicksight_data_source @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 timestamp=2023-09-21T15:14:55.397+0100
2023-09-21T15:14:55.399+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Request Sent: http.url=https://quicksight.eu-west-2.amazonaws.com/accounts/777189825714/data-sources/testdata/permissions net.peer.name=quicksight.eu-west-2.amazonaws.com tf_resource_type=aws_quicksight_data_source http.method=GET http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************WJ6L/20230921/eu-west-2/quicksight/aws4_request, SignedHeaders=host;x-amz-date, Signature=*****" http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.5.7 (+https://www.terraform.io) terraform-provider-aws/5.17.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.9 (go1.20.7; linux; amd64)" tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws @module=aws aws.operation=DescribeDataSourcePermissions http.request.header.x_amz_date=20230921T141455Z tf_req_id=8024eced-8529-13b6-b003-b39641bff2df tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:96 aws.sdk=aws-sdk-go http.flavor=1.1 http.request.body= aws.region=eu-west-2 aws.service=QuickSight timestamp=2023-09-21T15:14:55.399+0100
2023-09-21T15:14:55.634+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: aws.operation=DescribeDataSourcePermissions aws.sdk=aws-sdk-go http.response.header.content_type=application/json http.response.header.x_amzn_requestid=e54f855c-5b8a-42c7-b701-1f86c24fa500 tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=8024eced-8529-13b6-b003-b39641bff2df @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 aws.region=eu-west-2 aws.service=QuickSight http.response.body="{"DataSourceArn":"arn:aws:quicksight:eu-west-2:777189825714:datasource/testdata","DataSourceId":"testdata","Permissions":[],"RequestId":"e54f855c-5b8a-42c7-b701-1f86c24fa500"}
" http.status_code=200 @module=aws http.duration=234 http.response.header.date="Thu, 21 Sep 2023 14:14:56 GMT" tf_resource_type=aws_quicksight_data_source tf_rpc=ApplyResourceChange timestamp=2023-09-21T15:14:55.633+0100
2023-09-21T15:14:55.635+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Request Sent: http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************WJ6L/20230921/eu-west-2/quicksight/aws4_request, SignedHeaders=host;x-amz-date, Signature=*****" net.peer.name=quicksight.eu-west-2.amazonaws.com tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:96 aws.region=eu-west-2 http.request.body= http.method=GET http.request.header.x_amz_date=20230921T141455Z tf_rpc=ApplyResourceChange @module=aws aws.service=QuickSight http.flavor=1.1 http.url=https://quicksight.eu-west-2.amazonaws.com/resources/arn%3Aaws%3Aquicksight%3Aeu-west-2%3A777189825714%3Adatasource%2Ftestdata/tags tf_resource_type=aws_quicksight_data_source aws.operation=ListTagsForResource aws.sdk=aws-sdk-go http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.5.7 (+https://www.terraform.io) terraform-provider-aws/5.17.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.9 (go1.20.7; linux; amd64)" tf_req_id=8024eced-8529-13b6-b003-b39641bff2df timestamp=2023-09-21T15:14:55.634+0100
2023-09-21T15:14:55.688+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: aws.sdk=aws-sdk-go http.duration=53 @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 http.response.body="{"RequestId":"30ee5b14-7126-4810-9c39-4411da8a4adb","Tags":[]}
" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=8024eced-8529-13b6-b003-b39641bff2df tf_resource_type=aws_quicksight_data_source @module=aws http.response.header.content_type=application/json tf_mux_provider=*schema.GRPCProviderServer tf_rpc=ApplyResourceChange aws.service=QuickSight http.response.header.date="Thu, 21 Sep 2023 14:14:56 GMT" http.response.header.x_amzn_requestid=30ee5b14-7126-4810-9c39-4411da8a4adb http.status_code=200 aws.operation=ListTagsForResource aws.region=eu-west-2 timestamp=2023-09-21T15:14:55.688+0100
aws_quicksight_data_source.datasource: Creation complete after 2s [id=777189825714/testdata]
2023-09-21T15:14:55.827+0100 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2023-09-21T15:14:55.864+0100 [WARN]  Provider "registry.terraform.io/hashicorp/aws" produced an invalid plan for aws_quicksight_data_set.example, but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .data_set_usage_configuration: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
      - .logical_table_map: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
aws_quicksight_data_set.example: Creating...
2023-09-21T15:14:55.864+0100 [INFO]  Starting apply for aws_quicksight_data_set.example
2023-09-21T15:14:55.868+0100 [DEBUG] aws_quicksight_data_set.example: applying the planned Create change
2023-09-21T15:14:55.879+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] setting computed for "logical_table_map" from ComputedKeys
2023-09-21T15:14:55.879+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] setting computed for "output_columns" from ComputedKeys
2023-09-21T15:14:55.879+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] setting computed for "tags_all" from ComputedKeys
2023-09-21T15:14:55.879+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: [DEBUG] setting computed for "data_set_usage_configuration" from ComputedKeys
2023-09-21T15:14:55.880+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Request Sent: aws.operation=CreateDataSet aws.sdk=aws-sdk-go http.method=POST http.request.header.x_amz_date=20230921T141455Z http.request_content_length=259 http.url=https://quicksight.eu-west-2.amazonaws.com/accounts/777189825714/data-sets tf_rpc=ApplyResourceChange http.request.body="{"DataSetId":"777189825714/testdata","ImportMode":"SPICE","Name":"testdata","PhysicalTableMap":{"testdata":{"S3Source":{"DataSourceArn":"arn:aws:quicksight:eu-west-2:777189825714:datasource/testdata","InputColumns":[{"Name":"description","Type":"STRING"}]}}}}
" http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************WJ6L/20230921/eu-west-2/quicksight/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date, Signature=*****" http.request.header.content_type=application/json net.peer.name=quicksight.eu-west-2.amazonaws.com tf_mux_provider=*schema.GRPCProviderServer tf_resource_type=aws_quicksight_data_set aws.region=eu-west-2 @module=aws aws.service=QuickSight http.flavor=1.1 http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.5.7 (+https://www.terraform.io) terraform-provider-aws/5.17.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.9 (go1.20.7; linux; amd64)" tf_req_id=dc89326f-6c55-6b89-f613-838fd6136ded @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:96 tf_provider_addr=registry.terraform.io/hashicorp/aws timestamp=2023-09-21T15:14:55.880+0100
2023-09-21T15:14:55.909+0100 [DEBUG] provider.terraform-provider-aws_v5.17.0_x5: HTTP Response Received: http.response.header.x_amzn_requestid=a98718ad-80a6-49e8-a692-97e86c7781bc aws.region=eu-west-2 http.duration=28 http.response.header.date="Thu, 21 Sep 2023 14:14:56 GMT" http.response.header.x_amzn_errortype=InvalidParameterValueException:http://internal.amazon.com/coral/com.amazonaws.services.quicksight.common/ tf_mux_provider=*schema.GRPCProviderServer tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=dc89326f-6c55-6b89-f613-838fd6136ded aws.service=QuickSight @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.36/logger.go:144 aws.sdk=aws-sdk-go http.response.header.content_type=application/json http.status_code=400 tf_rpc=ApplyResourceChange @module=aws aws.operation=CreateDataSet http.response.body="{"Message":"Invalid dataSetArn","RequestId":null}
" tf_resource_type=aws_quicksight_data_set timestamp=2023-09-21T15:14:55.908+0100
2023-09-21T15:14:55.909+0100 [ERROR] provider.terraform-provider-aws_v5.17.0_x5: Response contains error diagnostic: tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=dc89326f-6c55-6b89-f613-838fd6136ded diagnostic_detail= diagnostic_severity=ERROR diagnostic_summary="creating QuickSight Data Set: InvalidParameterValueException: Invalid dataSetArn
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "a98718ad-80a6-49e8-a692-97e86c7781bc"
  },
  Message_: "Invalid dataSetArn"
}" tf_proto_version=5.4 @caller=github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/internal/diag/diagnostics.go:58 @module=sdk.proto tf_resource_type=aws_quicksight_data_set tf_rpc=ApplyResourceChange timestamp=2023-09-21T15:14:55.909+0100
2023-09-21T15:14:56.039+0100 [DEBUG] State storage *statemgr.Filesystem declined to persist a state snapshot
2023-09-21T15:14:56.039+0100 [ERROR] vertex "aws_quicksight_data_set.example" error: creating QuickSight Data Set: InvalidParameterValueException: Invalid dataSetArn
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "a98718ad-80a6-49e8-a692-97e86c7781bc"
  },
  Message_: "Invalid dataSetArn"
}

Panic Output

No response

Important Factoids

Running Terraform 1.5.7 locally on Ubuntu 22.04.3.

I have also tried the equivalent Terraform configuration using the awscc provider and had the same error.

References

No response

Would you like to implement a fix?

None

github-actions[bot] commented 1 year ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

TakumiHaruta commented 1 year ago

I got the same error but the cause is aws_quicksight_data_source.datasource.id that contains a hyphen. If you use another value for data_set_id without a special character, this error should be resolved.

Reference: https://community.amazonquicksight.com/t/quicksight-cdk-is-failing-to-create-dataset-from-s3-datasource/15308/5