feat(oci): add

This commit is contained in:
Kat Inskip 2024-06-08 17:25:08 -07:00
parent 7f6562ea70
commit 1e79f4f23c
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
29 changed files with 308 additions and 34 deletions

View 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
}

View 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"
}
}
}

View 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
}