Working tofu plan
This commit is contained in:
1 parent
bb8b6dd978
commit
f81ad1c887
5 files changed
+47
-39
No files matched your search
@@ -12,20 +12,18 @@ provider "linode" {
|
|||||||
token = var.token
|
token = var.token
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vps1" {
|
module "main_vpc_subnet" {
|
||||||
|
source = "./modules/vpc-subnet"
|
||||||
|
}
|
||||||
|
|
||||||
|
module "ci_cd" {
|
||||||
source = "./modules/instance"
|
source = "./modules/instance"
|
||||||
label = "vps1"
|
label = "ci-cd"
|
||||||
root_pass = var.root_pass
|
root_pass = var.root_pass
|
||||||
}
|
}
|
||||||
|
|
||||||
module "vps2" {
|
module "observability" {
|
||||||
source = "./modules/instance"
|
source = "./modules/instance"
|
||||||
label = "vps2"
|
label = "observability"
|
||||||
root_pass = var.root_pass
|
|
||||||
}
|
|
||||||
|
|
||||||
module "vps3" {
|
|
||||||
source = "./modules/instance"
|
|
||||||
label = "vps3"
|
|
||||||
root_pass = var.root_pass
|
root_pass = var.root_pass
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
# Create a Linode
|
|
||||||
resource "linode_instance" "eqit_instance" {
|
resource "linode_instance" "eqit_instance" {
|
||||||
image = var.image
|
image = var.image
|
||||||
label = var.label
|
label = var.label
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
|
## Required Variables
|
||||||
|
variable "root_pass" {
|
||||||
|
description = "Your Linode's root user's password."
|
||||||
|
}
|
||||||
|
|
||||||
|
## Optional Variables
|
||||||
variable "image" {
|
variable "image" {
|
||||||
description = "Image to use for Linode instance"
|
description = "Image to use for Linode instance"
|
||||||
default = "linode/almalinux9"
|
default = "linode/almalinux9"
|
||||||
@@ -18,10 +24,6 @@ variable "type" {
|
|||||||
default = "g6-standard-1"
|
default = "g6-standard-1"
|
||||||
}
|
}
|
||||||
|
|
||||||
variable "root_pass" {
|
|
||||||
description = "Your Linode's root user's password."
|
|
||||||
}
|
|
||||||
|
|
||||||
variable "authorized_keys" {
|
variable "authorized_keys" {
|
||||||
description = "SSH Keys to use for the Linode."
|
description = "SSH Keys to use for the Linode."
|
||||||
type = list
|
type = list
|
||||||
|
|||||||
@@ -1,27 +1,12 @@
|
|||||||
terraform {
|
# Create a Linode VPC
|
||||||
required_providers {
|
resource "linode_vpc" "eqit_vpc" {
|
||||||
linode = {
|
label = var.vpc_label
|
||||||
source = "linode/linode"
|
region = var.region
|
||||||
# version = "..."
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure the Linode Provider
|
# Create a Linode VPC
|
||||||
provider "linode" {
|
resource "linode_vpc_subnet" "eqit_vpc_subnet" {
|
||||||
token = var.token
|
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"
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#}
|
|
||||||
@@ -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."
|
||||||
|
}
|
||||||
Reference in new issue
Block a user