mirror of
https://github.com/kittywitch/nixfiles.git
synced 2026-02-09 04:19:19 -08:00
feat(oci): add
This commit is contained in:
parent
7f6562ea70
commit
1e79f4f23c
29 changed files with 308 additions and 34 deletions
28
tf/oci_common_private_network/oci_provider.tf
Normal file
28
tf/oci_common_private_network/oci_provider.tf
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
variable "tenancy_ocid" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "user_ocid" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "private_key" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "region" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "fingerprint" {
|
||||
type = string
|
||||
}
|
||||
|
||||
# https://docs.oracle.com/en-us/iaas/Content/API/SDKDocs/terraformgettingstarted.htm
|
||||
provider "oci" {
|
||||
tenancy_ocid = var.tenancy_ocid
|
||||
user_ocid = var.user_ocid
|
||||
private_key = var.private_key
|
||||
region = var.region
|
||||
fingerprint = var.fingerprint
|
||||
}
|
||||
14
tf/oci_common_private_network/providers.tf
Normal file
14
tf/oci_common_private_network/providers.tf
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
terraform {
|
||||
required_providers {
|
||||
# Vendor: Hashicorp
|
||||
tls = {
|
||||
source = "hashicorp/tls"
|
||||
version = "4.0.5"
|
||||
}
|
||||
# Vendor: Oracle
|
||||
oci = {
|
||||
source = "oracle/oci"
|
||||
version = "5.45.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
27
tf/oci_common_private_network/vcn.tf
Normal file
27
tf/oci_common_private_network/vcn.tf
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
variable "cidr_blocks" {
|
||||
type = list(string)
|
||||
}
|
||||
|
||||
variable "display_name" {
|
||||
type = string
|
||||
}
|
||||
|
||||
variable "dns_label" {
|
||||
type = string
|
||||
}
|
||||
|
||||
resource "oci_core_vcn" "this" {
|
||||
compartment_id = var.tenancy_ocid
|
||||
|
||||
cidr_blocks = var.cidr_blocks
|
||||
display_name = var.display_name
|
||||
dns_label = var.dns_label
|
||||
}
|
||||
|
||||
locals {
|
||||
vcn = oci_core_vcn.this
|
||||
}
|
||||
|
||||
output "vcn_id" {
|
||||
value = local.vcn.id
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue