You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
that should unpack the file from /tmp dir, then put some files in another place.
those my_archive_name file should be uploaded by the file provisioner.
What I see:
Terraform apply executed successfully, and an instance was created.
The file provisioner successfully uploaded the file in /tmp dir, but SOMETIME there are a few missing files (expected as the result of the unpack operation)
If I manually unpack the archive from /tmp dir, files are present
After I recalled that tar can unpack an archive even if it's incomplete, and missing files seem to be at the end of the archive, I added a delay before the unpack command to check if the arch file size is not changing
Log results:
Arch file size: 210403328
Arch file size: 235031211
Arch file size: 235031211
So it seems that or file provisioner "finished" before upload was fully completed (async?) or startup-script started prematurely
Expected behavior
startup-script should be executed after file provisioner completely uploaded the file
Observed behavior
startup-script starts before file provisioner completely uploaded the file
What I have: terraform code that deploys VM on GCP
It contains a startup script
and this template has code
that should unpack the file from
/tmp
dir, then put some files in another place.those
my_archive_name
file should be uploaded by the file provisioner.What I see:
Terraform apply executed successfully, and an instance was created.
The file provisioner successfully uploaded the file in /tmp dir, but SOMETIME there are a few missing files (expected as the result of the unpack operation)
If I manually unpack the archive from /tmp dir, files are present
After I recalled that tar can unpack an archive even if it's incomplete, and missing files seem to be at the end of the archive, I added a delay before the unpack command to check if the arch file size is not changing
Log results:
Arch file size: 210403328
Arch file size: 235031211
Arch file size: 235031211
So it seems that or file provisioner "finished" before upload was fully completed (async?) or startup-script started prematurely
Expected behavior
startup-script should be executed after file provisioner completely uploaded the file
Observed behavior
startup-script starts before file provisioner completely uploaded the file
Terraform Configuration
Terraform Version
Additional information
No response
The text was updated successfully, but these errors were encountered: