-
Notifications
You must be signed in to change notification settings - Fork 183
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
fix(setup): do not create field which already exist #2953
Conversation
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
What does this change actually do? It seems like it imports the field even if it's uppercase - but then won't we actually lowercase it when applying? That doesn't sound like the right thing to do here. |
You may be right. I will try to research the following solution: I found that we can simply ignore name changes: https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle#ignore_changes |
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
I think that if we're going to require special configuration for this to work, the user may as well just make the field uppercase in their values.yaml. Unless I'm misunderstanding your suggestion.
That would actually work, I think. I'm a bit hesitant about this change in general, because I don't think we have a way of easily testing it. I don't think you can create an uppercase field in Sumo right now. |
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
I was thinking about it and I will manually import some field with different name and see what will happen during plan/apply |
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
Tested:
|
lifecycle { | ||
ignore_changes = [field_name, data_type] | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A comment here explaining why this exists would be very helpful. Otherwise LGTM.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added comment with description and link to #2865
Signed-off-by: Dominik Rosiek <drosiek@sumologic.com>
If we get field which is non lowercase, we try to recreate it, which leads to errors and setup process fail
Fixes #2865 proper way
Checklist