-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Kinesis firehose delivery stream, default lambda transform params not stored in state #9827
Comments
I also couldn't find these defaults anywhere in the docs. I guessed this was the reason for the plan suggesting a diff and this issue suggests I was correct. Another improvement would be to document these defaults and explain the diff behaviour. https://github.com/terraform-providers/terraform-provider-aws/blob/d94146963be840982ef4a232d6c012a697a811ab/aws/resource_aws_kinesis_firehose_delivery_stream.go#L558 |
…d in kinesis firehose state - Related issue: hashicorp#9827
…d in kinesis firehose state - Related issue: #9827
Not sure if this is helpful to others but I found this issue was causing my plan applies to fail with the following error. I did some testing and found a few workarounds related to this issue and #19936. If you set only one of the parameters that have defaults like
I found the following workarounds:
If the code could be updated to support one of those required parameters getting set, and it would set the other parameter with the default value when the AWS API is called or whatever is causing that error that would be very helpful. I am currently using TF 0.13 and AWS Provider 3.65, I tested with the 3.75.1 and 4.10.0 of the providers as well. I have not tried newer versions of TF but I assume they will have the same problem. |
I have the same problem, Terraform 1.1.9, aws provider 4.13.0. |
happens also with other processors (not lambda):
|
There are several bugs open against the TF provider ([eg](hashicorp/terraform-provider-aws#9827)) about KFH processor `parameters` not "sticking" and resulting in infinite diffs. This appears to be something related to not saving the values in the statefile if they're the defaults. We're experiencing this internally with `BufferSizeInMBs` trying to be reset each apply ([internal TF link](https://app.terraform.io/app/honeycomb/workspaces/prod/runs/run-W9obHXLNwKGNA5gY)) So … let's try not to use the defaults. While we're at it, allow setting these parameters dynamically, and also sort the keys to try and avoid any out-of-order plan shenanigans.
I found that even when setting both to non default values, I was still seeing a perpetual diff. The solution was to configure the params in this specific order in the TF code.
|
same solution works for |
Thank you for keeping this issue updated. After some investigation there are a few things within the current implementation that make resolving this difficult.
For these reasons the path forward for resolution would be an upgrade from the Terraform Plugin SDKv2 to the Terraform Plugin Framework, which will provide features that allow better handling of nested attributes. This will take some time to upgrade but the Framework will provide better flexibility to fix this issue and for future enhancements. |
This issue still happens on plan/apply the state, each time Terraform suggests changing these values as commented before in this conversation.
Are there any updates on the development of a solution for this? Thank you very much in advance. |
Yea issue happens but I guess it is because of the default paramater being 60. |
same issue we're facing. we are setting
|
@cwong-archy |
hey @victor7070 . THANK YOU SOOO MUCH!!!! this worked!!!! this is what we have at the moment -
when i swapped the 2 params order and it shows no changes -
|
This functionality has been released in v5.32.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Terraform Version
Terraform v0.11.11
provider: aws version = "~> 2.0"
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
No diff detected when running terraform plan
Actual Behavior
Steps to Reproduce
terraform apply
terraform plan
For the parameters with values that match a default value, the parameter will be ignored and not stored in the terraform state file due to this part of the code: https://github.com/terraform-providers/terraform-provider-aws/blob/d94146963be840982ef4a232d6c012a697a811ab/aws/resource_aws_kinesis_firehose_delivery_stream.go#L570-L575
This results in terraform plan picking up a change in state for the ignored parameter.
The BufferSizeInMBs and BufferIntervalInSeconds parameters are also required so we can't leave them out if we want them to be set to the default values and have a clean terraform plan.
Important Factoids
References
The text was updated successfully, but these errors were encountered: