-
Notifications
You must be signed in to change notification settings - Fork 2
Resource lifecycle.destroy support for OpenTofu 1.12 #58
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Ilia Gogotchuri <[email protected]>
yottta
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.
Other than one comment loosely related with the code here, looks good.
| Constraint: schema.LiteralType{Type: cty.Bool}, | ||
| DefaultValue: schema.DefaultValue{Value: cty.True}, | ||
| IsOptional: true, | ||
| Description: lang.Markdown(fmt.Sprintf("Setting `destroy` to `false` changes the OpenTofu's default behavior when destroying or replacing the resource. \n OpenTofu will 'forget' the resource instance, removing it from the state without destroying the actual infrastructure object. \n Read more about the `destroy` lifecycle argument in the [documentation](https://opentofu.org/docs/language/resources/behavior/#lifecycle-customizations).")), |
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.
Maybe I am looking in the wrong place, but shouldn't the link here actually mention something about the destroy argument? 🤔 I cannot see it mentioned.
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.
I don't think I have added a separate ID to that section for the destroy attribute.
This points to the general section of the resource lifecycle customizations where the main description of the destroy attribute will be located (as a third option as I remember, but still)
If you think that would be significantly better, I can add ID in the documentation and make this reference directly tied to the destroy attribute.
| Constraint: schema.LiteralType{Type: cty.Bool}, | ||
| DefaultValue: schema.DefaultValue{Value: cty.True}, | ||
| IsOptional: true, | ||
| Description: lang.Markdown(fmt.Sprintf("Setting `destroy` to `false` changes the OpenTofu's default behavior when destroying or replacing the resource. \n OpenTofu will 'forget' the resource instance, removing it from the state without destroying the actual infrastructure object. \n Read more about the `destroy` lifecycle argument in the [documentation](https://opentofu.org/docs/language/resources/behavior/#lifecycle-customizations).")), |
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.
| Description: lang.Markdown(fmt.Sprintf("Setting `destroy` to `false` changes the OpenTofu's default behavior when destroying or replacing the resource. \n OpenTofu will 'forget' the resource instance, removing it from the state without destroying the actual infrastructure object. \n Read more about the `destroy` lifecycle argument in the [documentation](https://opentofu.org/docs/language/resources/behavior/#lifecycle-customizations).")), | |
| Description: lang.Markdown("Setting `destroy` to `false` changes the OpenTofu's default behavior when destroying or replacing the resource. \n OpenTofu will 'forget' the resource instance, removing it from the state without destroying the actual infrastructure object. \n Read more about the `destroy` lifecycle argument in the [documentation](https://opentofu.org/docs/language/resources/behavior/#lifecycle-customizations)."), |
diofeher
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.
Other than the small nit, looks good to me!
Support for the new lifecycle.destroy atrribute in resource for the next OpenTofu release