Working vpc with two member instances
This commit is contained in:
parent
f81ad1c887
commit
784819ef34
2
main.tf
2
main.tf
@ -20,10 +20,12 @@ module "ci_cd" {
|
||||
source = "./modules/instance"
|
||||
label = "ci-cd"
|
||||
root_pass = var.root_pass
|
||||
vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id
|
||||
}
|
||||
|
||||
module "observability" {
|
||||
source = "./modules/instance"
|
||||
label = "observability"
|
||||
root_pass = var.root_pass
|
||||
vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id
|
||||
}
|
||||
|
||||
@ -5,4 +5,16 @@ resource "linode_instance" "eqit_instance" {
|
||||
type = var.type
|
||||
authorized_keys = var.authorized_keys
|
||||
root_pass = var.root_pass
|
||||
|
||||
interface {
|
||||
purpose = "public"
|
||||
}
|
||||
|
||||
interface {
|
||||
purpose = "vpc"
|
||||
subnet_id = var.vpc_subnet_id
|
||||
ipv4 {
|
||||
vpc = "10.0.10.2"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,6 +3,10 @@ variable "root_pass" {
|
||||
description = "Your Linode's root user's password."
|
||||
}
|
||||
|
||||
variable "vpc_subnet_id" {
|
||||
description = "Linode VPC Subnet ID"
|
||||
}
|
||||
|
||||
## Optional Variables
|
||||
variable "image" {
|
||||
description = "Image to use for Linode instance"
|
||||
|
||||
3
modules/vpc-subnet/outputs.tf
Normal file
3
modules/vpc-subnet/outputs.tf
Normal file
@ -0,0 +1,3 @@
|
||||
output "vpc_subnet_id" {
|
||||
value = linode_vpc_subnet.eqit_vpc_subnet.id
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user