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.61k stars 9k forks source link

[Bug]: "EntityNotFoundException" error raised when calling resourceCatalogTableRead operation #35954

Open arssatavares opened 4 months ago

arssatavares commented 4 months ago

Terraform Core Version

1.6.6

AWS Provider Version

5.38.0,5.16.1, 5.52.0

Affected Resource(s)

resource "aws_glue_catalog_table"

Expected Behavior

The following action should run with no blockers:

resourceCatalogTableRead is able to read partition index when the table does not belong to the account's Data Catalog.

Actual Behavior

This issue is currently blocking us since version 5.16.1.

resourceCatalogTableRead is having some trouble reading table's partition index when the table does not belong to the account's Data Catalog.

│ Error: reading Glue Catalog Table (<OWN_ACCOUNT_ID>:<dataset_name>:<table_name>) partition indexes: EntityNotFoundException: Table <table_name> not found.
│ {
│   RespMetadata: {
│     StatusCode: 400,
│     RequestID: "209be9cf-a2fe-49d9-996b-3fe618eb2fd3"
│   },
│   Message_: "Table <table_name> not found."
│ }

Currently this is blocking any operations which imply reading the table:

We find out the issue is related with tables which resides in metadata database which does not belong to our account. Through Lake Formation we're able to share data lakes across accounts and each of our our databases are resource-links to a shared database in other account (and catalog id). Tables are successfully created and we can check them on the correct dataset - we're able to run queries and jobs on them.

The error is raised during the action GetPartitionIndexesWithContext since it is trying to get the table from a catalog ID equals to the current account ID but the table resides in the catalog id of the external account.

This was introduced with a fix regarding "_removal of metadata_location and tabletype when updating Iceberg tables" (https://github.com/hashicorp/terraform-provider-aws/issues/33374)

We strongly believe the issue is caused by the following changes:

image

Before, the action GetPartitionIndexesWithContext was taking as input the catalogID, dbName and name from the output of FindTableByName - which is our table. However, with the new code, since we're using the current account ID as catalog ID, we cannot find the table.

GetPartitionIndexesInput retrieves the partition indexes associated with a table and requires a database-name and a table-name. It is also possible to give it as input the catalog_id. Currently we're taking as input the current account as catalog_id:

aws glue get-partition-indexes --database-name <MyCatalogDatabase> --table-name <MyCatalogTable> --catalog-id <OWN_ACCOUNT_ID>

However if we pass the catalog_id of the original account it runs successfully

aws glue get-partition-indexes --database-name <MyCatalogDatabase> --table-name <MyCatalogTable> --catalog-id <ORIGINAL_CATALOG_ID>

This can also be observed on the debug output logs (you can check the complete logs on the section above):

  1. Provider requests (GetTable) with the following input: {"CatalogId":"663370797934","DatabaseName":"<DATABASE_NAME>","Name":"14465_<TABLE_NAME>"}
  2. Output is retrieved as: {"Table":{"CatalogId":"964290010106","CreateTime":1.708699485E9,"CreatedBy":"arn:aws:sts::663370797934:assumed-role/<ROLE_NAME>/terraform","DatabaseId":"bfc321ab80664a4bae12946acdc9e655","DatabaseName":"<DATABASE_NAME>","IsMultiDialectView":false,"IsRegisteredWithLakeFormation":false,"IsRowFilteringEnabled":false,"Name":"14465_<TABLE_NAME>","PartitionKeys":[],"Retention":0,"StorageDescriptor":{"BucketColumns":[],"Columns":[],"Compressed":false,"InputFormat":"","Location":"s3://scdl-dev-source/14465_<TABLE_NAME>/","NumberOfBuckets":0,"OutputFormat":"","Parameters":{},"SortColumns":[],"StoredAsSubDirectories":false},"UpdateTime":1.708699485E9,"VersionId":"0"}}
  3. AWSGlue.GetPartitionIndexes is called taking the same input as step 1): {"CatalogId":"663370797934","DatabaseName":"<DATABASE_NAME>","TableName":"14465_<TABLE_NAME>"}

Relevant Error/Panic Output Snippet

│ Error: reading Glue Catalog Table (<OWN_ACCOUNT_ID>:<dataset_name>:<table_name>) partition indexes: EntityNotFoundException: Table <table_name> not found.
│ {
│   RespMetadata: {
│     StatusCode: 400,
│     RequestID: "209be9cf-a2fe-49d9-996b-3fe618eb2fd3"
│   },
│   Message_: "Table <table_name> not found."
│ }

Terraform Configuration Files

resource "aws_glue_catalog_table" "semantic_table" {
name = var.asset_name database_name = var.dataset_config.dataset_id description = local.schema["description"] owner = var.global_config.project_name table_type = "EXTERNAL_TABLE"

parameters = local.table_properties["table_parameters"]

dynamic "partition_keys" { for_each = can(local.schema["partition_keys"]) == true ? local.schema["partition_keys"] : []

content {
  name    = partition_keys.value["name"]
  type    = partition_keys.value["type"]
  comment = partition_keys.value["description"]
}

}

storage_descriptor { input_format = local.table_properties["input_format"] location = local.table_properties["location"] output_format = local.table_properties["output_format"]

ser_de_info {
  parameters            = local.table_properties["serde_parameters"]
  serialization_library = local.table_properties["serialization_library"]
}

dynamic "columns" {
  for_each = local.schema["columns"]

  content {
    name    = columns.value["name"]
    type    = columns.value["type"]
    comment = columns.value["description"]
  }
}

} }

Steps to Reproduce

You order to proceed to this test, you may follow the next steps:

aws glue get-partition-indexes --database-name <MyCatalogDatabase> --table-name <MyCatalogTable> --catalog-id <OWN_ACCOUNT_ID>

which will fail with

An error occurred (EntityNotFoundException) when calling the GetPartitionIndexes operation: Table image_metadata not found.

And then you can run:

aws glue get-partition-indexes --database-name <MyCatalogDatabase> --table-name <MyCatalogTable> --catalog-id <ORIGINAL_CATALOG_ID>

which outputs:

{ "PartitionIndexDescriptorList": [] }

Debug Output

2024-02-23T14:44:44.080Z [DEBUG] created provider logger: level=debug
2024-02-23T14:44:44.080Z [INFO]  provider: configuring client automatic mTLS
2024-02-23T14:44:44.090Z [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.38.0/linux_amd64/terraform-provider-aws_v5.38.0_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/aws/5.38.0/linux_amd64/terraform-provider-aws_v5.38.0_x5"]
2024-02-23T14:44:44.090Z [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.38.0/linux_amd64/terraform-provider-aws_v5.38.0_x5 pid=30349
2024-02-23T14:44:44.090Z [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.38.0/linux_amd64/terraform-provider-aws_v5.38.0_x5
2024-02-23T14:44:44.205Z [INFO]  provider.terraform-provider-aws_v5.38.0_x5: configuring server automatic mTLS: timestamp=2024-02-23T14:44:44.205Z
2024-02-23T14:44:44.220Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: plugin address: network=unix address=/tmp/plugin420527702 timestamp=2024-02-23T14:44:44.220Z
2024-02-23T14:44:44.220Z [DEBUG] provider: using plugin: version=5
2024-02-23T14:44:44.353Z [INFO]  provider.terraform-provider-aws_v5.38.0_x5: assume_role configuration set: tf_aws.assume_role.role_arn=arn:aws:iam::663370797934:role/<ROLE_NAME> tf_aws.assume_role.session_name=terraform tf_mux_provider="*schema.GRPCProviderServer" tf_aws.assume_role.external_id="" tf_aws.assume_role.source_identity="" tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 @caller=github.com/hashicorp/terraform-provider-aws/internal/provider/provider.go:519 @module=aws tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ConfigureProvider timestamp=2024-02-23T14:44:44.353Z
2024-02-23T14:44:44.353Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Configuring Terraform AWS Provider: @module=aws tf_mux_provider="*schema.GRPCProviderServer" tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-aws/internal/conns/config.go:134 tf_provider_addr=registry.terraform.io/hashicorp/aws timestamp=2024-02-23T14:44:44.353Z
2024-02-23T14:44:44.353Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Resolving credentials provider: tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ConfigureProvider @module=aws.aws-base @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 timestamp=2024-02-23T14:44:44.353Z
2024-02-23T14:44:44.353Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Using profile: tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 tf_mux_provider="*schema.GRPCProviderServer" tf_aws.profile=CDHDevOps_877093050182 tf_aws.profile.source=envvar tf_provider_addr=registry.terraform.io/hashicorp/aws @module=aws.aws-base timestamp=2024-02-23T14:44:44.353Z
2024-02-23T14:44:44.353Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Loading configuration: tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 @module=aws.aws-base tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 timestamp=2024-02-23T14:44:44.353Z
2024-02-23T14:44:44.354Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Retrieving credentials: tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 @module=aws.aws-base tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 timestamp=2024-02-23T14:44:44.354Z
2024-02-23T14:44:44.354Z [INFO]  provider.terraform-provider-aws_v5.38.0_x5: Retrieved initial credentials: tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:39 tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 @module=aws.aws-base tf_aws.credentials_source="SharedConfigCredentials: /home/ctw01371/.aws/credentials" timestamp=2024-02-23T14:44:44.354Z
2024-02-23T14:44:44.354Z [INFO]  provider.terraform-provider-aws_v5.38.0_x5: Assuming IAM Role: tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:39 @module=aws.aws-base tf_aws.assume_role.external_id="" tf_aws.assume_role.role_arn=arn:aws:iam::663370797934:role/<ROLE_NAME> tf_provider_addr=registry.terraform.io/hashicorp/aws tf_mux_provider="*schema.GRPCProviderServer" tf_aws.assume_role.session_name=terraform tf_aws.assume_role.source_identity="" tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 timestamp=2024-02-23T14:44:44.354Z
2024-02-23T14:44:44.354Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Request Sent: http.request.header.amz_sdk_invocation_id=4239f942-53b2-48c7-8cea-341a85d284e9 http.request.header.x_amz_date=20240223T144444Z http.request_content_length=152 rpc.service=STS @module=aws.aws-base tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 http.url=https://sts.eu-west-1.amazonaws.com/ http.method=POST
  http.request.body=
  | Action=AssumeRole&DurationSeconds=900&RoleArn=arn%3Aaws%3Aiam%3A%3A663370797934%3Arole%2F<ROLE_NAME>&RoleSessionName=terraform&Version=2011-06-15
   tf_aws.signing_region="" tf_mux_provider="*schema.GRPCProviderServer" rpc.method=AssumeRole tf_aws.sdk=aws-sdk-go-v2 tf_rpc=ConfigureProvider http.request.header.amz_sdk_request="attempt=1; max=3" http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************4ACF/20240223/eu-west-1/sts/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=*****" http.request.header.x_amz_security_token="*****" net.peer.name=sts.eu-west-1.amazonaws.com aws.region=eu-west-1 http.request.header.content_type=application/x-www-form-urlencoded http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) terraform-provider-aws/5.38.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go-v2/1.25.1 os/linux lang/go#1.21.7 md/GOOS#linux md/GOARCH#amd64 api/sts#1.27.2" rpc.system=aws-api timestamp=2024-02-23T14:44:44.354Z
2024-02-23T14:44:44.607Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Response Received: http.response.header.content_type=text/xml http.response.header.x_amzn_requestid=c84a1e4d-0407-424d-a1cd-4b67626e9224 http.response_content_length=1443 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 aws.region=eu-west-1
  http.response.body=
  | <>
   tf_aws.sdk=aws-sdk-go-v2 tf_mux_provider="*schema.GRPCProviderServer" @module=aws.aws-base http.response.header.date="Fri, 23 Feb 2024 14:44:44 GMT" rpc.method=AssumeRole rpc.system=aws-api tf_aws.signing_region="" tf_provider_addr=registry.terraform.io/hashicorp/aws http.duration=251 http.status_code=200 rpc.service=STS tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 timestamp=2024-02-23T14:44:44.606Z
2024-02-23T14:44:44.607Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Request Sent:
  http.request.body=
  | Action=AssumeRole&DurationSeconds=900&RoleArn=arn%3Aaws%3Aiam%3A%3A663370797934%3Arole%2F<ROLE_NAME>&RoleSessionName=terraform&Version=2011-06-15
   http.request.header.amz_sdk_request="attempt=1; max=3" http.request_content_length=152 aws.region=eu-west-1 http.method=POST rpc.method=AssumeRole tf_aws.signing_region="" rpc.system=aws-api @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 http.request.header.amz_sdk_invocation_id=746fa942-c459-4d7c-b123-bf9782071af0 net.peer.name=sts.eu-west-1.amazonaws.com http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) terraform-provider-aws/5.38.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go-v2/1.25.1 os/linux lang/go#1.21.7 md/GOOS#linux md/GOARCH#amd64 api/sts#1.27.2" tf_aws.sdk=aws-sdk-go-v2 tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws @module=aws.aws-base http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************4ACF/20240223/eu-west-1/sts/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=*****" http.request.header.x_amz_security_token="*****" http.request.header.x_amz_date=20240223T144444Z tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 tf_rpc=ConfigureProvider http.request.header.content_type=application/x-www-form-urlencoded http.url=https://sts.eu-west-1.amazonaws.com/ rpc.service=STS timestamp=2024-02-23T14:44:44.607Z
2024-02-23T14:44:44.669Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Response Received: rpc.service=STS tf_mux_provider="*schema.GRPCProviderServer" tf_rpc=ConfigureProvider aws.region=eu-west-1 http.duration=61 http.status_code=200 rpc.method=AssumeRole tf_aws.sdk=aws-sdk-go-v2 tf_provider_addr=registry.terraform.io/hashicorp/aws http.response.header.content_type=text/xml http.response_content_length=1443
  http.response.body=<>
   http.response.header.date="Fri, 23 Feb 2024 14:44:44 GMT" rpc.system=aws-api tf_aws.signing_region="" @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 http.response.header.x_amzn_requestid=19d4a969-be7a-40f6-afc8-e533f10db50b tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 @module=aws.aws-base timestamp=2024-02-23T14:44:44.668Z
2024-02-23T14:44:44.669Z [INFO]  provider.terraform-provider-aws_v5.38.0_x5: Retrieved credentials: tf_aws.credentials_source=AssumeRoleProvider tf_mux_provider="*schema.GRPCProviderServer" tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:39 @module=aws.aws-base tf_provider_addr=registry.terraform.io/hashicorp/aws timestamp=2024-02-23T14:44:44.669Z
2024-02-23T14:44:44.669Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Loading configuration: tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 @module=aws.aws-base timestamp=2024-02-23T14:44:44.669Z
2024-02-23T14:44:44.669Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Creating AWS SDK v1 session: @module=aws tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-aws/internal/conns/config.go:158 tf_mux_provider="*schema.GRPCProviderServer" tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 timestamp=2024-02-23T14:44:44.669Z
2024-02-23T14:44:44.670Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Retrieving AWS account details: @caller=github.com/hashicorp/terraform-provider-aws/internal/conns/config.go:173 @module=aws tf_mux_provider="*schema.GRPCProviderServer" tf_rpc=ConfigureProvider tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 timestamp=2024-02-23T14:44:44.670Z
2024-02-23T14:44:44.670Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: Retrieving caller identity from STS: @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 @module=aws.aws-base tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 tf_rpc=ConfigureProvider timestamp=2024-02-23T14:44:44.670Z
2024-02-23T14:44:44.671Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Request Sent: http.request.header.x_amz_date=20240223T144444Z http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) terraform-provider-aws/5.38.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go-v2/1.25.1 os/linux lang/go#1.21.7 md/GOOS#linux md/GOARCH#amd64 api/sts#1.27.2" tf_provider_addr=registry.terraform.io/hashicorp/aws @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************AMIX/20240223/eu-west-1/sts/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=*****" tf_aws.sdk=aws-sdk-go-v2 tf_mux_provider="*schema.GRPCProviderServer" http.request.header.content_type=application/x-www-form-urlencoded net.peer.name=sts.eu-west-1.amazonaws.com http.url=https://sts.eu-west-1.amazonaws.com/ rpc.system=aws-api http.method=POST
  http.request.body=
  | Action=GetCallerIdentity&Version=2011-06-15
   tf_rpc=ConfigureProvider @module=aws.aws-base rpc.service=STS aws.region=eu-west-1 rpc.method=GetCallerIdentity http.request_content_length=43 tf_aws.signing_region="" http.request.header.amz_sdk_request="attempt=1; max=25" http.request.header.x_amz_security_token="*****" tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 http.request.header.amz_sdk_invocation_id=71c94010-7ee4-4089-ae78-0aac206d7fdc timestamp=2024-02-23T14:44:44.671Z
2024-02-23T14:44:44.904Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Response Received: @module=aws.aws-base http.response.header.x_amzn_requestid=1b50cb67-76ea-4437-a890-bcdb9139ebe9 tf_aws.sdk=aws-sdk-go-v2 tf_provider_addr=registry.terraform.io/hashicorp/aws @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:47 aws.region=eu-west-1 http.response.header.content_type=text/xml rpc.service=STS tf_aws.signing_region="" tf_mux_provider="*schema.GRPCProviderServer" tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 http.duration=232 http.response.header.date="Fri, 23 Feb 2024 14:44:44 GMT" http.response_content_length=443 rpc.method=GetCallerIdentity
  http.response.body=
  | <GetCallerIdentityResponse>
   http.status_code=200 rpc.system=aws-api tf_rpc=ConfigureProvider timestamp=2024-02-23T14:44:44.904Z
2024-02-23T14:44:44.904Z [INFO]  provider.terraform-provider-aws_v5.38.0_x5: Retrieved caller identity from STS: @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.48/logging/tf_logger.go:39 tf_rpc=ConfigureProvider @module=aws.aws-base tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=78780964-6223-3f7b-5467-1ec772555e98 timestamp=2024-02-23T14:44:44.904Z
2024-02-23T14:44:44.915Z [WARN]  Provider "registry.terraform.io/hashicorp/aws" produced an invalid plan for module.data.module.source.module.<SOURCE_MODULE>.module.<TABLE_NAME>.module.source[0].aws_glue_catalog_table.source_table, 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:
      - .partition_index: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
      - .storage_descriptor[0].columns: attribute representing nested block must not be unknown itself; set nested attribute values to unknown instead
module.data.module.source.module.<SOURCE_MODULE>.module.<TABLE_NAME>.module.source[0].aws_glue_catalog_table.source_table: Creating...
2024-02-23T14:44:44.915Z [INFO]  Starting apply for module.data.module.source.module.<SOURCE_MODULE>.module.<TABLE_NAME>.module.source[0].aws_glue_catalog_table.source_table
2024-02-23T14:44:44.916Z [DEBUG] module.data.module.source.module.<SOURCE_MODULE>.module.<TABLE_NAME>.module.source[0].aws_glue_catalog_table.source_table: applying the planned Create change
2024-02-23T14:44:44.917Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: [DEBUG] setting computed for "partition_index" from ComputedKeys
2024-02-23T14:44:44.917Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: [DEBUG] setting computed for "storage_descriptor.0.columns" from ComputedKeys
2024-02-23T14:44:44.917Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: [DEBUG] setting computed for "storage_descriptor.0.columns" from ComputedKeys
2024-02-23T14:44:44.918Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Request Sent:
  http.request.body=
  | {"CatalogId":"663370797934","DatabaseName":"<DATABASE_NAME>","PartitionIndexes":[],"TableInput":{"Name":"14465_<TABLE_NAME>","PartitionKeys":[],"StorageDescriptor":{"BucketColumns":[],"Columns":[],"Compressed":false,"InputFormat":"","Location":"s3://<BUCKET_NAME>/14465_<TABLE_NAME>/","NumberOfBuckets":0,"OutputFormat":"","Parameters":{},"SortColumns":[],"StoredAsSubDirectories":false}}}
   http.request.header.content_type=application/x-amz-json-1.1 http.request.header.x_amz_target=AWSGlue.CreateTable tf_rpc=ApplyResourceChange @module=aws http.url=https://glue.eu-west-1.amazonaws.com/ rpc.method=CreateTable rpc.service=Glue http.request.header.x_amz_security_token="*****" rpc.system=aws-api tf_req_id=0ccc28f7-6ef7-6834-0414-e16c3f028337 tf_resource_type=aws_glue_catalog_table http.flavor=1.1 http.request.header.x_amz_date=20240223T144444Z tf_provider_addr=registry.terraform.io/hashicorp/aws tf_aws.sdk=aws-sdk-go net.peer.name=glue.eu-west-1.amazonaws.com aws.region=eu-west-1 http.method=POST @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.49/logger.go:109 http.request_content_length=431 http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) terraform-provider-aws/5.38.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.50.23 (go1.21.7; linux; amd64)" tf_mux_provider="*schema.GRPCProviderServer" http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************AMIX/20240223/eu-west-1/glue/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" timestamp=2024-02-23T14:44:44.918Z
2024-02-23T14:44:45.344Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Response Received: tf_resource_type=aws_glue_catalog_table tf_rpc=ApplyResourceChange http.duration=426 http.response.header.x_amzn_requestid=3676662b-597a-4d8e-8cf1-949ac04e9e00 rpc.method=CreateTable rpc.system=aws-api @module=aws aws.region=eu-west-1 rpc.service=Glue tf_aws.sdk=aws-sdk-go
  http.response.body=
  | {}
   http.response.header.date="Fri, 23 Feb 2024 14:44:45 GMT" http.response_content_length=2 http.status_code=200 tf_req_id=0ccc28f7-6ef7-6834-0414-e16c3f028337 @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.49/logger.go:157 http.response.header.content_type=application/x-amz-json-1.1 tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws timestamp=2024-02-23T14:44:45.344Z
2024-02-23T14:44:45.344Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Request Sent: rpc.method=GetTable tf_aws.sdk=aws-sdk-go @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.49/logger.go:109 net.peer.name=glue.eu-west-1.amazonaws.com rpc.service=Glue aws.region=eu-west-1 http.flavor=1.1
  http.request.body=
  | {"CatalogId":"663370797934","DatabaseName":"<DATABASE_NAME>","Name":"14465_<TABLE_NAME>"}
   http.request_content_length=115 http.url=https://glue.eu-west-1.amazonaws.com/ tf_mux_provider="*schema.GRPCProviderServer" @module=aws tf_req_id=0ccc28f7-6ef7-6834-0414-e16c3f028337 tf_rpc=ApplyResourceChange tf_provider_addr=registry.terraform.io/hashicorp/aws http.request.header.content_type=application/x-amz-json-1.1 http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************AMIX/20240223/eu-west-1/glue/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" http.request.header.x_amz_security_token="*****" rpc.system=aws-api http.request.header.x_amz_date=20240223T144445Z http.request.header.x_amz_target=AWSGlue.GetTable http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) terraform-provider-aws/5.38.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.50.23 (go1.21.7; linux; amd64)" tf_resource_type=aws_glue_catalog_table http.method=POST timestamp=2024-02-23T14:44:45.344Z
2024-02-23T14:44:45.606Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Response Received: aws.region=eu-west-1 http.duration=260 http.response.header.x_amzn_requestid=f2051b75-a626-4506-9da6-26d574f099d4 http.response_content_length=713 @module=aws rpc.system=aws-api tf_req_id=0ccc28f7-6ef7-6834-0414-e16c3f028337 tf_rpc=ApplyResourceChange rpc.service=Glue tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws http.response.header.content_type=application/x-amz-json-1.1 http.status_code=200 rpc.method=GetTable http.response.header.date="Fri, 23 Feb 2024 14:44:45 GMT" tf_aws.sdk=aws-sdk-go tf_resource_type=aws_glue_catalog_table @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.49/logger.go:157
  http.response.body=
  | {"Table":{"CatalogId":"964290010106","CreateTime":1.708699485E9,"CreatedBy":"arn:aws:sts::663370797934:assumed-role/<ROLE_NAME>/terraform","DatabaseId":"bfc321ab80664a4bae12946acdc9e655","DatabaseName":"<DATABASE_NAME>","IsMultiDialectView":false,"IsRegisteredWithLakeFormation":false,"IsRowFilteringEnabled":false,"Name":"14465_<TABLE_NAME>","PartitionKeys":[],"Retention":0,"StorageDescriptor":{"BucketColumns":[],"Columns":[],"Compressed":false,"InputFormat":"","Location":"s3://<BUCKET_NAME>/14465_<TABLE_NAME>/","NumberOfBuckets":0,"OutputFormat":"","Parameters":{},"SortColumns":[],"StoredAsSubDirectories":false},"UpdateTime":1.708699485E9,"VersionId":"0"}}
   timestamp=2024-02-23T14:44:45.605Z
2024-02-23T14:44:45.606Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Request Sent: @module=aws http.request_content_length=120 rpc.system=aws-api tf_resource_type=aws_glue_catalog_table http.request.header.x_amz_date=20240223T144445Z tf_rpc=ApplyResourceChange http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************AMIX/20240223/eu-west-1/glue/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) terraform-provider-aws/5.38.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.50.23 (go1.21.7; linux; amd64)" tf_aws.sdk=aws-sdk-go http.method=POST http.request.header.x_amz_target=AWSGlue.GetPartitionIndexes aws.region=eu-west-1 http.flavor=1.1
  http.request.body=
  | {"CatalogId":"663370797934","DatabaseName":"<DATABASE_NAME>","TableName":"14465_<TABLE_NAME>"}
   net.peer.name=glue.eu-west-1.amazonaws.com @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.49/logger.go:109 tf_req_id=0ccc28f7-6ef7-6834-0414-e16c3f028337 rpc.service=Glue http.request.header.x_amz_security_token="*****" rpc.method=GetPartitionIndexes tf_mux_provider="*schema.GRPCProviderServer" http.url=https://glue.eu-west-1.amazonaws.com/ tf_provider_addr=registry.terraform.io/hashicorp/aws http.request.header.content_type=application/x-amz-json-1.1 timestamp=2024-02-23T14:44:45.606Z
