Working tofu plan

This commit is contained in:
Mike Holloway committed 2025-01-06 01:52:23 -05:00
1 parent bb8b6dd978
commit f81ad1c887
5 files changed
+47 -39

No files matched your search

+8 -10
View File
@@ -12,20 +12,18 @@ provider "linode" {
token = var.token
}
module "vps1" {
module "main_vpc_subnet" {
source = "./modules/vpc-subnet"
}
module "ci_cd" {
source = "./modules/instance"
label = "vps1"
label = "ci-cd"
root_pass = var.root_pass
}
module "vps2" {
module "observability" {
source = "./modules/instance"
label = "vps2"
root_pass = var.root_pass
}
module "vps3" {
source = "./modules/instance"
label = "vps3"
label = "observability"
root_pass = var.root_pass
}
-1
View File
@@ -1,4 +1,3 @@
# Create a Linode
resource "linode_instance" "eqit_instance" {
image = var.image
label = var.label
+6 -4
View File
@@ -1,3 +1,9 @@
## Required Variables
variable "root_pass" {
description = "Your Linode's root user's password."
}
## Optional Variables
variable "image" {
description = "Image to use for Linode instance"
default = "linode/almalinux9"
@@ -18,10 +24,6 @@ variable "type" {
default = "g6-standard-1"
}
variable "root_pass" {
description = "Your Linode's root user's password."
}
variable "authorized_keys" {
description = "SSH Keys to use for the Linode."
type = list
+9 -24
View File
@@ -1,27 +1,12 @@
terraform {
required_providers {
linode = {
source = "linode/linode"
# version = "..."
}
}
# Create a Linode VPC
resource "linode_vpc" "eqit_vpc" {
label = var.vpc_label
region = var.region
}
# Configure the Linode Provider
provider "linode" {
token = var.token
# Create a Linode VPC
resource "linode_vpc_subnet" "eqit_vpc_subnet" {
vpc_id = linode_vpc.eqit_vpc.id
label = var.vpc_subnet_label
ipv4 = "10.0.10.0/16"
}
data linode_instances "eqit_instances" {
filter {
name = "tags"
values = ["tofu-manage"]
}
}
# Create a Linode
#resource "linode_instance" "observability" {
# label = "observability"
#
#
#}
+24
View File
@@ -0,0 +1,24 @@
## Required Variables
#variable "root_pass" {
# description = "Your Linode's root user's password."
#}
## Optional Variables
variable "vpc_label" {
description = "The VPC's label is for display purposes only, but must be unique."
default = "EQIT"
}
variable "vpc_subnet_label" {
description = "The subnet's label is for display purposes only, but must be unique."
default = "lan"
}
variable "region" {
description = "The region where your VPC will be located."
default = "us-ord"
}
variable "description" {
description = "EQIT VPC Default Description."
default = "EQIT VPC Default Description."
}