Skip to content

Commit

Permalink
Add VSI validation (#4)
Browse files Browse the repository at this point in the history
* Add VSI validation

* Update VSI template
  • Loading branch information
dubee committed Mar 4, 2022
1 parent 44cac4e commit dc7b73a
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 0 deletions.
24 changes: 24 additions & 0 deletions vsi-validation/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
resource "ibm_is_instance" "validation_instance" {
name = var.vsi_instance_name
image = var.vsi_id
profile = var.vpc_profile

primary_network_interface {
subnet = var.subnet_id
}

network_interfaces {
name = "eth1"
subnet = var.subnet_id
}

vpc = var.vpc_id
zone = var.subnet_zone
keys = [var.ssh_key_id]

timeouts {
create = "15m"
update = "15m"
delete = "15m"
}
}
34 changes: 34 additions & 0 deletions vsi-validation/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
variable "vsi_instance_name" {
description = "Name of the VSI instance to create"
type = string
}

variable "vsi_id" {
description = "ID of VSI to deploy"
type = string
}

variable "vpc_profile" {
description = "Profile of VPC"
type = string
}

variable "subnet_id" {
description = "ID of subnet to provision with"
type = string
}

variable "vpc_id" {
description = "ID of the VPC to deploy to"
type = string
}

variable "subnet_zone" {
description = "Zone of the subnet"
type = string
}

variable "ssh_key_id" {
description = "ID of SSH key to provision with"
type = string
}
8 changes: 8 additions & 0 deletions vsi-validation/versions.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
terraform {
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = "~> 1.39.0"
}
}
}

0 comments on commit dc7b73a

Please sign in to comment.