Rearranged token data, resolves 401 invalid token error on tofu apply

This commit is contained in:
Mike Holloway committed 2025-01-06 03:24:30 -05:00
1 parent 97f55eada6
commit 66f6d6df45
5 files changed
+33 -17

No files matched your search

+3 -14
View File
@@ -1,19 +1,6 @@
terraform {
required_providers {
linode = {
source = "linode/linode"
# version = "..."
}
}
}
# Configure the Linode Provider
provider "linode" {
token = var.token
}
module "main_vpc_subnet" { module "main_vpc_subnet" {
source = "./modules/vpc-subnet" source = "./modules/vpc-subnet"
vpc_subnet_token = var.token
} }
module "ci_cd" { module "ci_cd" {
@@ -22,6 +9,7 @@ module "ci_cd" {
root_pass = var.root_pass root_pass = var.root_pass
vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id
vpc_ipv4_addr = "10.0.10.2" vpc_ipv4_addr = "10.0.10.2"
instance_token = var.token
} }
module "observability" { module "observability" {
@@ -30,4 +18,5 @@ module "observability" {
root_pass = var.root_pass root_pass = var.root_pass
vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id
vpc_ipv4_addr = "10.0.10.3" vpc_ipv4_addr = "10.0.10.3"
instance_token = var.token
} }
+14
View File
@@ -1,3 +1,17 @@
terraform {
required_providers {
linode = {
source = "linode/linode"
# version = "..."
}
}
}
# Configure the Linode Provider
provider "linode" {
token = var.instance_token
}
resource "linode_instance" "eqit_instance" { resource "linode_instance" "eqit_instance" {
image = var.image image = var.image
label = var.label label = var.label
+2
View File
@@ -11,6 +11,8 @@ variable "vpc_ipv4_addr" {
description = "Linode VPC ipv4 address" description = "Linode VPC ipv4 address"
} }
variable "instance_token" {}
## Optional Variables ## Optional Variables
variable "image" { variable "image" {
description = "Image to use for Linode instance" description = "Image to use for Linode instance"
+13
View File
@@ -1,3 +1,16 @@
terraform {
required_providers {
linode = {
source = "linode/linode"
# version = "..."
}
}
}
# Configure the Linode Provider
provider "linode" {
token = var.vpc_subnet_token
}
# Create a Linode VPC # Create a Linode VPC
resource "linode_vpc" "eqit_vpc" { resource "linode_vpc" "eqit_vpc" {
label = var.vpc_label label = var.vpc_label
+1 -3
View File
@@ -1,7 +1,5 @@
## Required Variables ## Required Variables
#variable "root_pass" { variable "vpc_subnet_token" {}
# description = "Your Linode's root user's password."
#}
## Optional Variables ## Optional Variables
variable "vpc_label" { variable "vpc_label" {