Conversation
…oy_on_drift field This addresses the regression introduced in v6.7.0 where existing github_actions_organization_secret resources would show invalid state for the new destroy_on_drift field. Adds schema migration from v0 to v1 that sets destroy_on_drift=true for existing resources that don't have this field. Fixes #2804
…ret - Fixes the upgrade issue from v6.7.1 to v6.7.2.
… went dates don't match
…d date diff in read
….Set type mismatch with restricted_file_extensions
stevehipwell
left a comment
There was a problem hiding this comment.
I'm not convinced about the changes to the secrets as I don't think we need to make every change a force new. Even though we don't have support for writable arguments we could adopt some of the new syntax and version the value so we only update it when the version is explicitly changed. This would still support the destroy_on_drift pattern (although something like recrate_on_drift would make this functionality less concerning for end-users).
resource "github_actions_organization_secret" "example_secret" {
secret_name = "example_secret_name"
visibility = "private"
plaintext_value = var.some_secret_string
value_version = 0
}I say this coming from a position where I need to be able to update a secret (with a fixed name) in place and I wouldn't be happy with the potential for it to be un-set as any point in the process. As such I can't use the latest patch versions of the provider until this is resolved.
…terraform-provider-github into integrate-v6.8.2-into-main
stevehipwell
left a comment
There was a problem hiding this comment.
I think the max_file_size parameter is incorrectly documented and missing validation based on the GitHub API docs?
See #2894
| "max_file_size": []any{ | ||
| map[string]any{ | ||
| "max_file_size": float64(10485760), // 10MB | ||
| "max_file_size": 10485760, // 10MB |
There was a problem hiding this comment.
This doesn't look right, the GitHub API specifies that the max size is in megabytes and supports a value between 1 & 100.
| "max_file_size": []any{ | ||
| map[string]any{ | ||
| "max_file_size": float64(5242880), // 5MB | ||
| "max_file_size": 5242880, // 5MB |
stevehipwell
left a comment
There was a problem hiding this comment.
Just these two to fix.
Co-authored-by: Steve Hipwell <steve.hipwell@gmail.com>
Co-authored-by: Steve Hipwell <steve.hipwell@gmail.com>
stevehipwell
left a comment
There was a problem hiding this comment.
I found a few more.
| if maxFileSizeRules[0]["max_file_size"] != int64(10485760) { | ||
| t.Errorf("Expected max_file_size to be 10485760, got %v", maxFileSizeRules[0]["max_file_size"]) | ||
| if maxFileSizeRules[0]["max_file_size"] != int64(100) { | ||
| t.Errorf("Expected max_file_size to be 104857600, got %v", maxFileSizeRules[0]["max_file_size"]) |
There was a problem hiding this comment.
| t.Errorf("Expected max_file_size to be 104857600, got %v", maxFileSizeRules[0]["max_file_size"]) | |
| t.Errorf("Expected max_file_size to be 100, got %v", maxFileSizeRules[0]["max_file_size"]) |
There was a problem hiding this comment.
| if maxFileSizeRules[0]["max_file_size"] != int64(5) { | |
| t.Errorf("Expected max_file_size to be 5, got %v", maxFileSizeRules[0]["max_file_size"]) | |
| } |
There was a problem hiding this comment.
| if len(maxFileSizeRules) != 1 || maxFileSizeRules[0]["max_file_size"] != int64(1) { | |
| t.Error("Expected max_file_size rule with value 1") | |
| } |
This integrates the changes from the release patch v6.8.2 into main.
Note: this also encapsulates the patch from v6.7.5 as well that we're missed after the release was made.