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

fastly_service_vcl Overly verbose Snippets diff #802

Open
marceloboeira opened this issue Jan 10, 2024 · 0 comments
Open

fastly_service_vcl Overly verbose Snippets diff #802

marceloboeira opened this issue Jan 10, 2024 · 0 comments

Comments

@marceloboeira
Copy link

marceloboeira commented Jan 10, 2024

Terraform Version

Terraform v1.6.3
on darwin_arm64

Affected Fastly Terraform Resource(s)

Please list the affected resources, for example:

  • fastly_service_vcl

Terraform Configuration Files

resource "fastly_service_vcl" "this" {
  name     = "some-service"
  activate = true

  snippet {
    name     = "my_snippet"
    type     = "init"
    content  =  <<EOF
      table my_table {
        "foo" = "bar"
        "bar" = "foo"
      }
      # Old line
    EOF
  }
}

Expected Behavior

...
        snippet {
          name     = "my_snippet"
          content  = <-EOF
            ... lots of suff ...
-           # Old Line
+           # Changed Line
          EOF
        }

Actual Behavior

...
-       snippet {
-         name     = "my_snippet"
-         type     = "init"
-         content  = <-EOF
-           ... lots of suff ...
-         EOF
-       }

+       snippet {
+         name     = "my_snippet"
+         type     = "init"
+         content  = <-EOF
+           ... lots of suff ...
+           # Changed Line
+         EOF
+       }

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform plan/apply
  2. make a change to snippet content
  3. terraform plan — see the "wrong" diff (more verbose than necessary)

Important Factoids (optional)

  • I'm guessing other types of snippets (dynamic) and also raw VCL should have the same issue
  • Is that because of the use of Type.Set in the resource schema? Would it be possible to use something like Type.Map and eventually use the name of the snippet as a map (I'm guessing if the name changes it is okay to show it as a new snippet)
@marceloboeira marceloboeira changed the title VCL Snippets diff optimal display fastly_service_vcl Overly verbose Snippets diff Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant