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

make blocks helm, kustomize, directory optional #513

Open
AkakievKD opened this issue Dec 8, 2024 · 4 comments
Open

make blocks helm, kustomize, directory optional #513

AkakievKD opened this issue Dec 8, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@AkakievKD
Copy link

AkakievKD commented Dec 8, 2024

The point of the feature is that the implementation is similar to the sync_policy block, if the automated block and the sync_options field do not have any values, then the entire sync_policy block is removed from the final description resources during output this feature will allow you to deploy charts with default values

Screenshot_1

@mkilchhofer
Copy link
Collaborator

mkilchhofer commented Dec 23, 2024

All your mentioned blocks (helm, kustomize and directory) are already optional.

Helm:

"helm": {
Type: schema.TypeList,
Description: "Helm specific options.",
MaxItems: 1,
MinItems: 1,
Optional: true,
Elem: &schema.Resource{

Kustomize:

"kustomize": {
Type: schema.TypeList,
Description: "Kustomize specific options.",
MaxItems: 1,
MinItems: 1,
Optional: true,

Directory:

MaxItems: 1,
MinItems: 1,
Optional: true,

In my opinion it looks more like a syntax error inside your IDE (VScode):

  • The source block is not closed (missing curly bracket).

Can you confirm that, @Nello-Angelo ?

@AkakievKD
Copy link
Author

yes i did mistake

@AkakievKD
Copy link
Author

here I have a problem with the fact that if the block remains empty then the provider panic

#492

@mkilchhofer

@AkakievKD
Copy link
Author

AkakievKD commented Dec 23, 2024

maybe you should add a condition if the values ​​of these variables are empty and nothing is passed to them, then simply ignore this block and perhaps indicate in the code that they are optional

the same behavior in sync_policy block try to do the same with other blocks with panic if empty

I mean that this block corresponds to the described behavior with removal from the final terraform output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants