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]: escaped characters (\s or \\s) not rendered or rendering incorrectly for aws_glue_catalog_table Resources #37727

Open colinbjohnson opened 1 month ago

colinbjohnson commented 1 month ago

Terraform Core Version

1.8.4

AWS Provider Version

5.51.1_x5

Affected Resource(s)

Expected Behavior

An AWS Glue Catalog Table should be able to be rendered as follows:

CREATE EXTERNAL TABLE `table_render_with_one_slash`(
  `target_status_code_list` string COMMENT '')
ROW FORMAT SERDE 
  'org.apache.hadoop.hive.serde2.RegexSerDe' 
WITH SERDEPROPERTIES ( 
  'input.regex'='([^\s]+)') 
STORED AS INPUTFORMAT 
  'org.apache.hadoop.mapred.TextInputFormat' 
OUTPUTFORMAT 
  'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
LOCATION
  's3://bucket-not-exist/'
TBLPROPERTIES (
)

Actual Behavior

There is no way to render a table to the above description.

Relevant Error/Panic Output Snippet

No response

Terraform Configuration Files

# below is unable to render, throws the following error
# The symbol "s" is not a valid escape sequence selector.
# resource "aws_glue_catalog_table" "table_render_with_one_slash" {
#   name          = "table_render_with_one_slash"
#   database_name = "default"
# 
#   table_type = "EXTERNAL_TABLE"
# 
#   storage_descriptor {
#     location      = "s3://bucket-not-exist/"
#     input_format  = "org.apache.hadoop.mapred.TextInputFormat"
#     output_format = "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
#     ser_de_info {
#       serialization_library = "org.apache.hadoop.hive.serde2.RegexSerDe"
#       parameters = {
#         "input.regex"          = "([^\s]+)",
#         # "serialization.format" = 1
#       }
#     }
# 
#     columns {
#       name = "target_status_code_list"
#       type = "string"
#     }
#   }
# }

# the localfile below will te

resource "local_file" "file_render_with_one_slash" {
  content  = "File renders with only one slash \\s"
  filename = "file-renders-with-one-slash.txt"
}

resource "aws_glue_catalog_table" "table_render_with_expected_one_slash" {
  name          = "table_render_with_expected_one_slash"
  database_name = "default"

  table_type = "EXTERNAL_TABLE"

  storage_descriptor {
    location      = "s3://bucket-not-exist/"
    input_format  = "org.apache.hadoop.mapred.TextInputFormat"
    output_format = "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
    ser_de_info {
      serialization_library = "org.apache.hadoop.hive.serde2.RegexSerDe"
      parameters = {
        # note that the input.regex renders below renders with two slashes in AWS - this is not consistent
        # with the behavior of the localfile
        "input.regex"          = "([^\\s]+)",
        "serialization.format" = 1
      }
    }

    columns {
      name = "target_status_code_list"
      type = "string"
    }
  }
}

Steps to Reproduce

Run terraform apply and compare the output of:

Debug Output

