Skip to content

Commit

Permalink
test: implement openvpn basic (hadenlabs#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
luismayta committed May 3, 2021
1 parent 422869f commit aa436a8
Show file tree
Hide file tree
Showing 6 changed files with 124 additions and 0 deletions.
34 changes: 34 additions & 0 deletions test/openvpn-basic/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions test/openvpn-basic/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module "main" {
source = "../.."
public_key = var.public_key
private_key = var.private_key
admin_user = var.admin_user
storage_path = var.storage_path
}
9 changes: 9 additions & 0 deletions test/openvpn-basic/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
output "instance" {
description = "show instance module"
value = module.main.instance
}

output "instance_ip" {
description = "show ip of instance"
value = module.main.instance_ip
}
9 changes: 9 additions & 0 deletions test/openvpn-basic/provider.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
provider "aws" {
region = var.aws_region
}

provider "template" {}

provider "null" {}

provider "local" {}
39 changes: 39 additions & 0 deletions test/openvpn-basic/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# ---------------------------------------------------------------------------------------------------------------------
# ENVIRONMENT VARIABLES
# Define these secrets as environment variables.
# ---------------------------------------------------------------------------------------------------------------------

# ---------------------------------------------------------------------------------------------------------------------
# REQUIRED VARIABLES
# These variables must be set when using this module.
# ---------------------------------------------------------------------------------------------------------------------

# ---------------------------------------------------------------------------------------------------------------------
# OPTIONAL VARIABLES
# These variables have defaults, but may be overridden.
# ---------------------------------------------------------------------------------------------------------------------

variable "aws_region" {
description = "region of aws"
type = string
}

variable "public_key" {
description = "path of public key"
type = string
}

variable "private_key" {
description = "path of private key"
type = string
}

variable "admin_user" {
description = "username of admin"
type = string
}

variable "storage_path" {
description = "storage path"
type = string
}
26 changes: 26 additions & 0 deletions test/openvpn-basic/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
terraform {
required_version = ">=0.13.0"
required_providers {

aws = {
source = "hashicorp/aws"
version = ">=3.2.0"
}

template = {
source = "hashicorp/template"
version = ">=1.0.0"
}

null = {
source = "hashicorp/null"
version = ">=0.1.0"
}

local = {
source = "hashicorp/local"
version = ">=1.3.0"
}

}
}

0 comments on commit aa436a8

Please sign in to comment.