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

Error parsing cloud-init in operator submodule #949

Open
mcouto-sossego opened this issue Oct 22, 2024 · 0 comments · Fixed by sossego/terraform-oci-oke#1 · May be fixed by #950
Open

Error parsing cloud-init in operator submodule #949

mcouto-sossego opened this issue Oct 22, 2024 · 0 comments · Fixed by sossego/terraform-oci-oke#1 · May be fixed by #950
Labels
bug Something isn't working

Comments

@mcouto-sossego
Copy link

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 "me too" comments, 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

Terraform Version and Provider Version

  • Terraform v1.5.7
  • Module oracle-terraform-modules/oke/oci 5.1.8

Affected Resource(s)

  • operator submodule

Terraform Configuration Files

  ...
  operator_cloud_init = [
    {
      content_type = "text/cloud-config",
      content  = jsonencode({
        runcmd = [
          "<very large string..........................................>",
          "<very large string..........................................>",
          "<very large string..........................................>",
      ]})
    }
  ]
  ...

Debug Output

│ Error: Error in function call
│
│   on .terraform/modules/app-staging-sa1-001.oke/modules/operator/cloudinit.tf line 263, in data "cloudinit_config" "operator":
│  263:         fileexists(lookup(part.value, "content")) ? file(lookup(part.value, "content"))
│     ├────────────────
│     │ part.value is map of string with 2 elements
│
│ Call to function "fileexists" failed: failed to stat (sensitive value).

Expected Behavior

  • Do not generate exception if the content property fail do check filesystem.

Actual Behavior

  • Script check a file with very long filename, and generate exception.

Steps to Reproduce

  1. terraform apply

References

  ...
  try(fileexists(lookup(part, "content")), false) ? file(lookup(part, "content"))
  ...
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
1 participant