diff --git a/terraform/basic/.terraform.lock.hcl b/terraform/basic/.terraform.lock.hcl index ed68d28..737ddda 100644 --- a/terraform/basic/.terraform.lock.hcl +++ b/terraform/basic/.terraform.lock.hcl @@ -2,38 +2,39 @@ # Manual edits may be lost in future updates. provider "registry.terraform.io/hashicorp/google" { - version = "4.1.0" + version = "6.0.1" hashes = [ - "h1:nVgsth90Jiu5N1sbCenjV4fOIMpLM2euaEPR3SFGNv8=", - "zh:3477415ef4ef02d7c065a08fb24b7011ddd77f76b2a011db25e0b73c767acaae", - "zh:43be16d0bbb56d29c090c1abe49e877e4f3ca66bb372a661a2cd0a377cd61e8f", - "zh:6bb202a40055ed302f9dd05e2f3f87aa13080e580a9ac7b0241d634b78b68a2a", - "zh:7179303f628c5fc58129013ef4a4e754e225e266e68af4a7167a06a64d9d97db", - "zh:837cdcf1bafd4c936f15a4a22353efeec96ca23727f8d8ff22e9d53414d87084", - "zh:a853f1a1e9f5ac261fd9a02d869ce7da16917fdd16464dabf2200e2ccd04fba9", - "zh:aba631b9db47cc34857c25459475f17d939a46022f886e396a8254588f720c58", - "zh:ac461358984ba480b4fef1d2be3538d9714aa8814a6f420e1e954227054a14a4", - "zh:ade64689485fc28b6aa0c36861c6c9c66b5d7a8e7282739ecf97c7791b973312", - "zh:c3fbbfe7f6e870e19bb552a2ad84ea38c9ddf3e25e0b7e996ecb2fc7ce336b03", - "zh:d1419f4fe9c07f136ee9015a299cd6acf25a13bea0afa0f69727a576058603d3", + "h1:yYQNXIaAp7gNCcmPcVMLYyvEmWxaFdIXwW2BYDvf864=", + "zh:053bcc0e62396d10a4ef40e59dcdf7d4a1491839e0dfc945de7cef5d9106a566", + "zh:282624e6dd086dfe10281f6ad6def3b64279e69fbd667d1141c5f1565e42aecf", + "zh:633384cc00d1c6e84b6cb302a898a407c85806a818ca2c93989992b4f9e9af99", + "zh:7099aa1a79594c6e041659e36a48f0134a19bd8e1810dfddc21bbad6d3e36d54", + "zh:8259adb345c1563a64bdc58efd1cae2ff174b518ccb1f31f79c9c5825e7f762e", + "zh:ae2c3008fe93a3bc1318079c23b1da9b55a77ace45f18cf0fa3b2aefcf33e94a", + "zh:b7f17cb09b4636edf4aed68ab224885523bd33a0b50af2a2a2819d5a843d49e9", + "zh:bee71d0adb8b842b812e4fc76853bedec93c17a6cbf56bc502a2ecf0bcbdaf98", + "zh:c187e22fa33cfa90a093cd25e61a77fb88898cce3f79bef33392ddb7708724ca", + "zh:dd5923c79697be9429edb98156aa94e69b7258f8de42d8c910dde6814c1ef981", + "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", + "zh:fe789dc52fc029c18e92db0efb3b013d15679b81c1ab633fa69b3eacde9842ac", ] } provider "registry.terraform.io/hashicorp/google-beta" { - version = "4.73.1" + version = "6.0.1" hashes = [ - "h1:bCnL9+TA+ZrgcwbycJhn6sKbULVu2ANWoz1Bl9COJ/w=", - "zh:14bf07d4b377792009dd27959576d4cec1ee5011b5ba093a441372840e8bc6c1", - "zh:2ca6f662b88f357148c5d535f4f9dc0717db36e88a25a28763ff2c8f9b9d9686", - "zh:50ec48fb3c16ed07b04a6ef13d9ded9221ad7b04c85188b5113a6d3bce6cfa68", - "zh:85ba884aa58607615424248bdfcc163f6bb8190e899c2c2fe81c9c9b7fddc6bb", - "zh:891c225520c0e47b97177b018c1d152f8481365aa0292035ae274b9550629939", - "zh:beb4a9db0522faa4a30a8fc100f9e84e0c5e73ee97395c3fb60b44b801503067", - "zh:c133494868b70933162c12e50c95bb2f0ee478db02ffc3a1247a33507ac80b0e", - "zh:cca26283af3b59a1ef1f70fec99d26c0d621f8f5ad2ae849a651d1e017ddb25b", - "zh:dcbb7a117c84daa730fdedb3cae1dedca7872febaf168ce232802ed9074c71ac", - "zh:eb99bc01ed8500684a0c0795038d3ba464a396142c5f2ce3e99f7eef3d7a0cba", - "zh:eda4b0b786a83452d5bd6e1e48ad93786fcb501777d174957382a70a8b9817c1", + "h1:+JTXaR0SOOZCluxx4GZJvvRXeiSH2bsDJOOJ/TD04FM=", + "zh:13a5af5ff90d18616805864a21dbcf6905cbd45d951097e41d12e79262a807f3", + "zh:19caf3feddb66dc8da3ea4a9948dcf26198aec941b2878002cc015db0f358d34", + "zh:1c8c7bc62f611e8e38273196a369fd38e2b313ef4efdd84396e0cd232f6c3a04", + "zh:2370affed7da4f202a80cc711d345c7c574bfa7677d07aadbc8855a87f622a5c", + "zh:520cbe955fdbdd8d1b9fb3f9b40284079745b7700d734b473eb2dd7c98991e44", + "zh:6353004391399bb077690e70f8941beda9270b1087414443bf3912de34052b5c", + "zh:7b09cc7b6fbe12bb5bc8d5803ee742de8f26e70cbcf890ab1d8dabfd0ed56b9d", + "zh:84f203385625a1ba973ac104cdba31efc430f41e837bead70b20e593673828a0", + "zh:91426564ef6427580c1f798d779d9b6c68616e87b8ead2c80f17e322c5dd2cd8", + "zh:97fc1412ba3a87ee12f4c45353c62d1a68698fbe2f3ff22b7ef87a4fed6a167a", + "zh:d97e7d855f93e068fa4e27faef69f12b0ff7e8c61b9c7a480fc0860a81af0d6c", "zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c", ] } diff --git a/terraform/basic/cluster.tf b/terraform/basic/cluster.tf index 8879d34..7abc1e7 100644 --- a/terraform/basic/cluster.tf +++ b/terraform/basic/cluster.tf @@ -1,4 +1,6 @@ resource "google_container_cluster" "primary" { + provider = google-beta + name = "primary-cluster" location = "asia-northeast1" @@ -6,6 +8,11 @@ resource "google_container_cluster" "primary" { subnetwork = google_compute_subnetwork.default.id enable_autopilot = true + + secret_manager_config { + enabled = true + } + ip_allocation_policy { cluster_secondary_range_name = "pods" services_secondary_range_name = "services" diff --git a/terraform/basic/db.tf b/terraform/basic/db.tf deleted file mode 100644 index b8abedc..0000000 --- a/terraform/basic/db.tf +++ /dev/null @@ -1,19 +0,0 @@ -resource "google_sql_database_instance" "primary" { - name = "primary" - database_version = "POSTGRES_11" - region = "asia-northeast1" - - settings { - tier = "db-f1-micro" - backup_configuration { - enabled = true - start_time = "03:00" - location = "asia-northeast1" - transaction_log_retention_days = 3 - backup_retention_settings { - retained_backups = 3 - } - } - } - -} diff --git a/terraform/basic/network.tf b/terraform/basic/network.tf index 0e5229a..7c0bc9e 100644 --- a/terraform/basic/network.tf +++ b/terraform/basic/network.tf @@ -8,14 +8,14 @@ resource "google_compute_subnetwork" "default" { ip_cidr_range = "10.10.10.0/24" region = "asia-northeast1" network = google_compute_network.default.id - secondary_ip_range = [ - { - range_name = "services" - ip_cidr_range = "10.10.11.0/24" - }, - { - range_name = "pods" - ip_cidr_range = "10.1.0.0/20" - } - ] + + secondary_ip_range { + range_name = "services" + ip_cidr_range = "10.10.11.0/24" + } + + secondary_ip_range { + range_name = "pods" + ip_cidr_range = "10.1.0.0/20" + } }