Open jas1989 opened 1 year ago
@jas1989 can you share the debug log that contains all the api requests and responses?
Since you use module "gce-container"
and we don't have much insight of it, are you able to reach out to its owner for help?
module "gce-container" {
source = "terraform-google-modules/container-vm/google"
....
}
Help me to understand what you try to do?
resource "google_compute_instance" "vm" {
name = "dev-app"
...
boot_disk {
initialize_params {
image = module.gce-container.source_image
}
}
...
}
@edwardmedia, I've run terraform apply with the DEBUG log level for the logs, but it produced a large file containing some sensitive information, such as security certificate contents and the IP address of the VM, among other things. Do you know if there is another way to generate this kind of file?
As you suggested, I've opened an issue on the module's repository. It's likely more of an issue with this module rather than this repository.
Regarding the last questions, I came across information suggesting that it's beneficial to work with a Container-Optimized Image when running a container inside a GCP VM. I found a solution online that involves using the module mentioned before with the configuration I posted above. Unfortunately, I had to find a workaround to retain the information of the persistent disk because in the original setup, any changes to the VM parameters would cause it to restart, resulting in the destruction of the attached disk.
This is where the google_compute_attached_disk resource comes into play. Using it ensures that the disk isn't destroyed every time the VM is. However, a problem arises here. The containers aren't able to determine whether the attached disk is in read-only or read-write mode, and this error causes the containers to stop.
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.5.7 on linux_amd64
Affected Resource(s)
Terraform Configuration Files
Debug Output
Panic Output
Expected Behavior
terraform apply
command will create it in order:Actual Behavior
The container doesn't start due to this error:
Steps to Reproduce
terraform apply
Important Factoids
References
0000
b/304967884