File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 1414 * limitations under the License.
1515 */
1616
17+ locals {
18+ // we append the app hash to the filename as a temporary workaround for https://github.com/terraform-providers/terraform-provider-google/issues/1938
19+ md5_hash = " ${ lower (replace (base64encode (data. archive_file . main . output_md5 ), " =" , " " ))} "
20+ storage_object_name = " event_function-${ random_string . random_suffix . result } -${ local . md5_hash } .zip"
21+ }
22+
1723/* *****************************************
1824 Scheduled Function Definition
1925 *****************************************/
@@ -94,7 +100,7 @@ resource "google_storage_bucket" "main" {
94100}
95101
96102resource "google_storage_bucket_object" "main" {
97- name = " event_function- ${ random_string . random_suffix . result } .zip "
103+ name = " ${ local . storage_object_name } "
98104 bucket = " ${ google_storage_bucket . main . name } "
99105 source = " ${ data . archive_file . main . output_path } "
100106 content_disposition = " attachment"
You can’t perform that action at this time.
0 commit comments