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

Invalid reference from destroy provisioner #4

Open
emctl opened this issue Oct 11, 2020 · 1 comment
Open

Invalid reference from destroy provisioner #4

emctl opened this issue Oct 11, 2020 · 1 comment

Comments

@emctl
Copy link

emctl commented Oct 11, 2020

Describe the bug
It looks like this doesnt run with the my version of tf (v0.13.4)

To Reproduce
Attempted to run this against my cluster, fails at validate
use the below block (or your sample block) and run a TF validate against it.

Terraform (please complete the following information):
v0.13.4

Additional context
using only:
module "flux" { source = "rtlnl/flux/aws" git_url = "redacted" install_helm_operator = false path = "./helm" }

Error: Invalid reference from destroy provisioner on .terraform/modules/flux/helm-operator.tf line 18, in resource "null_resource" "crds": 18: command = "kubectl delete -f - <<'EOF'\n${data.template_file.crds.rendered}\nEOF" Destroy-time provisioners and their connection configurations may only reference attributes of the related resource, via 'self', 'count.index', or 'each.key'. References to other resources during the destroy phase can cause dependency cycles and interact poorly with create_before_destroy.

@nielstenboom
Copy link
Contributor

Hi @Emc1992 . It seems like you ran into an issue that was fixed in a recent pr (#2) and I think you're still on an old version of the module.

Could you try specifying the newest version in your module declaration?

module "flux" { 
    source = "rtlnl/flux/aws" 
    version = "0.0.4" 
    git_url = "redacted" 
    install_helm_operator = false 
    path = "./helm" 
}

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

2 participants