Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Persistent Whitespace Changes in confluent_schema resources #436

Open
S1M0NM opened this issue Sep 11, 2024 · 0 comments
Open

Persistent Whitespace Changes in confluent_schema resources #436

S1M0NM opened this issue Sep 11, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@S1M0NM
Copy link

S1M0NM commented Sep 11, 2024

Terraform Provider Version: 1.83.0 and 2.1.0
Terraform Version: 1.8.5 (also tested 1.9.5)

Since upgrading the Terraform provider to version 2.1.0, I've been encountering a recurring issue with whitespace changes in the same 4 confluent_schema resources.
Despite applying the plan changes, the same whitespace changes reappear in subsequent plans.

Expected Behavior: Once the plan changes are applied, subsequent plans should not show any changes if no modifications were made to the configuration.

Actual Behavior: Whitespace changes for the confluent_schema resources reappear in every plan, even after they have been applied.

Additional Information:

  • The issue does not seem to be affected by different line endings (LF or CRLF).
  • This behavior started occurring after upgrading from version 1.55.0 to 1.83.0 and still persists with 2.1.0

Plan output

# module.<module-name>.confluent_schema.schema["<index>"] will be updated in-place
  ~ resource "confluent_schema" "schema" {
        id                          = "lsrc-<id>/<subject>/latest"
      ~ schema                      = jsonencode( # whitespace changes
            <schema_content>
        )
        # (8 unchanged attributes hidden)

        # (2 unchanged blocks hidden)
    }

Terraform Config:

resource "confluent_schema" "schema" {
  for_each = { for schema in var.schemas : schema["subject"] => schema }

  subject_name = each.value["subject"]
  format       = each.value["format"]
  schema       = file(each.value["schema_file_path"])

  credentials {
    key    = var.schema_registry_api_key.id
    secret = var.schema_registry_api_key.secret
  }
  rest_endpoint = var.schema_registry.rest_endpoint

  schema_registry_cluster {
    id = var.schema_registry.id
  }
}
@sajjadlateef sajjadlateef added the bug Something isn't working label Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants