Skip to content

Commit

Permalink
Merge pull request #100 from canonical/minor-terraform-module-stuff
Browse files Browse the repository at this point in the history
Minor terraform module stuff
  • Loading branch information
plars authored Sep 20, 2023
2 parents f3d6b41 + 6830440 commit 2cc5822
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 35 deletions.
35 changes: 0 additions & 35 deletions terraform/testflinger.tf → terraform/main.tf
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
terraform {
required_providers {
juju = {
version = "~> 0.7.0"
source = "juju/juju"
}
}
}

provider "juju" {}


variable "environment" {
description = "The environment to deploy to (dev, staging, prod)"
}

variable "external_ingress_hostname" {
description = "External hostname for the ingress"
type = string
}

variable "tls_secret_name" {
description = "Secret where the TLS certificate for ingress is stored"
type = string
}

variable "db_offer" {
description = "Name of the juju offer for mongodb to use for the cross-model relation"
type = string
}

locals {
app_model = "testflinger-${var.environment}"
}

resource "juju_application" "testflinger" {
name = "testflinger"
model = local.app_model
Expand Down
22 changes: 22 additions & 0 deletions terraform/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
variable "environment" {
description = "The environment to deploy to (dev, staging, prod)"
}

variable "external_ingress_hostname" {
description = "External hostname for the ingress"
type = string
}

variable "tls_secret_name" {
description = "Secret where the TLS certificate for ingress is stored"
type = string
}

variable "db_offer" {
description = "Name of the juju offer for mongodb to use for the cross-model relation"
type = string
}

locals {
app_model = "testflinger-${var.environment}"
}
8 changes: 8 additions & 0 deletions terraform/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
juju = {
version = "~> 0.7.0"
source = "juju/juju"
}
}
}

0 comments on commit 2cc5822

Please sign in to comment.