mirror of
https://github.com/optim-enterprises-bv/terraform-talos.git
synced 2025-11-03 11:47:45 +00:00
Fix multi zone setup
This commit is contained in:
5
oracle/init/Makefile
Normal file
5
oracle/init/Makefile
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
init:
|
||||
terraform init
|
||||
terraform apply -target=null_resource.terraform_key -auto-approve
|
||||
terraform apply -auto-approve
|
||||
@@ -7,7 +7,6 @@ provider "oci" {
|
||||
tenancy_ocid = var.tenancy_ocid
|
||||
user_ocid = var.user_ocid
|
||||
fingerprint = var.fingerprint
|
||||
private_key_path = "~/.oci/oci_api_key.pem"
|
||||
|
||||
private_key_path = var.key_file
|
||||
region = var.region
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
variable "tenancy_ocid" {}
|
||||
variable "user_ocid" {}
|
||||
variable "fingerprint" {}
|
||||
variable "key_file" {}
|
||||
variable "region" {
|
||||
description = "the OCI region where resources will be created"
|
||||
type = string
|
||||
|
||||
@@ -3,7 +3,7 @@ terraform {
|
||||
required_providers {
|
||||
oci = {
|
||||
source = "hashicorp/oci"
|
||||
version = "4.57.0"
|
||||
version = "4.61.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -135,8 +135,8 @@ resource "oci_core_subnet" "public" {
|
||||
resource "oci_core_subnet" "private" {
|
||||
for_each = { for idx, ad in local.zones : ad => idx }
|
||||
|
||||
cidr_block = cidrsubnet(oci_core_vcn.main.cidr_block, 8, each.value + 4)
|
||||
ipv6cidr_block = cidrsubnet(oci_core_vcn.main.ipv6cidr_blocks[0], 8, each.value + 11)
|
||||
cidr_block = cidrsubnet(oci_core_vcn.main.cidr_block, 8, each.value + 8)
|
||||
ipv6cidr_block = cidrsubnet(oci_core_vcn.main.ipv6cidr_blocks[0], 8, each.value + 16)
|
||||
compartment_id = var.compartment_ocid
|
||||
vcn_id = oci_core_vcn.main.id
|
||||
route_table_id = oci_core_route_table.private.id
|
||||
|
||||
@@ -4,7 +4,7 @@ variable "tenancy_ocid" {}
|
||||
variable "user_ocid" {}
|
||||
variable "fingerprint" {}
|
||||
variable "key_file" {
|
||||
default = "~/.oci/oci_public.pem"
|
||||
default = "~/.oci/oci_main_terraform_public.pem"
|
||||
}
|
||||
|
||||
variable "project" {
|
||||
|
||||
Reference in New Issue
Block a user