-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
Depends_on ignored #38
Comments
@BuckinghamIO It should generally work. How are you providing A working example is https://github.com/mumoshu/terraform-provider-eksctl/blob/master/examples/productionsetup-alb/testdata/01-bootstrap/main.tf#L155. In this example, To be clear, even if it is declared as |
In other words and from a developer's perspective, it is Terraform that ignores depends_on on |
@BuckinghamIO #42 may also fix your issue if this was due to that |
@mumoshu here is a use-case example. We would like to generate environment.yaml file with values imported from another modules and only after that run the helmfile_release_set resource. Right now we cannot do this because the provider runs "helmfile diff" and it fails because the file doesn't exist. |
@danil-fomichev How is |
@mumoshu it is included from helmfile.yaml:
obviously it must be generated before we run "helmfile diff". The name of environment is specified in helmfile_release_set definition. |
@danil-fomichev Gotcha! Thanks for clarifying. AFAIK, there's no way to make some terraform resource's "plan" operation optional depending on condition. #38 (comment) So the only way would be to enhance the provider to support something like WDYT? |
@mumoshu great idea! And thank you! |
@danil-fomichev Thanks for confirming! I'll give it a try |
@BuckinghamIO Does the planned feature above #38 (comment) look like to work for your use-case, too? |
* Add helmfile_release_set.skip_diff_on_missing_files Resolves #38
@danil-fomichev @BuckinghamIO |
@mumoshu Thank you so much! When approximately do you plan to publish it to registry.terraform.io? |
@danil-fomichev It should be available soon :) registry.terraform.io automatically syncs github releases so there should be nothing blocking that process on my end. |
@mumoshu unfortunately it doesn't work as expected.
it still runs 'helm diff' during 'terraform plan' and fails with error. |
It works when I set absolute path to the file instead of 'local_file.environment_file'. Not very nice looking code but it works. Thanks! |
@danil-fomichev Thanks for the feedback! I'll definitely enahnce it to work with relative paths. Stay tuned. |
@danil-fomichev Since v0.10.1, it automatically coverts relative paths to absolute paths. Would you mind trying? If it doesn't work as expected, try running terraform with |
When using Terraform with the Helmfile provider it completely ignores any depends on requirements.
In my instance I require this as some of my hooks actually setup credentials which are only available once the cluster is created. Since the Helmfile resource always try to generate a diff output regardless of the depends on requirement it fails every time on a fresh install unless I create Terraform and Helmfile seperately.
is there anyway I can work around this?
EDIT: the main cause of this issue is terraform plan also executes helmfile diff without taking into consideration if tiller is even present let alone if the cluster is even present
The text was updated successfully, but these errors were encountered: