This module launch in your GCP project a VM compute instance using the COS starting a Cloud SQL Proxy container.
It will :
- Create a service account with
cloudsql.instanceUser
andcloudsql.client
- Deploy a COS compute instance with the proxy started
- Add an inbound rule in your firewall on the 5432 port to allow you to connect to the proxy
Take a loot at the example folder.
Name | Version |
---|---|
terraform | ~> 1.1 |
Name | Version |
---|---|
n/a |
Name | Source | Version |
---|---|---|
gce_container_sqlproxy | terraform-google-modules/container-vm/google | ~> 3.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
allow_public_ip | Generate an ephemeral public if true | bool |
false |
no |
container_args | Containers arguments. | list(string) |
[] |
no |
container_command | Container command to start | list(string) |
[ |
no |
container_image | Source container image. Example : eu.gcr.io/cloudsql-docker/gce-proxy:1.32.0 | string |
n/a | yes |
cos_image_family | The COS image family to use (eg: stable, beta, or dev) | string |
"stable" |
no |
firewall_network | The name or self_link of the network to attach this firewall to. | string |
n/a | yes |
firewall_source_ranges | The firewall will apply only to traffic that has source IP address in these ranges | string |
n/a | yes |
instance_name | Instance name | string |
n/a | yes |
project | Project id | string |
n/a | yes |
vm_machine_type | The machine type to create. | string |
"e2-micro" |
no |
vm_network | The name or self_link of the network to attach this interface to. | string |
null |
no |
vm_subnetwork | The name or self_link of the subnetwork to attach this interface to. | string |
null |
no |
vm_zone | The zone that the machine should be created in | string |
null |
no |
No outputs.