Skip to content

Commit

Permalink
examples added and modules defaults updated
Browse files Browse the repository at this point in the history
  • Loading branch information
fmunoz committed Jul 21, 2022
1 parent 51f44c6 commit 067d916
Show file tree
Hide file tree
Showing 5 changed files with 198 additions and 8 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ module "ise-deployment" {

<!-- - [SQS queues with server-side encryption (SSE) using KMS and without SSE](https://github.com/terraform-aws-modules/terraform-aws-sqs/tree/master/examples/complete) -->

## Conditional creation

Sometimes you need to have a way to create SQS queue conditionally but Terraform does not allow to use `count` inside `module` block, so the solution is to specify argument `create`.

```hcl
# This is an example
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements
Expand Down

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

22 changes: 22 additions & 0 deletions examples/ise-deployment-with-network-ise-creation/aws.tfvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
aws_instance_type = "c5.4xlarge"
aws_ise_ami = "ami-0a8b4f863885c3372"
aws_keypair_name = "ise-testing"
aws_public_access_cidr = "0.0.0.0/0"
aws_region = "us-west-2"
aws_subnet_cidr = "10.10.10.0/24"
aws_subnet_name = "ISE Subnet"
aws_vpc_cidr = "10.10.0.0/16"
aws_vpc_name = "ISE"
aws_create_network = true
aws_security_group_name = "ISE VPC SG Group"
ise_base_hostname = "ISE"
ise_dns_server = "208.67.220.220"
ise_domain = "example.com"
ise_large_deployment = 0
ise_medium_deployment = 0
ise_ntp_server = "10.10.10.1"
ise_password = "Altus123!"
ise_single_node_deployment = 0
ise_small_deployment = 1
ise_timezone = "America/Costa_Rica"
ise_username = "admin"
27 changes: 27 additions & 0 deletions examples/ise-deployment-with-network-ise-creation/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@

module "ise-deployment" {
source = "fmunozmiranda/ise-deployment/aws"
version = "1.0.1"
# insert the 19 required variables here
ise_base_hostname= var.ise_base_hostname
ise_username = var.ise_username
aws_instance_type= var.aws_instance_type
aws_ise_ami= var.aws_ise_ami
aws_keypair_name= var.aws_keypair_name
aws_public_access_cidr= var.aws_public_access_cidr
aws_region= var.aws_region
aws_security_group_name= var.aws_security_group_name
aws_subnet_cidr= var.aws_subnet_cidr
aws_subnet_name= var.aws_subnet_name
aws_vpc_cidr=var.aws_vpc_cidr
aws_vpc_name= var.aws_vpc_name
ise_dns_server= var.ise_dns_server
ise_domain= var.ise_domain
ise_password= var.ise_password
ise_ntp_server= var.ise_ntp_server
ise_single_node_deployment= var.ise_single_node_deployment
ise_small_deployment= var.ise_small_deployment
ise_timezone= var.ise_timezone
aws_create_network=var.aws_create_network
}

127 changes: 127 additions & 0 deletions examples/ise-deployment-with-network-ise-creation/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
variable "ise_base_hostname" {
description = "ISE Server Base Hostname"
type = string
}

variable "ise_username" {
description = "ISE Administrator Username"
type = string
}


variable "ise_password" {
description = "ISE Administrator Password"
type = string
sensitive = true
}

variable "ise_ntp_server" {
description = "ISE Server NTP"
type = string
}

variable "ise_dns_server" {
description = "ISE Server DNS"
type = string
}

variable "ise_domain" {
description = "ISE Server Domain"
type = string
}

variable "ise_timezone" {
description = "ISE Server Timezone"
type = string
}

variable "aws_ise_ami" {
description = "ISE AWS AMI ID"
validation {
condition = length(var.aws_ise_ami) > 4 && substr(var.aws_ise_ami, 0, 4) == "ami-"
error_message = "The aws_ise_ami value must be a valid AMI id, starting with \"ami-\"."
}
type = string
}

variable "aws_vpc_name" {
description = "AWS VPC Name"
type = string
}

variable "aws_vpc_cidr" {
description = "AWS VPC CIDR"
type = string
}

variable "aws_subnet_name" {
description = "AWS Subnet Name"
type = string
}

variable "aws_security_group_name" {
description = "AWS Security Group Name"
type = string
}

variable "aws_subnet_cidr" {
description = "AWS Subnet CIDR"
type = string
}

variable "aws_region" {
description = "AWS Region"
type = string
}

variable "aws_public_access_cidr" {
description = "CIDR from where access should be permitted to the ISE server"
type = string
}

variable "aws_create_network" {
description = "Define if terraform needs to create the VPC network and subnet"
type = bool
default = true
}

variable "aws_keypair_name" {
description = "AWS SSH key pair"
type = string
}

variable "aws_instance_type" {
description = "AWS Instance type"
type = string
}

variable "ise_single_node_deployment" {
description = "ISE Single Node Deployment"
type = number
default = 0
}

variable "ise_small_deployment" {
description = "ISE Small Deployment"
type = number
default = 0
}

variable "ise_medium_deployment" {
description = "ISE Medium Deployment"
type = number
default = 0
}

variable "ise_large_deployment" {
description = "ISE Large Deployment"
type = number
default = 0
}

variable "ise_psn_instances" {
description = "ISE PSN Instances"
type = number
default = 0
}

0 comments on commit 067d916

Please sign in to comment.