Skip to content

Commit 860d90f

Browse files
committed
feat(project): add the core files for Terraform
1 parent 075d32b commit 860d90f

File tree

5 files changed

+86
-0
lines changed

5 files changed

+86
-0
lines changed

main.tf

Whitespace-only changes.

outputs.tf

Whitespace-only changes.

providers.tf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
provider "oci" {
2+
tenancy_ocid = var.tenancy_ocid
3+
user_ocid = var.user_ocid
4+
fingerprint = var.fingerprint
5+
private_key = var.private_key
6+
region = var.region
7+
}

variables.tf

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
#############################
2+
# Global
3+
#############################
4+
5+
variable "namespace" {
6+
type = string
7+
description = "Project name that will be use to identifiy the resources"
8+
default = "my-project"
9+
}
10+
11+
variable "stage" {
12+
type = string
13+
description = "Stage/environment name to tag and suffix the infrastructure composants"
14+
default = "dev"
15+
}
16+
17+
#############################
18+
# Oracle Cloud Infrastrcture
19+
#############################
20+
21+
variable "tenancy_ocid" {
22+
type = string
23+
description = "Tenancy OCID"
24+
default = null # Set with TF_VAR_tenancy_ocid environment variable on ~/.zprofile or ~/.bash_profile
25+
}
26+
27+
variable "user_ocid" {
28+
type = string
29+
description = "User OCID"
30+
default = null # Set with TF_VAR_user_ocid environment variable on ~/.zprofile or ~/.bash_profile
31+
}
32+
33+
variable "fingerprint" {
34+
type = string
35+
description = "Fingerprint"
36+
default = null # Set with TF_VAR_fingerprint environment variable on ~/.zprofile or ~/.bash_profile
37+
}
38+
39+
variable "private_key" {
40+
type = string
41+
description = "Private Key content"
42+
default = null # Set with TF_VAR_private_key environment variable on ~/.zprofile or ~/.bash_profile
43+
}
44+
45+
#############################
46+
# Location
47+
#############################
48+
49+
variable "region" {
50+
type = string
51+
description = "Default Region"
52+
default = "uk-london-1"
53+
}
54+
55+
#############################
56+
# Labels
57+
#############################
58+
59+
variable "labels" {
60+
type = map(string)
61+
description = "Default labels to associate to these resources"
62+
default = {
63+
# Only lowercase keys allowed
64+
businessunit = "mycompany"
65+
team = "devops"
66+
project = "VSCode Server"
67+
terraform = "true"
68+
}
69+
}

versions.tf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
terraform {
2+
required_version = ">= 1.0"
3+
4+
required_providers {
5+
oci = {
6+
source = "oracle/oci"
7+
version = "4.72.0"
8+
}
9+
}
10+
}

0 commit comments

Comments
 (0)