2024-02-23T14:44:45.790Z [DEBUG] provider.terraform-provider-aws_v5.38.0_x5: HTTP Response Received: aws.region=eu-west-1
  http.response.body=
  | {"__type":"EntityNotFoundException","Message":"Table 14465_<TABLE_NAME> not found."}
   tf_rpc=ApplyResourceChange @module=aws http.response.header.x_amzn_requestid=dc362a16-5faf-4e69-80e0-895e09a75269 tf_req_id=0ccc28f7-6ef7-6834-0414-e16c3f028337 @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.49/logger.go:157 http.response.header.date="Fri, 23 Feb 2024 14:44:45 GMT" http.status_code=400 rpc.method=GetPartitionIndexes rpc.service=Glue rpc.system=aws-api tf_aws.sdk=aws-sdk-go http.duration=184 http.response.header.content_type=application/x-amz-json-1.1 http.response_content_length=98 tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_resource_type=aws_glue_catalog_table timestamp=2024-02-23T14:44:45.790Z
2024-02-23T14:44:45.791Z [ERROR] provider.terraform-provider-aws_v5.38.0_x5: Response contains error diagnostic: diagnostic_severity=ERROR tf_proto_version=5.4 @module=sdk.proto diagnostic_detail="" tf_req_id=0ccc28f7-6ef7-6834-0414-e16c3f028337 tf_resource_type=aws_glue_catalog_table
  diagnostic_summary=
  | reading Glue Catalog Table (663370797934:<DATABASE_NAME>:14465_<TABLE_NAME>) partition indexes: EntityNotFoundException: Table 14465_<TABLE_NAME> not found.
  | {
  |   RespMetadata: {
  |     StatusCode: 400,
  |     RequestID: "dc362a16-5faf-4e69-80e0-895e09a75269"
  |   },
  |   Message_: "Table 14465_<TABLE_NAME> not found."
  | }
   tf_rpc=ApplyResourceChange @caller=github.com/hashicorp/terraform-plugin-go@v0.21.0/tfprotov5/internal/diag/diagnostics.go:62 tf_provider_addr=registry.terraform.io/hashicorp/aws timestamp=2024-02-23T14:44:45.790Z
2024-02-23T14:44:45.791Z [DEBUG] State storage *remote.State declined to persist a state snapshot
2024-02-23T14:44:45.791Z [ERROR] vertex "module.data.module.source.module.<SOURCE_MODULE>.module.<TABLE_NAME>.module.source[0].aws_glue_catalog_table.source_table" error: reading Glue Catalog Table (663370797934:<DATABASE_NAME>:14465_<TABLE_NAME>) partition indexes: EntityNotFoundException: Table 14465_<TABLE_NAME> not found.
{
  RespMetadata: {
    StatusCode: 400,
    RequestID: "dc362a16-5faf-4e69-80e0-895e09a75269"
  },
  Message_: "Table 14465_<TABLE_NAME> not found."
}
2024-02-23T14:44:45.792Z [DEBUG] states/remote: state read serial is: 4; serial is: 4
2024-02-23T14:44:45.792Z [DEBUG] states/remote: state read lineage is: 24c62622-7aa5-6a60-ce93-16a46e35f579; lineage is: 24c62622-7aa5-6a60-ce93-16a46e35f579
2024-02-23T14:44:45.792Z [INFO]  backend-s3: Uploading remote state: tf_backend.operation=Put tf_backend.req_id=d911a36e-e035-0978-10c8-d23794ffbea5 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate
2024-02-23T14:44:45.792Z [DEBUG] backend-s3: HTTP Request Sent: aws.region=eu-west-1 aws.s3.bucket=scdl-terraform aws.s3.key=data/LOGAN-14465/terraform.tfstate rpc.method=PutObject rpc.service=S3 rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Put tf_backend.req_id=d911a36e-e035-0978-10c8-d23794ffbea5 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate http.request.header.x_amz_security_token="*****" http.request.header.x_amz_decoded_content_length=2743 http.request.header.amz_sdk_invocation_id=c0468869-1cbe-4305-bc8d-cc99db1ff213 http.request.header.accept_encoding=identity http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) aws-sdk-go-v2/1.24.0 os/linux lang/go#1.21.5 md/GOOS#linux md/GOARCH#amd64 api/s3#1.47.5 ft/s3-transfer" http.request_content_length=2823 http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************4ACF/20240223/eu-west-1/s3/aws4_request, SignedHeaders=accept-encoding;amz-sdk-invocation-id;content-encoding;content-length;content-type;host;x-amz-content-sha256;x-amz-date;x-amz-decoded-content-length;x-amz-sdk-checksum-algorithm;x-amz-security-token;x-amz-trailer, Signature=*****" http.request.header.x_amz_trailer=x-amz-checksum-sha256 http.request.header.x_amz_content_sha256=STREAMING-UNSIGNED-PAYLOAD-TRAILER http.request.header.amz_sdk_request="attempt=1; max=5" http.url=https://scdl-terraform.s3.eu-west-1.amazonaws.com/data/LOGAN-14465/terraform.tfstate?x-id=PutObject net.peer.name=scdl-terraform.s3.eu-west-1.amazonaws.com http.request.header.x_amz_sdk_checksum_algorithm=SHA256 http.request.header.content_type=application/json http.request.header.content_encoding=aws-chunked http.request.header.x_amz_date=20240223T144445Z http.request.body="[Redacted: 2.8 KB (2,823 bytes), Type: application/json]" http.method=PUT
2024-02-23T14:44:46.167Z [DEBUG] backend-s3: HTTP Response Received: aws.region=eu-west-1 aws.s3.bucket=scdl-terraform aws.s3.key=data/LOGAN-14465/terraform.tfstate rpc.method=PutObject rpc.service=S3 rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Put tf_backend.req_id=d911a36e-e035-0978-10c8-d23794ffbea5 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate http.response.header.date="Fri, 23 Feb 2024 14:44:47 GMT" http.response.header.server=AmazonS3 http.response.body="" http.duration=374 http.status_code=200 http.response.header.x_amz_id_2="xAnEj6gZg/y/1njR6yVm4ef++ht8Ui2AUXVkL1i9xuWQEyOduGzZrxi95g0wykIR/WcgWtfNomI=" http.response.header.x_amz_checksum_sha256="QmAmP2jldm6mo5lI+hzlF5h7fady7UgCDSIyLYxL8yg=" http.response.header.x_amz_request_id=S54PXNQSERFNDYPX http.response.header.etag="\"0a38c0247e7adee435fb0900f9209e76\"" http.response.header.x_amz_version_id=uUvhZC8_tspF5Y3NMvMgRc3KKX0Zf9S4 http.response.header.x_amz_server_side_encryption=AES256
2024-02-23T14:44:46.168Z [DEBUG] backend-s3: HTTP Request Sent: aws.dynamodb.table_names=["scdl-terraform"] aws.region=eu-west-1 db.system=dynamodb rpc.method=PutItem rpc.service=DynamoDB rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Put tf_backend.req_id=d911a36e-e035-0978-10c8-d23794ffbea5 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************4ACF/20240223/eu-west-1/dynamodb/aws4_request, SignedHeaders=accept-encoding;amz-sdk-invocation-id;content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" http.request.header.accept_encoding=identity http.request.header.amz_sdk_request="attempt=1; max=5" http.request.header.content_type=application/x-amz-json-1.0 http.request.header.x_amz_date=20240223T144446Z net.peer.name=dynamodb.eu-west-1.amazonaws.com http.request_content_length=160
  http.request.body=
  | {"Item":{"Digest":{"S":"0a38c0247e7adee435fb0900f9209e76"},"LockID":{"S":"scdl-terraform/data/LOGAN-14465/terraform.tfstate-md5"}},"TableName":"scdl-terraform"}
   http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) aws-sdk-go-v2/1.24.0 os/linux lang/go#1.21.5 md/GOOS#linux md/GOARCH#amd64 api/dynamodb#1.26.6" http.url=https://dynamodb.eu-west-1.amazonaws.com/ http.method=POST http.request.header.x_amz_target=DynamoDB_20120810.PutItem http.request.header.amz_sdk_invocation_id=f2539937-4bc2-4819-969a-adc507411f37 http.request.header.x_amz_security_token="*****"
