Rearranged token data, resolves 401 invalid token error on tofu apply
This commit is contained in:
1 parent
97f55eada6
commit
66f6d6df45
5 files changed
+33
-17
No files matched your search
@@ -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" {
|
||||
source = "./modules/vpc-subnet"
|
||||
vpc_subnet_token = var.token
|
||||
}
|
||||
|
||||
module "ci_cd" {
|
||||
@@ -22,6 +9,7 @@ module "ci_cd" {
|
||||
root_pass = var.root_pass
|
||||
vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id
|
||||
vpc_ipv4_addr = "10.0.10.2"
|
||||
instance_token = var.token
|
||||
}
|
||||
|
||||
module "observability" {
|
||||
@@ -30,4 +18,5 @@ module "observability" {
|
||||
root_pass = var.root_pass
|
||||
vpc_subnet_id = module.main_vpc_subnet.vpc_subnet_id
|
||||
vpc_ipv4_addr = "10.0.10.3"
|
||||
instance_token = var.token
|
||||
}
|
||||
@@ -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" {
|
||||
image = var.image
|
||||
label = var.label
|
||||
|
||||
@@ -11,6 +11,8 @@ variable "vpc_ipv4_addr" {
|
||||
description = "Linode VPC ipv4 address"
|
||||
}
|
||||
|
||||
variable "instance_token" {}
|
||||
|
||||
## Optional Variables
|
||||
variable "image" {
|
||||
description = "Image to use for Linode instance"
|
||||
|
||||
@@ -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
|
||||
resource "linode_vpc" "eqit_vpc" {
|
||||
label = var.vpc_label
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
## Required Variables
|
||||
#variable "root_pass" {
|
||||
# description = "Your Linode's root user's password."
|
||||
#}
|
||||
variable "vpc_subnet_token" {}
|
||||
|
||||
## Optional Variables
|
||||
variable "vpc_label" {
|
||||
|
||||
Reference in new issue
Block a user