Error: variables not allowed Variables may not be used here

Hi @workaholicrohit,

Since you didn’t share your configuration I can’t be sure, but from the snippets included in the error message it seems like you have some invalid syntax here:

  • bucket is not a direct argument inside a terraform block. I think perhaps you intended to place it inside a backend "s3" block nested within the terraform block, or similar.
  • These backend configuration arguments expect literal values rather than variables. Where they are strings, that will generally mean values given in quotes, like bucket = "example".

If the above doesn’t answer your question then it would help if you could share your configuration and say a little more about what you are trying to achieve. Thanks!

1 Like