Skip to content

Commit

Permalink
Add test fixture files
Browse files Browse the repository at this point in the history
  • Loading branch information
dbanck committed Mar 21, 2024
1 parent 182fa04 commit 9e79db6
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 0 deletions.
Empty file added test/fixtures/ai/main.tf
Empty file.
3 changes: 3 additions & 0 deletions test/fixtures/ai/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
variable "agi" {
default = false
}
21 changes: 21 additions & 0 deletions test/fixtures/compute/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

resource "google_compute_network" "vpc_network" {
name = "terraform-network"
}

resource "google_compute_instance" "vm_instance" {
name = var.instance_name
machine_type = var.machine_type

boot_disk {
initialize_params {
image = "debian-cloud/debian-11"
}
}

network_interface {
network = google_compute_network.vpc_network.name
access_config {
}
}
}
3 changes: 3 additions & 0 deletions test/fixtures/compute/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "ip" {
value = google_compute_instance.vm_instance.network_interface[0].network_ip
}
9 changes: 9 additions & 0 deletions test/fixtures/compute/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
variable "instance_name" {
type = string
description = "Name of the compute instance"
}

variable "machine_type" {
type = string
default = "f1-micro"
}
22 changes: 22 additions & 0 deletions test/fixtures/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
terraform {
required_providers {
google = {
source = "hashicorp/google"
version = "~> 4.0"
}
}
}

provider "google" {
credentials = file(var.credentials_file)

project = var.project
region = var.region
zone = var.zone
}

module "compute" {
source = "./compute"

instance_name = "terraform-machine"
}
1 change: 1 addition & 0 deletions test/fixtures/terraform.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zone = "us-central1-c"
15 changes: 15 additions & 0 deletions test/fixtures/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
variable "project" {
type = string
}

variable "credentials_file" {
type = string
}

variable "region" {
default = "us-central1"
}

variable "zone" {
default = "us-central1-c"
}

0 comments on commit 9e79db6

Please sign in to comment.