2024-02-23T14:44:46.226Z [DEBUG] backend-s3: HTTP Response Received: aws.dynamodb.table_names=["scdl-terraform"] aws.region=eu-west-1 db.system=dynamodb rpc.method=PutItem rpc.service=DynamoDB rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.operation=Put tf_backend.req_id=d911a36e-e035-0978-10c8-d23794ffbea5 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate http.duration=58 http.response_content_length=2 http.response.header.x_amz_crc32=2745614147 http.response.header.server=Server http.response.header.x_amzn_requestid=K4EA1MDS1KINRT49CPIGSEBUVNVV4KQNSO5AEMVJF66Q9ASUAAJG http.status_code=200 http.response.header.date="Fri, 23 Feb 2024 14:44:46 GMT" http.response.header.content_type=application/x-amz-json-1.0 http.response.header.connection=keep-alive
  http.response.body=
  | {}

╷
│ Error: reading Glue Catalog Table (663370797934:<DATABASE_NAME>:14465_<TABLE_NAME>) partition indexes: EntityNotFoundException: Table 14465_<TABLE_NAME> not found.
│ {
│   RespMetadata: {
│     StatusCode: 400,
│     RequestID: "dc362a16-5faf-4e69-80e0-895e09a75269"
│   },
│   Message_: "Table 14465_<TABLE_NAME> not found."
│ }
│ 
│   with module.data.module.source.module.<SOURCE_MODULE>.module.<TABLE_NAME>.module.source[0].aws_glue_catalog_table.source_table,
│   on modules/source/table.tf line 1, in resource "aws_glue_catalog_table" "source_table":
│    1: resource "aws_glue_catalog_table" "source_table" {
│ 
╵
2024-02-23T14:44:46.227Z [INFO]  backend-s3: Unlocking remote state: tf_backend.lock.id=8147db74-d648-6985-1ee8-e1ca58930188 tf_backend.operation=Unlock tf_backend.req_id=f6107533-a37f-f260-7791-b3496ae33ba6 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate
2024-02-23T14:44:46.227Z [DEBUG] backend-s3: HTTP Request Sent: aws.dynamodb.consistent_read=true aws.dynamodb.projection="LockID, Info" aws.dynamodb.table_names=["scdl-terraform"] aws.region=eu-west-1 db.system=dynamodb rpc.method=GetItem rpc.service=DynamoDB rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.lock.id=8147db74-d648-6985-1ee8-e1ca58930188 tf_backend.operation=Unlock tf_backend.req_id=f6107533-a37f-f260-7791-b3496ae33ba6 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) aws-sdk-go-v2/1.24.0 os/linux lang/go#1.21.5 md/GOOS#linux md/GOARCH#amd64 api/dynamodb#1.26.6" http.request_content_length=165 http.request.header.amz_sdk_invocation_id=75f6a316-5e79-4d61-b057-17190009fe14
  http.request.body=
  | {"ConsistentRead":true,"Key":{"LockID":{"S":"scdl-terraform/data/LOGAN-14465/terraform.tfstate"}},"ProjectionExpression":"LockID, Info","TableName":"scdl-terraform"}
   http.request.header.amz_sdk_request="attempt=1; max=5" http.request.header.x_amz_date=20240223T144446Z http.request.header.x_amz_security_token="*****" http.request.header.x_amz_target=DynamoDB_20120810.GetItem http.url=https://dynamodb.eu-west-1.amazonaws.com/ net.peer.name=dynamodb.eu-west-1.amazonaws.com http.request.header.accept_encoding=identity http.request.header.content_type=application/x-amz-json-1.0 http.method=POST http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************4ACF/20240223/eu-west-1/dynamodb/aws4_request, SignedHeaders=accept-encoding;amz-sdk-invocation-id;content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****"
2024-02-23T14:44:46.297Z [DEBUG] backend-s3: HTTP Response Received: aws.dynamodb.consistent_read=true aws.dynamodb.projection="LockID, Info" aws.dynamodb.table_names=["scdl-terraform"] aws.region=eu-west-1 db.system=dynamodb rpc.method=GetItem rpc.service=DynamoDB rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.lock.id=8147db74-d648-6985-1ee8-e1ca58930188 tf_backend.operation=Unlock tf_backend.req_id=f6107533-a37f-f260-7791-b3496ae33ba6 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate http.duration=68 http.status_code=200 http.response.header.content_type=application/x-amz-json-1.0 http.response.header.connection=keep-alive http.response.header.server=Server http.response_content_length=354 http.response.header.x_amzn_requestid=4SLSBP1IGF30KLVKVP099F9MR3VV4KQNSO5AEMVJF66Q9ASUAAJG http.response.header.x_amz_crc32=3323232320 http.response.header.date="Fri, 23 Feb 2024 14:44:46 GMT"
  http.response.body=
  | {"Item":{"LockID":{"S":"scdl-terraform/data/LOGAN-14465/terraform.tfstate"},"Info":{"S":"{\"ID\":\"8147db74-d648-6985-1ee8-e1ca58930188\",\"Operation\":\"OperationTypeApply\",\"Info\":\"\",\"Who\":\"ctw01371@CTW-01371\",\"Version\":\"1.6.6\",\"Created\":\"2024-02-23T14:44:38.7959802Z\",\"Path\":\"scdl-terraform/data/LOGAN-14465/terraform.tfstate\"}"}}}

2024-02-23T14:44:46.297Z [DEBUG] backend-s3: HTTP Request Sent: aws.dynamodb.table_names=["scdl-terraform"] aws.region=eu-west-1 db.system=dynamodb rpc.method=DeleteItem rpc.service=DynamoDB rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.lock.id=8147db74-d648-6985-1ee8-e1ca58930188 tf_backend.operation=Unlock tf_backend.req_id=f6107533-a37f-f260-7791-b3496ae33ba6 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate net.peer.name=dynamodb.eu-west-1.amazonaws.com http.method=POST http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.6.6 (+https://www.terraform.io) aws-sdk-go-v2/1.24.0 os/linux lang/go#1.21.5 md/GOOS#linux md/GOARCH#amd64 api/dynamodb#1.26.6" http.request.header.x_amz_security_token="*****" http.request.header.amz_sdk_request="attempt=1; max=5" http.request.header.authorization="AWS4-HMAC-SHA256 Credential=ASIA************4ACF/20240223/eu-west-1/dynamodb/aws4_request, SignedHeaders=accept-encoding;amz-sdk-invocation-id;content-length;content-type;host;x-amz-date;x-amz-security-token;x-amz-target, Signature=*****" http.request.header.accept_encoding=identity http.request.header.content_type=application/x-amz-json-1.0
  http.request.body=
  | {"Key":{"LockID":{"S":"scdl-terraform/data/LOGAN-14465/terraform.tfstate"}},"TableName":"scdl-terraform"}
   http.url=https://dynamodb.eu-west-1.amazonaws.com/ http.request_content_length=105 http.request.header.x_amz_date=20240223T144446Z http.request.header.x_amz_target=DynamoDB_20120810.DeleteItem http.request.header.amz_sdk_invocation_id=e18d280e-3a9a-4c7d-a23c-6dc24d51ae1b
2024-02-23T14:44:46.354Z [DEBUG] backend-s3: HTTP Response Received: aws.dynamodb.table_names=["scdl-terraform"] aws.region=eu-west-1 db.system=dynamodb rpc.method=DeleteItem rpc.service=DynamoDB rpc.system=aws-api tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" tf_backend.lock.id=8147db74-d648-6985-1ee8-e1ca58930188 tf_backend.operation=Unlock tf_backend.req_id=f6107533-a37f-f260-7791-b3496ae33ba6 tf_backend.s3.bucket=scdl-terraform tf_backend.s3.path=data/LOGAN-14465/terraform.tfstate http.response.header.content_type=application/x-amz-json-1.0 http.duration=56 http.status_code=200 http.response_content_length=2 http.response.header.x_amz_crc32=2745614147 http.response.header.server=Server http.response.header.connection=keep-alive http.response.header.x_amzn_requestid=1NK5TF5O2RJJ1G50TH3BHGAJEVVV4KQNSO5AEMVJF66Q9ASUAAJG http.response.header.date="Fri, 23 Feb 2024 14:44:46 GMT"
  http.response.body=
  | {}

2024-02-23T14:44:46.354Z [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-02-23T14:44:46.356Z [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.38.0/linux_amd64/terraform-provider-aws_v5.38.0_x5 pid=30349
2024-02-23T14:44:46.357Z [DEBUG] provider: plugin exited

Panic Output

No response

Important Factoids

No response

References

34132 is a similar issue

Would you like to implement a fix?

As said before, I believe the changes on Fix removal of Parameters when updating Iceberg table Pull Request caused this issue.

Ths input for GetPartitionIndexesInput changes as you can see here: image

The suggestion would be to revert this change and get the CatalogId from the output of the previous action: GetTable

github-actions[bot] commented 4 months ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

cvanderhaar commented 3 weeks ago

Good day Just wondering if there is any progress on this issue as we are facing the same issue using TF 1.6.6 with AWS 5.32.1, also if I try version 5.16.0 for aws I get another issue

ChristianWeymannTNG commented 1 week ago

We have the same issue. The bug was introduced with a fix for iceberg tables by @ewbankkit, which we also need.

We were able to work around the issue by explicitly setting the catalog_id argument in the resource. However, this still feels like a regression and should be addressed.