diff --git a/cloud_sql/mysql_instance_final_backup/main.tf b/cloud_sql/mysql_instance_final_backup/main.tf new file mode 100644 index 00000000..0c7a2005 --- /dev/null +++ b/cloud_sql/mysql_instance_final_backup/main.tf @@ -0,0 +1,31 @@ +/** + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +# [START cloud_sql_mysql_instance_final_backup] +resource "google_sql_database_instance" "default" { + name = "mysql-instance-final-backup" + region = "asia-northeast1" + database_version = "MYSQL_8_0" + settings { + tier = "db-f1-micro" + final_backup_config { + enabled = true + retention_days = 10 + } + } + final_backup_description = "TF Sample final backup description" +} +# [END cloud_sql_mysql_instance_final_backup] diff --git a/cloud_sql/mysql_instance_final_backup/test.yaml b/cloud_sql/mysql_instance_final_backup/test.yaml new file mode 100644 index 00000000..c230939a --- /dev/null +++ b/cloud_sql/mysql_instance_final_backup/test.yaml @@ -0,0 +1,20 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintTest +metadata: + name: sql_mysql_instance_final_backup +spec: + skip: true diff --git a/cloud_sql/postgres_instance_final_backup/main.tf b/cloud_sql/postgres_instance_final_backup/main.tf new file mode 100644 index 00000000..bbffdfa5 --- /dev/null +++ b/cloud_sql/postgres_instance_final_backup/main.tf @@ -0,0 +1,31 @@ +/** + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +# [START cloud_sql_postgres_instance_final_backup] +resource "google_sql_database_instance" "default" { + name = "postgres-instance-final-backup" + region = "us-central1" + database_version = "POSTGRES_14" + settings { + tier = "db-f1-micro" + final_backup_config { + enabled = true + retention_days = 10 + } + } + final_backup_description = "TF Sample final backup description" +} +# [END cloud_sql_postgres_instance_final_backup] diff --git a/cloud_sql/postgres_instance_final_backup/test.yaml b/cloud_sql/postgres_instance_final_backup/test.yaml new file mode 100644 index 00000000..dd67adc9 --- /dev/null +++ b/cloud_sql/postgres_instance_final_backup/test.yaml @@ -0,0 +1,20 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintTest +metadata: + name: sql_postgres_instance_final_backup +spec: + skip: true diff --git a/cloud_sql/sqlserver_instance_final_backup/main.tf b/cloud_sql/sqlserver_instance_final_backup/main.tf new file mode 100644 index 00000000..308ddd6b --- /dev/null +++ b/cloud_sql/sqlserver_instance_final_backup/main.tf @@ -0,0 +1,31 @@ +/** + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +# [START cloud_sql_sqlserver_instance_final_backup] +resource "google_sql_database_instance" "default" { + name = "sqlserver-instance-final-backup" + region = "us-central1" + database_version = "SQLSERVER_2019_STANDARD" + settings { + tier = "db-f1-micro" + final_backup_config { + enabled = true + retention_days = 10 + } + } + final_backup_description = "TF Sample final backup description" +} +# [END cloud_sql_sqlserver_instance_final_backup] diff --git a/cloud_sql/sqlserver_instance_final_backup/test.yaml b/cloud_sql/sqlserver_instance_final_backup/test.yaml new file mode 100644 index 00000000..1075d89b --- /dev/null +++ b/cloud_sql/sqlserver_instance_final_backup/test.yaml @@ -0,0 +1,20 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +apiVersion: blueprints.cloud.google.com/v1alpha1 +kind: BlueprintTest +metadata: + name: sql_sqlserver_instance_final_backup +spec: + skip: true