-
Notifications
You must be signed in to change notification settings - Fork 123
add support for datastream lifecycle #724
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
Conversation
|
💚 CLA has been signed |
tobio
left a comment
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.
Thanks for adding this in. one small change to make this work when lifecycle isn't defined.
| lifecycle, diags := ExpandLifecycle(definedTempl["lifecycle"].(*schema.Set)) | ||
| if diags.HasError() { | ||
| return templ, false, diags | ||
| } | ||
| if lifecycle != nil { | ||
| templ.Lifecycle = lifecycle | ||
| } |
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.
The tests are failing when lifecycle is not defined in the TF module. I'm pretty sure this should fix it, though it's totally untested.
| lifecycle, diags := ExpandLifecycle(definedTempl["lifecycle"].(*schema.Set)) | |
| if diags.HasError() { | |
| return templ, false, diags | |
| } | |
| if lifecycle != nil { | |
| templ.Lifecycle = lifecycle | |
| } | |
| if lc, ok := definedTempl["lifecycle"]; ok { | |
| lifecycle, diags := ExpandLifecycle(lc.(*schema.Set)) | |
| if diags.HasError() { | |
| return templ, false, diags | |
| } | |
| if lifecycle != nil { | |
| templ.Lifecycle = lifecycle | |
| } | |
| } |
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.
Sorry for mistake. I didn't test newly created index. I fixed it in ExpandLifecycle function.
|
I have pushed one more fix. Tests should work now. |
tobio
left a comment
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.
LGTM. Thanks for taking the time to get this added in!
resolves #673