terraform-provider-awscc
terraform-provider-awscc copied to clipboard
awscc_glue_schema fails on apply on adding tags
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
- The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.
Terraform CLI and Terraform AWS Cloud Control Provider Version
terraform --version
Terraform v1.7.4
terraform {
required_providers {
awscc = {
source = "hashicorp/awscc"
version = "0.74.0"
}
}
}
Affected Resource(s)
- awscc_glue_schema
Terraform Configuration Files
Please include all Terraform configurations required to reproduce the bug. Bug reports without a functional reproduction may be closed without investigation.
resource "awscc_glue_schema" "example" {
name = "example"
registry = {
arn=awscc_glue_registry.example.arn
}
data_format = "AVRO"
compatibility = "NONE"
schema_definition = "{\"type\": \"record\", \"name\": \"r1\", \"fields\": [ {\"name\": \"f1\", \"type\": \"int\"}, {\"name\": \"f2\", \"type\": \"string\"} ]}"
}
resource "awscc_glue_registry" "example" {
name = "example-registry"
description = "Glue registry example"
tags = [{
key = "Modified By"
value = "AWSCC"
}]
}
Updated configuation
resource "awscc_glue_schema" "example" {
name = "example"
registry = {
arn=awscc_glue_registry.example.arn
}
data_format = "AVRO"
compatibility = "NONE"
schema_definition = "{\"type\": \"record\", \"name\": \"r1\", \"fields\": [ {\"name\": \"f1\", \"type\": \"int\"}, {\"name\": \"f2\", \"type\": \"string\"} ]}"
tags = [{
key = "Modified By"
value = "AWSCC"
}]
}
resource "awscc_glue_registry" "example" {
name = "example-registry"
description = "Glue registry example"
tags = [{
key = "Modified By"
value = "AWSCC"
}]
}
Debug Output
Panic Output
Expected Behavior
Actual Behavior
The plan/apply identifies this as an in-place update, but fails stating schemadefinition is not found ( which is not changed).
Terraform used the selected providers to generate the following execution plan. Resource actions are
indicated with the following symbols:
~ update in-place
Terraform will perform the following actions:
# awscc_glue_schema.example will be updated in-place
~ resource "awscc_glue_schema" "example" {
+ description = (known after apply)
id = "arn:aws:glue:us-east-1:#######:schema/example-registry/example"
name = "example"
+ tags = [
+ {
+ key = "Modified By"
+ value = "AWSCC"
},
]
# (7 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
awscc_glue_schema.example: Modifying... [id=arn:aws:glue:us-east-1:#######:schema/example-registry/example]
╷
│ Error: AWS SDK Go Service Operation Unsuccessful
│
│ with awscc_glue_schema.example,
│ on main.tf line 1, in resource "awscc_glue_schema" "example":
│ 1: resource "awscc_glue_schema" "example" {
│
│ Calling Cloud Control API service UpdateResource operation returned: operation error CloudControl:
│ UpdateResource, https response error StatusCode: 400, RequestID: 60edebed-5ea8-46a9-9205-82eae9eeedb1, api
│ error ValidationException: Model validation failed (#: required key [SchemaDefinition] not found)
Steps to Reproduce
-
terraform apply
with the first configuration. - Add tags to the schema and apply again.