Terraform local exec Error: Missing newline after argument

Hi

Can you please tell me how to execute below code in terraform executor.

resource “null_resource” “eks_context_switcher” {

triggers = {
always_run = timestamp()
}

provisioner “local-exec” {
command = “eks-switch-cluster $({var.eks_cluster_name} “XXXXXXXXXXX”)”
}
provisioner “local-exec” {
command = cat <<-“EOF” | kubectl create -f -
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: “true”
labels:
kubernetes.io/bootstrapping: rbac-defaults
name: gitlab-runner
rules:

I am getting below error during terraform apply

│ Error: Unsupported operator

│ On …/…/modules/eks_auth/allow_nodes.tf line 39: Bitwise operators are not supported. Did you mean boolean OR (“||”)?


│ Error: Missing newline after argument

│ On …/…/modules/eks_auth/allow_nodes.tf line 36: An argument definition must end with a newline.


│ Error: Argument or block definition required

│ On …/…/modules/eks_auth/allow_nodes.tf line 40: An argument or block definition is required here. To set an argument, use the equals sign “=” to introduce the argument value.


│ Error: Argument or block definition required

│ On …/…/modules/eks_auth/allow_nodes.tf line 41: An argument or block definition is required here. To set an argument, use the equals sign “=” to introduce the argument value.


│ Error: Argument or block definition required

│ On …/…/modules/eks_auth/allow_nodes.tf line 42: An argument or block definition is required here. To set an argument, use the equals sign “=” to introduce the argument value.

You’ve posted a lot of errors in which Terraform is telling you your code is invalid, but you’ve declined to show us the code in question… I’m not sure how you expect us to help, without seeing it?

Also, Welcome to the forum - please reformat your message