2024-05-27T15:02:22.070-0700 [INFO]  Terraform version: 1.8.4
2024-05-27T15:02:22.070-0700 [DEBUG] using github.com/hashicorp/go-tfe v1.51.0
2024-05-27T15:02:22.070-0700 [DEBUG] using github.com/hashicorp/hcl/v2 v2.20.0
2024-05-27T15:02:22.070-0700 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2024-05-27T15:02:22.070-0700 [DEBUG] using github.com/zclconf/go-cty v1.14.3
2024-05-27T15:02:22.070-0700 [INFO]  Go runtime version: go1.22.1
2024-05-27T15:02:22.070-0700 [INFO]  CLI args: []string{"terraform184", "apply"}
2024-05-27T15:02:22.070-0700 [DEBUG] Attempting to open CLI config file: /Users/cjohnson/.terraformrc
2024-05-27T15:02:22.070-0700 [INFO]  Loading CLI configuration from /Users/cjohnson/.terraformrc
2024-05-27T15:02:22.070-0700 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2024-05-27T15:02:22.070-0700 [DEBUG] ignoring non-existing provider search directory /Users/cjohnson/.terraform.d/plugins
2024-05-27T15:02:22.070-0700 [DEBUG] ignoring non-existing provider search directory /Users/cjohnson/Library/Application Support/io.terraform/plugins
2024-05-27T15:02:22.071-0700 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2024-05-27T15:02:22.071-0700 [INFO]  CLI command args: []string{"apply"}
2024-05-27T15:02:22.071-0700 [DEBUG] New state was assigned lineage "fd2e1599-f513-d552-0173-1b62600ca1e3"
2024-05-27T15:02:22.328-0700 [DEBUG] checking for provisioner in "."
2024-05-27T15:02:22.328-0700 [DEBUG] checking for provisioner in "/usr/local/bin"
2024-05-27T15:02:22.329-0700 [INFO]  backend/local: starting Apply operation
2024-05-27T15:02:22.330-0700 [DEBUG] created provider logger: level=debug
2024-05-27T15:02:22.330-0700 [INFO]  provider: configuring client automatic mTLS
2024-05-27T15:02:22.336-0700 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5"]
2024-05-27T15:02:22.348-0700 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 pid=11435
2024-05-27T15:02:22.348-0700 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5
2024-05-27T15:02:22.431-0700 [INFO]  provider.terraform-provider-aws_v5.51.1_x5: configuring server automatic mTLS: timestamp=2024-05-27T15:02:22.430-0700
2024-05-27T15:02:22.437-0700 [DEBUG] provider: using plugin: version=5
2024-05-27T15:02:22.437-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: plugin address: address=/var/folders/18/0q103mqs44z_y7rc9hwxxw980000gn/T/plugin1093579380 network=unix timestamp=2024-05-27T15:02:22.436-0700
2024-05-27T15:02:22.834-0700 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-27T15:02:22.838-0700 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 pid=11435
2024-05-27T15:02:22.838-0700 [DEBUG] provider: plugin exited
2024-05-27T15:02:22.838-0700 [DEBUG] created provider logger: level=debug
2024-05-27T15:02:22.838-0700 [INFO]  provider: configuring client automatic mTLS
2024-05-27T15:02:22.840-0700 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5"]
2024-05-27T15:02:22.843-0700 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 pid=11436
2024-05-27T15:02:22.843-0700 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5
2024-05-27T15:02:22.852-0700 [INFO]  provider.terraform-provider-local_v2.5.1_x5: configuring server automatic mTLS: timestamp=2024-05-27T15:02:22.852-0700
2024-05-27T15:02:22.858-0700 [DEBUG] provider: using plugin: version=5
2024-05-27T15:02:22.858-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: plugin address: address=/var/folders/18/0q103mqs44z_y7rc9hwxxw980000gn/T/plugin2241343545 network=unix timestamp=2024-05-27T15:02:22.858-0700
2024-05-27T15:02:22.863-0700 [DEBUG] No provider meta schema returned
2024-05-27T15:02:22.864-0700 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-27T15:02:22.864-0700 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 pid=11436
2024-05-27T15:02:22.864-0700 [DEBUG] provider: plugin exited
2024-05-27T15:02:22.864-0700 [DEBUG] Building and walking validate graph
2024-05-27T15:02:22.864-0700 [DEBUG] adding implicit provider configuration provider["registry.terraform.io/hashicorp/aws"], implied first by aws_glue_catalog_table.table_render_with_expected_one_slash
2024-05-27T15:02:22.864-0700 [DEBUG] adding implicit provider configuration provider["registry.terraform.io/hashicorp/local"], implied first by local_file.file_render_with_one_slash
2024-05-27T15:02:22.865-0700 [DEBUG] ProviderTransformer: "aws_glue_catalog_table.table_render_with_expected_one_slash" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/hashicorp/aws"]
2024-05-27T15:02:22.865-0700 [DEBUG] ProviderTransformer: "local_file.file_render_with_one_slash" (*terraform.NodeValidatableResource) needs provider["registry.terraform.io/hashicorp/local"]
2024-05-27T15:02:22.865-0700 [DEBUG] ReferenceTransformer: "aws_glue_catalog_table.table_render_with_expected_one_slash" references: []
2024-05-27T15:02:22.865-0700 [DEBUG] ReferenceTransformer: "local_file.file_render_with_one_slash" references: []
2024-05-27T15:02:22.865-0700 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/aws\"]" references: []
2024-05-27T15:02:22.865-0700 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/local\"]" references: []
2024-05-27T15:02:22.865-0700 [DEBUG] Starting graph walk: walkValidate
2024-05-27T15:02:22.865-0700 [DEBUG] created provider logger: level=debug
2024-05-27T15:02:22.865-0700 [INFO]  provider: configuring client automatic mTLS
2024-05-27T15:02:22.868-0700 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5"]
2024-05-27T15:02:22.869-0700 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 pid=11437
2024-05-27T15:02:22.869-0700 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5
2024-05-27T15:02:22.876-0700 [INFO]  provider.terraform-provider-local_v2.5.1_x5: configuring server automatic mTLS: timestamp=2024-05-27T15:02:22.875-0700
2024-05-27T15:02:22.882-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: plugin address: address=/var/folders/18/0q103mqs44z_y7rc9hwxxw980000gn/T/plugin2496305361 network=unix timestamp=2024-05-27T15:02:22.882-0700
2024-05-27T15:02:22.882-0700 [DEBUG] provider: using plugin: version=5
2024-05-27T15:02:22.886-0700 [DEBUG] created provider logger: level=debug
2024-05-27T15:02:22.887-0700 [INFO]  provider: configuring client automatic mTLS
2024-05-27T15:02:22.889-0700 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5"]
2024-05-27T15:02:22.903-0700 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 pid=11438
2024-05-27T15:02:22.903-0700 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5
2024-05-27T15:02:22.988-0700 [INFO]  provider.terraform-provider-aws_v5.51.1_x5: configuring server automatic mTLS: timestamp=2024-05-27T15:02:22.987-0700
2024-05-27T15:02:22.994-0700 [DEBUG] provider: using plugin: version=5
2024-05-27T15:02:22.994-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: plugin address: address=/var/folders/18/0q103mqs44z_y7rc9hwxxw980000gn/T/plugin2653711848 network=unix timestamp=2024-05-27T15:02:22.993-0700
2024-05-27T15:02:23.000-0700 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-27T15:02:23.001-0700 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 pid=11437
2024-05-27T15:02:23.001-0700 [DEBUG] provider: plugin exited
2024-05-27T15:02:23.002-0700 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-27T15:02:23.005-0700 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 pid=11438
2024-05-27T15:02:23.005-0700 [DEBUG] provider: plugin exited
2024-05-27T15:02:23.005-0700 [INFO]  backend/local: apply calling Plan
2024-05-27T15:02:23.005-0700 [DEBUG] Building and walking plan graph for NormalMode
2024-05-27T15:02:23.005-0700 [DEBUG] adding implicit provider configuration provider["registry.terraform.io/hashicorp/aws"], implied first by aws_glue_catalog_table.table_render_with_expected_one_slash (expand)
2024-05-27T15:02:23.005-0700 [DEBUG] adding implicit provider configuration provider["registry.terraform.io/hashicorp/local"], implied first by local_file.file_render_with_one_slash (expand)
2024-05-27T15:02:23.005-0700 [DEBUG] ProviderTransformer: "aws_glue_catalog_table.table_render_with_expected_one_slash (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/hashicorp/aws"]
2024-05-27T15:02:23.005-0700 [DEBUG] ProviderTransformer: "local_file.file_render_with_one_slash (expand)" (*terraform.nodeExpandPlannableResource) needs provider["registry.terraform.io/hashicorp/local"]
2024-05-27T15:02:23.005-0700 [DEBUG] ReferenceTransformer: "local_file.file_render_with_one_slash (expand)" references: []
2024-05-27T15:02:23.005-0700 [DEBUG] ReferenceTransformer: "aws_glue_catalog_table.table_render_with_expected_one_slash (expand)" references: []
2024-05-27T15:02:23.005-0700 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/aws\"]" references: []
2024-05-27T15:02:23.005-0700 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/local\"]" references: []
2024-05-27T15:02:23.005-0700 [DEBUG] Starting graph walk: walkPlan
2024-05-27T15:02:23.006-0700 [DEBUG] created provider logger: level=debug
2024-05-27T15:02:23.006-0700 [INFO]  provider: configuring client automatic mTLS
2024-05-27T15:02:23.008-0700 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5"]
2024-05-27T15:02:23.021-0700 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 pid=11439
2024-05-27T15:02:23.021-0700 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5
2024-05-27T15:02:23.105-0700 [INFO]  provider.terraform-provider-aws_v5.51.1_x5: configuring server automatic mTLS: timestamp=2024-05-27T15:02:23.105-0700
2024-05-27T15:02:23.111-0700 [DEBUG] provider: using plugin: version=5
2024-05-27T15:02:23.111-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: plugin address: address=/var/folders/18/0q103mqs44z_y7rc9hwxxw980000gn/T/plugin1362761392 network=unix timestamp=2024-05-27T15:02:23.111-0700
2024-05-27T15:02:23.116-0700 [DEBUG] created provider logger: level=debug
2024-05-27T15:02:23.116-0700 [INFO]  provider: configuring client automatic mTLS
2024-05-27T15:02:23.119-0700 [DEBUG] provider: starting plugin: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 args=[".terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5"]
2024-05-27T15:02:23.120-0700 [DEBUG] provider: plugin started: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 pid=11440
2024-05-27T15:02:23.120-0700 [DEBUG] provider: waiting for RPC address: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5
2024-05-27T15:02:23.126-0700 [INFO]  provider.terraform-provider-local_v2.5.1_x5: configuring server automatic mTLS: timestamp=2024-05-27T15:02:23.126-0700
2024-05-27T15:02:23.132-0700 [DEBUG] provider: using plugin: version=5
2024-05-27T15:02:23.132-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: plugin address: address=/var/folders/18/0q103mqs44z_y7rc9hwxxw980000gn/T/plugin601713138 network=unix timestamp=2024-05-27T15:02:23.132-0700
2024-05-27T15:02:23.139-0700 [DEBUG] ReferenceTransformer: "local_file.file_render_with_one_slash" references: []
local_file.file_render_with_one_slash: Refreshing state... [id=cf64c302425907e69433d6490c2b85d0dcbeaf6c]
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: @module=sdk.framework tf_attribute_path=content_sha256 tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 tf_provider_addr=registry.terraform.io/hashicorp/local tf_resource_type=local_file timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_resource_type=local_file @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 tf_attribute_path=content tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/local tf_rpc=ReadResource timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_provider_addr=registry.terraform.io/hashicorp/local tf_attribute_path=content_md5 @module=sdk.framework tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_resource_type=local_file tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_attribute_path=directory_permission @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/local tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_resource_type=local_file @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 tf_rpc=ReadResource timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_resource_type=local_file tf_rpc=ReadResource @module=sdk.framework tf_attribute_path=content_base64sha256 tf_provider_addr=registry.terraform.io/hashicorp/local timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_provider_addr=registry.terraform.io/hashicorp/local tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 tf_attribute_path=content_base64sha512 @module=sdk.framework tf_resource_type=local_file tf_rpc=ReadResource timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_resource_type=local_file tf_rpc=ReadResource tf_provider_addr=registry.terraform.io/hashicorp/local @module=sdk.framework tf_attribute_path=file_permission tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.141-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_attribute_path=id tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_resource_type=local_file tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/local timestamp=2024-05-27T15:02:23.141-0700
2024-05-27T15:02:23.142-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/local tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 tf_attribute_path=content_sha512 tf_resource_type=local_file timestamp=2024-05-27T15:02:23.142-0700
2024-05-27T15:02:23.142-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_attribute_path=filename tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_resource_type=local_file tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 @module=sdk.framework tf_provider_addr=registry.terraform.io/hashicorp/local timestamp=2024-05-27T15:02:23.142-0700
2024-05-27T15:02:23.142-0700 [DEBUG] provider.terraform-provider-local_v2.5.1_x5: Value switched to prior value due to semantic equality logic: tf_attribute_path=content_sha1 tf_provider_addr=registry.terraform.io/hashicorp/local tf_rpc=ReadResource @caller=github.com/hashicorp/terraform-plugin-framework@v1.6.1/internal/fwschemadata/value_semantic_equality.go:85 @module=sdk.framework tf_req_id=23fda82f-704e-8564-7340-c1ef90d165c9 tf_resource_type=local_file timestamp=2024-05-27T15:02:23.142-0700
2024-05-27T15:02:23.145-0700 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-27T15:02:23.146-0700 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/local/2.5.1/darwin_arm64/terraform-provider-local_v2.5.1_x5 pid=11440
2024-05-27T15:02:23.146-0700 [DEBUG] provider: plugin exited
2024-05-27T15:02:23.177-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Configuring Terraform AWS Provider: tf_rpc=ConfigureProvider @module=aws tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 @caller=github.com/hashicorp/terraform-provider-aws/internal/conns/config.go:147 tf_mux_provider="*schema.GRPCProviderServer" timestamp=2024-05-27T15:02:23.176-0700
2024-05-27T15:02:23.177-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Resolving credentials provider: @module=aws.aws-base tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:47 timestamp=2024-05-27T15:02:23.177-0700
2024-05-27T15:02:23.177-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Using profile: @module=aws.aws-base tf_aws.profile.source=envvar 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.53/logging/tf_logger.go:47 tf_aws.profile=cloudavail-sandbox tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 timestamp=2024-05-27T15:02:23.177-0700
2024-05-27T15:02:23.177-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Loading configuration: tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:47 @module=aws.aws-base timestamp=2024-05-27T15:02:23.177-0700
2024-05-27T15:02:23.177-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Retrieving credentials: @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:47 tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ConfigureProvider @module=aws.aws-base tf_mux_provider="*schema.GRPCProviderServer" tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 timestamp=2024-05-27T15:02:23.177-0700
2024-05-27T15:02:23.177-0700 [INFO]  provider.terraform-provider-aws_v5.51.1_x5: Retrieved credentials: tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 tf_rpc=ConfigureProvider tf_aws.credentials_source="SharedConfigCredentials: /Users/cjohnson/.aws/credentials" tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:39 @module=aws.aws-base timestamp=2024-05-27T15:02:23.177-0700
2024-05-27T15:02:23.177-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Loading configuration: 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.53/logging/tf_logger.go:47 @module=aws.aws-base tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 timestamp=2024-05-27T15:02:23.177-0700
2024-05-27T15:02:23.177-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Creating AWS SDK v1 session: tf_mux_provider="*schema.GRPCProviderServer" tf_rpc=ConfigureProvider @caller=github.com/hashicorp/terraform-provider-aws/internal/conns/config.go:171 @module=aws tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 timestamp=2024-05-27T15:02:23.177-0700
2024-05-27T15:02:23.178-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Retrieving AWS account details: @caller=github.com/hashicorp/terraform-provider-aws/internal/conns/config.go:186 tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 @module=aws tf_rpc=ConfigureProvider timestamp=2024-05-27T15:02:23.178-0700
2024-05-27T15:02:23.178-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: Retrieving caller identity from STS: tf_mux_provider="*schema.GRPCProviderServer" tf_rpc=ConfigureProvider @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:47 @module=aws.aws-base tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 timestamp=2024-05-27T15:02:23.178-0700
2024-05-27T15:02:23.178-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: HTTP Request Sent: tf_rpc=ConfigureProvider
  http.request.body=
  | Action=GetCallerIdentity&Version=2011-06-15
   http.request.header.content_type=application/x-www-form-urlencoded http.request.header.x_amz_date=20240527T220223Z net.peer.name=sts.us-west-2.amazonaws.com rpc.service=STS tf_provider_addr=registry.terraform.io/hashicorp/aws http.request.header.amz_sdk_invocation_id=4805d5ad-eb74-4d73-9f0e-32f08fc54ca2 http.request_content_length=43 rpc.method=GetCallerIdentity http.method=POST http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.8.4 (+https://www.terraform.io) terraform-provider-aws/5.51.1 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go-v2/1.27.0 os/macos lang/go#1.22.2 md/GOOS#darwin md/GOARCH#arm64 api/sts#1.28.9" tf_aws.signing_region="" rpc.system=aws-api @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:47 @module=aws.aws-base aws.region=us-west-2 http.request.header.amz_sdk_request="attempt=1; max=25" http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************X5WD/20240527/us-west-2/sts/aws4_request, SignedHeaders=amz-sdk-invocation-id;amz-sdk-request;content-length;content-type;host;x-amz-date, Signature=*****" http.url=https://sts.us-west-2.amazonaws.com/ tf_aws.sdk=aws-sdk-go-v2 tf_mux_provider="*schema.GRPCProviderServer" tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 timestamp=2024-05-27T15:02:23.178-0700
2024-05-27T15:02:23.448-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: HTTP Response Received: @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:47 @module=aws.aws-base http.response.header.x_amzn_requestid=f5a04c11-b28a-41cd-b6a0-04b1623f25f5 http.response_content_length=417 http.response.header.content_type=text/xml rpc.system=aws-api tf_rpc=ConfigureProvider tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 http.duration=269
  http.response.body=
  | <GetCallerIdentityResponse xmlns="https://sts.amazonaws.com/doc/2011-06-15/">
  |   <GetCallerIdentityResult>
  |     <Arn>arn:aws:iam::662873535098:user/colin@cloudavail.com</Arn>
  |     <UserId>AIDA*************XND4</UserId>
  |     <Account>662873535098</Account>
  |   </GetCallerIdentityResult>
  |   <ResponseMetadata>
  |     <RequestId>f5a04c11-b28a-41cd-b6a0-04b1623f25f5</RequestId>
  |   </ResponseMetadata>
  | </GetCallerIdentityResponse>
   rpc.method=GetCallerIdentity rpc.service=STS tf_aws.sdk=aws-sdk-go-v2 tf_aws.signing_region="" aws.region=us-west-2 http.response.header.date="Mon, 27 May 2024 22:02:22 GMT" http.status_code=200 timestamp=2024-05-27T15:02:23.448-0700
2024-05-27T15:02:23.449-0700 [INFO]  provider.terraform-provider-aws_v5.51.1_x5: Retrieved caller identity from STS: @module=aws.aws-base tf_mux_provider="*schema.GRPCProviderServer" @caller=github.com/hashicorp/aws-sdk-go-base/v2@v2.0.0-beta.53/logging/tf_logger.go:39 tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=e338135f-a1e4-f1dd-dc5e-f7c25ef844a1 tf_rpc=ConfigureProvider timestamp=2024-05-27T15:02:23.448-0700
2024-05-27T15:02:23.454-0700 [DEBUG] ReferenceTransformer: "aws_glue_catalog_table.table_render_with_expected_one_slash" references: []
aws_glue_catalog_table.table_render_with_expected_one_slash: Refreshing state... [id=662873535098:default:table_render_with_expected_one_slash]
2024-05-27T15:02:23.464-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: HTTP Request Sent: http.request.header.x_amz_target=AWSGlue.GetTable http.url=https://glue.us-west-2.amazonaws.com/ rpc.system=aws-api http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.8.4 (+https://www.terraform.io) terraform-provider-aws/5.51.1 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.53.8 (go1.22.2; darwin; arm64)" rpc.service=Glue tf_mux_provider="*schema.GRPCProviderServer" tf_provider_addr=registry.terraform.io/hashicorp/aws aws.region=us-west-2 http.flavor=1.1
  http.request.body=
  | {"CatalogId":"662873535098","DatabaseName":"default","Name":"table_render_with_expected_one_slash"}
   tf_req_id=2d740f64-ab8a-9a91-4eda-9d0279a9a421 net.peer.name=glue.us-west-2.amazonaws.com rpc.method=GetTable tf_aws.sdk=aws-sdk-go tf_rpc=ReadResource http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************X5WD/20240527/us-west-2/glue/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target, Signature=*****" http.request.header.x_amz_date=20240527T220223Z http.request_content_length=99 http.request.header.content_type=application/x-amz-json-1.1 tf_resource_type=aws_glue_catalog_table @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.54/logger.go:109 @module=aws http.method=POST timestamp=2024-05-27T15:02:23.464-0700
2024-05-27T15:02:23.730-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: HTTP Response Received:
  http.response.body=
  | {"Table":{"CatalogId":"662873535098","CreateTime":1.716847317E9,"CreatedBy":"arn:aws:iam::662873535098:user/colin@cloudavail.com","DatabaseId":"6c1650f07dc4431ea3a3c05f9e5cfa66","DatabaseName":"default","IsMultiDialectView":false,"IsRegisteredWithLakeFormation":false,"IsRowFilteringEnabled":false,"Name":"table_render_with_expected_one_slash","PartitionKeys":[],"Retention":0,"StorageDescriptor":{"BucketColumns":[],"Columns":[{"Comment":"","Name":"target_status_code_list","Parameters":{},"Type":"string"}],"Compressed":false,"InputFormat":"org.apache.hadoop.mapred.TextInputFormat","Location":"s3://bucket-not-exist/","NumberOfBuckets":0,"OutputFormat":"org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat","Parameters":{},"SerdeInfo":{"Parameters":{"serialization.format":"1","input.regex":"([^\\s]+)"},"SerializationLibrary":"org.apache.hadoop.hive.serde2.RegexSerDe"},"SortColumns":[],"StoredAsSubDirectories":false},"TableType":"EXTERNAL_TABLE","UpdateTime":1.716847317E9,"VersionId":"0"}}
   rpc.service=Glue tf_resource_type=aws_glue_catalog_table rpc.system=aws-api tf_mux_provider="*schema.GRPCProviderServer" tf_aws.sdk=aws-sdk-go @module=aws aws.region=us-west-2 http.response.header.date="Mon, 27 May 2024 22:02:23 GMT" http.response_content_length=1003 http.status_code=200 rpc.method=GetTable tf_provider_addr=registry.terraform.io/hashicorp/aws @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.54/logger.go:157 http.duration=265 http.response.header.content_type=application/x-amz-json-1.1 http.response.header.x_amzn_requestid=85f21153-0501-46d1-9be2-807139306a6c tf_req_id=2d740f64-ab8a-9a91-4eda-9d0279a9a421 tf_rpc=ReadResource timestamp=2024-05-27T15:02:23.729-0700
2024-05-27T15:02:23.731-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: HTTP Request Sent: rpc.system=aws-api tf_provider_addr=registry.terraform.io/hashicorp/aws
  http.request.body=
  | {"CatalogId":"662873535098","DatabaseName":"default","TableName":"table_render_with_expected_one_slash"}
   http.request.header.content_type=application/x-amz-json-1.1 http.request.header.x_amz_target=AWSGlue.GetPartitionIndexes rpc.method=GetPartitionIndexes tf_resource_type=aws_glue_catalog_table http.url=https://glue.us-west-2.amazonaws.com/ tf_aws.sdk=aws-sdk-go @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.54/logger.go:109 @module=aws http.flavor=1.1 http.request.header.authorization="AWS4-HMAC-SHA256 Credential=AKIA************X5WD/20240527/us-west-2/glue/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-target, Signature=*****" http.request_content_length=104 tf_mux_provider="*schema.GRPCProviderServer" aws.region=us-west-2 http.method=POST http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.8.4 (+https://www.terraform.io) terraform-provider-aws/5.51.1 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.53.8 (go1.22.2; darwin; arm64)" net.peer.name=glue.us-west-2.amazonaws.com rpc.service=Glue http.request.header.x_amz_date=20240527T220223Z tf_req_id=2d740f64-ab8a-9a91-4eda-9d0279a9a421 tf_rpc=ReadResource timestamp=2024-05-27T15:02:23.731-0700
2024-05-27T15:02:23.885-0700 [WARN]  Provider "registry.terraform.io/hashicorp/aws" produced an unexpected new value for aws_glue_catalog_table.table_render_with_expected_one_slash during refresh.
      - .parameters: was null, but now cty.MapValEmpty(cty.String)
      - .storage_descriptor[0].parameters: was null, but now cty.MapValEmpty(cty.String)
      - .storage_descriptor[0].bucket_columns: was null, but now cty.ListValEmpty(cty.String)
      - .storage_descriptor[0].columns[0].parameters: was null, but now cty.MapValEmpty(cty.String)
2024-05-27T15:02:23.885-0700 [DEBUG] provider.terraform-provider-aws_v5.51.1_x5: HTTP Response Received: http.response.header.date="Mon, 27 May 2024 22:02:23 GMT" http.response.header.x_amzn_requestid=3da79f15-0535-42cd-92d8-0c2a4b8ad64a http.response_content_length=35 rpc.method=GetPartitionIndexes tf_req_id=2d740f64-ab8a-9a91-4eda-9d0279a9a421 tf_resource_type=aws_glue_catalog_table
  http.response.body=
  | {"PartitionIndexDescriptorList":[]}
   http.response.header.content_type=application/x-amz-json-1.1 rpc.service=Glue rpc.system=aws-api tf_provider_addr=registry.terraform.io/hashicorp/aws @module=aws aws.region=us-west-2 http.duration=149 tf_rpc=ReadResource http.status_code=200 tf_aws.sdk=aws-sdk-go tf_mux_provider="*schema.GRPCProviderServer" @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.54/logger.go:157 timestamp=2024-05-27T15:02:23.881-0700
2024-05-27T15:02:23.891-0700 [WARN]  Provider "registry.terraform.io/hashicorp/aws" produced an invalid plan for aws_glue_catalog_table.table_render_with_expected_one_slash, 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:
      - .owner: planned value cty.StringVal("") for a non-computed attribute
      - .view_expanded_text: planned value cty.StringVal("") for a non-computed attribute
      - .parameters: planned value cty.MapValEmpty(cty.String) for a non-computed attribute
      - .retention: planned value cty.NumberIntVal(0) for a non-computed attribute
      - .view_original_text: planned value cty.StringVal("") for a non-computed attribute
      - .description: planned value cty.StringVal("") for a non-computed attribute
      - .storage_descriptor[0].stored_as_sub_directories: planned value cty.False for a non-computed attribute
      - .storage_descriptor[0].bucket_columns: planned value cty.ListValEmpty(cty.String) for a non-computed attribute
      - .storage_descriptor[0].compressed: planned value cty.False for a non-computed attribute
      - .storage_descriptor[0].number_of_buckets: planned value cty.NumberIntVal(0) for a non-computed attribute
      - .storage_descriptor[0].parameters: planned value cty.MapValEmpty(cty.String) for a non-computed attribute
      - .storage_descriptor[0].ser_de_info[0].name: planned value cty.StringVal("") for a non-computed attribute
      - .storage_descriptor[0].columns[0].comment: planned value cty.StringVal("") for a non-computed attribute
      - .storage_descriptor[0].columns[0].parameters: planned value cty.MapValEmpty(cty.String) for a non-computed attribute
2024-05-27T15:02:23.893-0700 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2024-05-27T15:02:23.902-0700 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/hashicorp/aws/5.51.1/darwin_arm64/terraform-provider-aws_v5.51.1_x5 pid=11439
2024-05-27T15:02:23.902-0700 [DEBUG] provider: plugin exited
2024-05-27T15:02:23.903-0700 [DEBUG] no planned changes, skipping apply graph check

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
2024-05-27T15:02:23.949-0700 [INFO]  backend/local: apply calling Apply
2024-05-27T15:02:23.949-0700 [DEBUG] Building and walking apply graph for NormalMode plan
2024-05-27T15:02:23.949-0700 [DEBUG] adding implicit provider configuration provider["registry.terraform.io/hashicorp/local"], implied first by local_file.file_render_with_one_slash (expand)
2024-05-27T15:02:23.949-0700 [DEBUG] adding implicit provider configuration provider["registry.terraform.io/hashicorp/aws"], implied first by aws_glue_catalog_table.table_render_with_expected_one_slash (expand)
2024-05-27T15:02:23.949-0700 [DEBUG] ProviderTransformer: "local_file.file_render_with_one_slash (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hashicorp/local"]
2024-05-27T15:02:23.949-0700 [DEBUG] ProviderTransformer: "aws_glue_catalog_table.table_render_with_expected_one_slash (expand)" (*terraform.nodeExpandApplyableResource) needs provider["registry.terraform.io/hashicorp/aws"]
2024-05-27T15:02:23.949-0700 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/aws\"]" references: []
2024-05-27T15:02:23.949-0700 [DEBUG] ReferenceTransformer: "local_file.file_render_with_one_slash (expand)" references: []
2024-05-27T15:02:23.949-0700 [DEBUG] ReferenceTransformer: "aws_glue_catalog_table.table_render_with_expected_one_slash (expand)" references: []
2024-05-27T15:02:23.949-0700 [DEBUG] ReferenceTransformer: "provider[\"registry.terraform.io/hashicorp/local\"]" references: []
2024-05-27T15:02:23.949-0700 [DEBUG] pruneUnusedNodes: local_file.file_render_with_one_slash (expand) is no longer needed, removing
2024-05-27T15:02:23.949-0700 [DEBUG] pruneUnusedNodes: aws_glue_catalog_table.table_render_with_expected_one_slash (expand) is no longer needed, removing
2024-05-27T15:02:23.949-0700 [DEBUG] pruneUnusedNodes: provider["registry.terraform.io/hashicorp/aws"] is no longer needed, removing
2024-05-27T15:02:23.949-0700 [DEBUG] pruneUnusedNodes: provider["registry.terraform.io/hashicorp/local"] is no longer needed, removing
2024-05-27T15:02:23.949-0700 [DEBUG] Starting graph walk: walkApply

Apply complete! Resources: 0 added, 0 changed, 0 destroyed.

Panic Output

No response

Important Factoids

The behavior of rendering \\s as "one slash" when rendering a local_file resource ad rendering \\s as "two slashes" when rendering a aws_glue_catalog_table is odd - it seems that there should be some way to render a aws_glue_catalog_table resource with one slash.

One other interesting note is the volume of companies that have published incorrect aws_glue_catalog_table terraform configurations as a result of this - here are a few of the more broadly used ones:

References

No response

Would you like to implement a fix?

No

github-actions[bot] commented 1 month ago

Community Note

Voting for Prioritization

Volunteering to Work on This Issue

geekofalltrades commented 1 week ago

I think there's an AWS bug in the mix here, too. Take this query from the ALB docs to create an ALB access logging Athena table:

CREATE EXTERNAL TABLE IF NOT EXISTS alb_access_logs (
            type string,
            time string,
            elb string,
            client_ip string,
            client_port int,
            target_ip string,
            target_port int,
            request_processing_time double,
            target_processing_time double,
            response_processing_time double,
            elb_status_code int,
            target_status_code string,
            received_bytes bigint,
            sent_bytes bigint,
            request_verb string,
            request_url string,
            request_proto string,
            user_agent string,
            ssl_cipher string,
            ssl_protocol string,
            target_group_arn string,
            trace_id string,
            domain_name string,
            chosen_cert_arn string,
            matched_rule_priority string,
            request_creation_time string,
            actions_executed string,
            redirect_url string,
            lambda_error_reason string,
            target_port_list string,
            target_status_code_list string,
            classification string,
            classification_reason string,
            conn_trace_id string
            )
            PARTITIONED BY
            (
             day STRING
            )
            ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
            WITH SERDEPROPERTIES (
            'serialization.format' = '1',
            'input.regex' = 
        '([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*)[:-]([0-9]*) ([-.0-9]*) ([-.0-9]*) ([-.0-9]*) (|[-0-9]*) (-|[-0-9]*) ([-0-9]*) ([-0-9]*) \"([^ ]*) (.*) (- |[^ ]*)\" \"([^\"]*)\" ([A-Z0-9-_]+) ([A-Za-z0-9.-]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^\"]*)\" ([-.0-9]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^ ]*)\" \"([^\s]+?)\" \"([^\s]+)\" \"([^ ]*)\" \"([^ ]*)\" ?([^ ]*)?( .*)?')
            LOCATION 's3://DOC-EXAMPLE-BUCKET/AWSLogs/<ACCOUNT-NUMBER>/elasticloadbalancing/<REGION>/'
            TBLPROPERTIES
            (
             "projection.enabled" = "true",
             "projection.day.type" = "date",
             "projection.day.range" = "2022/01/01,NOW",
             "projection.day.format" = "yyyy/MM/dd",
             "projection.day.interval" = "1",
             "projection.day.interval.unit" = "DAYS",
             "storage.location.template" = "s3://DOC-EXAMPLE-BUCKET/AWSLogs/<ACCOUNT-NUMBER>/elasticloadbalancing/<REGION>/${day}"
            )

Note regex:

([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*)[:-]([0-9]*) ([-.0-9]*) ([-.0-9]*) ([-.0-9]*) (|[-0-9]*) (-|[-0-9]*) ([-0-9]*) ([-0-9]*) \"([^ ]*) (.*) (- |[^ ]*)\" \"([^\"]*)\" ([A-Z0-9-_]+) ([A-Za-z0-9.-]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^\"]*)\" ([-.0-9]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^ ]*)\" \"([^\s]+?)\" \"([^\s]+)\" \"([^ ]*)\" \"([^ ]*)\" ?([^ ]*)?( .*)?

Specifically:

\"([^\s]+?)\" \"([^\s]+)\"

When I run this query in AWS Athena, I get a glue table with this regex:

([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*):([0-9]*) ([^ ]*)[:-]([0-9]*) ([-.0-9]*) ([-.0-9]*) ([-.0-9]*) (|[-0-9]*) (-|[-0-9]*) ([-0-9]*) ([-0-9]*) \"([^ ]*) (.*) (- |[^ ]*)\" \"([^\"]*)\" ([A-Z0-9-_]+) ([A-Za-z0-9.-]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^\"]*)\" ([-.0-9]*) ([^ ]*) \"([^\"]*)\" \"([^\"]*)\" \"([^ ]*)\" \"([^s]+?)\" \"([^s]+)\" \"([^ ]*)\" \"([^ ]*)\"

Note:

\"([^s]+?)\" \"([^s]+)\"

This shows up both in the AWS console and in a CLI aws athena get-table-metadata, so it's not just a console rendering issue.

geekofalltrades commented 1 week ago

I've had a support case open with AWS about this, and the resolution is that I think the double-slash is actually correct. They linked me this re:Post article which says

Note: RegexSerDe follows the Java standard. Because the backslash is an escape character in the Java String class, you must use a double backslash to define a single backslash. For example, to define \w, you must use \w in your regex.

Humorous aside: note, "to define \w, you must use \w", which is what it literally says at the time I'm linking it. Looks like someone wrote to define \w, you must use \\w in a raw doc when they meant \\\\w, and the pipeline that rendered the raw doc into a web page interpreted the \\ as an escape sequence and rendered it as "\". šŸ˜† As I pointed out to our AWS TAM, this is a great example of why this stuff is confusing and it's important to keep the docs straight.

ETA: I had to edit this post to change rendered it as "\" to rendered it as "\\", further proving my point. šŸ¤¦