Working tofu plan
This commit is contained in:
1 parent
bb8b6dd978
commit
f81ad1c887
5 files changed
+51
-43
No files matched your search
@@ -1,31 +1,29 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
linode = {
|
||||
source = "linode/linode"
|
||||
# version = "..."
|
||||
linode = {
|
||||
source = "linode/linode"
|
||||
# version = "..."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Configure the Linode Provider
|
||||
provider "linode" {
|
||||
token = var.token
|
||||
token = var.token
|
||||
}
|
||||
|
||||
module "vps1" {
|
||||
source = "./modules/instance"
|
||||
label = "vps1"
|
||||
root_pass = var.root_pass
|
||||
module "main_vpc_subnet" {
|
||||
source = "./modules/vpc-subnet"
|
||||
}
|
||||
|
||||
module "vps2" {
|
||||
module "ci_cd" {
|
||||
source = "./modules/instance"
|
||||
label = "vps2"
|
||||
root_pass = var.root_pass
|
||||
label = "ci-cd"
|
||||
root_pass = var.root_pass
|
||||
}
|
||||
|
||||
module "vps3" {
|
||||
module "observability" {
|
||||
source = "./modules/instance"
|
||||
label = "vps3"
|
||||
root_pass = var.root_pass
|
||||
label = "observability"
|
||||
root_pass = var.root_pass
|
||||
}
|
||||
@@ -1,4 +1,3 @@
|
||||
# Create a Linode
|
||||
resource "linode_instance" "eqit_instance" {
|
||||
image = var.image
|
||||
label = var.label
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
#
|
||||
#
|
||||
#}
|
||||
@@ -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