Open
Description
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request.
- Please do not leave +1 or me too comments, they generate extra noise for issue followers and do not help prioritize the request.
- If you are interested in working on this issue or have submitted a pull request, please leave a comment.
- If an issue is assigned to a user, that user is claiming responsibility for the issue.
- Customers working with a Google Technical Account Manager or Customer Engineer can ask them to reach out internally to expedite investigation and resolution of this issue.
Terraform Version & Provider Version(s)
Affected Resource(s)
google_cloud_run_v2_service
Terraform Configuration
resource "google_cloud_run_v2_service" "default" {
name = "cloudrun-service2"
project = var.project
location = "us-central1"
template {
service_account = var.service_account
}
}
Debug Output
N/A
Expected Behavior
The documentation for cloud_run_v2_service
states that the containers
block is Optional
.
I would expect that I would be able to deploy a cloud_run_v2_service
without a containers
block based on the documentation.
Actual Behavior
When deploying the code above, I get this error:
╷
│ Error: Error creating Service: googleapi: Error 400: Violation in CreateServiceRequest.service.template.containers: Revision template must contain at least one container.
│ Details:
│ [
│ {
│ "@type": "type.googleapis.com/google.rpc.BadRequest",
│ "fieldViolations": [
│ {
│ "description": "Revision template must contain at least one container.",
│ "field": "Violation in CreateServiceRequest.service.template.containers"
│ }
│ ]
│ }
│ ]
│
│ with google_cloud_run_v2_service.default,
│ on main.tf line 32, in resource "google_cloud_run_v2_service" "default":
│ 32: resource "google_cloud_run_v2_service" "default" {
│
╵
Steps to reproduce
terraform apply
Important Factoids
The documentation for the previous cloud_run_service
resource states that containers
are Required
, so I'm assuming the mistake is within the cloud_run_v2_service
documentation.
I understand that this may not be a bug with cloud_run_v2_service
resource, but more so just a problem with the documentation. I can create a pr to update the documentation if this is the case.
References
No response
b/381438826
Activity