@hiiretail/gcp-infra-cli 0.95.1 → 0.95.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generators/common-resources/cloudsql/index.js +4 -4
- package/generators/common-resources/cloudsql/templates/{postgres → postgres-clan}/instance/spec.hcl +5 -0
- package/generators/common-resources/cloudsql/templates/{postgres → postgres-clan}/instance/terragrunt.hcl +1 -3
- package/generators/common-resources/cloudsql/templates/{postgres → postgres-clan}/instance-secrets/terragrunt.hcl +8 -4
- package/package.json +1 -1
|
@@ -10,8 +10,8 @@ module.exports = class extends BaseGenerator {
|
|
|
10
10
|
name: 'instanceType',
|
|
11
11
|
message: 'Select Cloud SQL database instance type',
|
|
12
12
|
store: true,
|
|
13
|
-
default: 'postgres',
|
|
14
|
-
choices: ['postgres', 'mysql', 'mssql'],
|
|
13
|
+
default: 'postgres-clan',
|
|
14
|
+
choices: ['postgres-clan', 'mysql', 'mssql'],
|
|
15
15
|
},
|
|
16
16
|
{
|
|
17
17
|
type: 'list',
|
|
@@ -20,7 +20,7 @@ module.exports = class extends BaseGenerator {
|
|
|
20
20
|
store: true,
|
|
21
21
|
default: (response) => {
|
|
22
22
|
const defaultTypes = {
|
|
23
|
-
postgres: 'POSTGRES_15',
|
|
23
|
+
'postgres-clan': 'POSTGRES_15',
|
|
24
24
|
mysql: 'MYSQL_5_7',
|
|
25
25
|
mssql: 'SQLSERVER_2017_STANDARD',
|
|
26
26
|
};
|
|
@@ -28,7 +28,7 @@ module.exports = class extends BaseGenerator {
|
|
|
28
28
|
},
|
|
29
29
|
choices: (response) => {
|
|
30
30
|
const tierTypes = {
|
|
31
|
-
postgres: ['POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15'],
|
|
31
|
+
'postgres-clan': ['POSTGRES_13', 'POSTGRES_14', 'POSTGRES_15'],
|
|
32
32
|
mysql: ['MYSQL_5_6', 'MYSQL_5_7'],
|
|
33
33
|
mssql: ['SQLSERVER_2017_STANDARD', 'SQLSERVER_2017_ENTERPRISE', 'SQLSERVER_2017_EXPRESS', 'SQLSERVER_2017_WEB'],
|
|
34
34
|
};
|
package/generators/common-resources/cloudsql/templates/{postgres → postgres-clan}/instance/spec.hcl
RENAMED
|
@@ -36,6 +36,11 @@ locals {
|
|
|
36
36
|
#Default: "ZONAL"
|
|
37
37
|
# availability_type = "REGIONAL"
|
|
38
38
|
|
|
39
|
+
#Description: Enables protection of an Cloud SQL instance from accidental deletion across all surfaces (API, gcloud, Cloud Console and Terraform).
|
|
40
|
+
#Type: bool
|
|
41
|
+
#Default: false
|
|
42
|
+
deletion_protection_enabled = true
|
|
43
|
+
|
|
39
44
|
#Description: The backup_configuration settings subblock for the database setings
|
|
40
45
|
#Type: object({ binary_log_enabled = bool enabled = bool start_time = string })
|
|
41
46
|
#Default: { "binary_log_enabled": null, "enabled": false, "start_time": null }
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Terragrunt will copy the Terraform configurations specified by the source parameter, along with any files in the
|
|
2
2
|
# working directory, into a temporary folder, and execute your Terraform commands in that folder.
|
|
3
3
|
terraform {
|
|
4
|
-
source = "git::https://github.com/terraform-google-modules/terraform-google-sql-db//modules/postgresql?ref=
|
|
4
|
+
source = "git::https://github.com/terraform-google-modules/terraform-google-sql-db//modules/postgresql?ref=v20.1.0"
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
# Include all settings from the root terragrunt.hcl file
|
|
@@ -31,8 +31,6 @@ inputs = merge(
|
|
|
31
31
|
"private_network" : "https://www.googleapis.com/compute/v1/projects/${local.project_vars.locals.project_id}/global/networks/${local.project_vars.locals.clan_network}",
|
|
32
32
|
"require_ssl" : false
|
|
33
33
|
}
|
|
34
|
-
## Uncomment and apply it before destroy in case of necessary to delete the instance
|
|
35
|
-
# deletion_protection = false
|
|
36
34
|
user_labels = local.labels,
|
|
37
35
|
}
|
|
38
36
|
)
|
|
@@ -22,8 +22,10 @@ locals {
|
|
|
22
22
|
dependency "instance" {
|
|
23
23
|
config_path = "../instance"
|
|
24
24
|
mock_outputs = {
|
|
25
|
-
|
|
26
|
-
generated_user_password
|
|
25
|
+
instance_connection_name = "dummy-connection-name"
|
|
26
|
+
generated_user_password = "dummy-password"
|
|
27
|
+
public_ip_address = "dummy-ip"
|
|
28
|
+
private_ip_address = "dummy-ip"
|
|
27
29
|
}
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -32,8 +34,10 @@ inputs = merge(
|
|
|
32
34
|
{
|
|
33
35
|
project_id = local.project_vars.locals.project_id
|
|
34
36
|
secrets = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
+
postgresql_instance_connection_name = dependency.instance.outputs.instance_connection_name
|
|
38
|
+
postgresql_master_password = dependency.instance.outputs.generated_user_password
|
|
39
|
+
postgresql_public_address = dependency.instance.outputs.public_ip_address
|
|
40
|
+
postgresql_address = dependency.instance.outputs.private_ip_address
|
|
37
41
|
}
|
|
38
42
|
labels = local.labels,
|
|
39
43
|
}
|