netskopeoss / terraform-netskope-publisher-aws

Apache License 2.0
3 stars 4 forks source link

Netskope Publisher AWS Module

A Terraform Module that creates Netskope Publishers in an AWS VPC.

Usage

Single Netskope Publisher

provider "aws" {
  region = "us-east-1"
}

module "publisher-aws" {
  source  = "netskopeoss/publisher-aws/netskope"
  version = "0.1.1"

  publisher_name = "<publisher-name>"
  aws_key_name   = "<ssh-key-name>"
  aws_subnet         = "<subnet-id>"
  aws_security_group = "<sg-id>"

}

Multiple Netskope Publishers

provider "aws" {
  region = "us-east-1"
}

module "publisher-aws" {
  source  = "netskopeoss/publisher-aws/netskope"
  version = "0.1.1"

  for_each = toset(["01", "02", "03"])

  publisher_name = "<publisher-name>${each.key}"

  aws_key_name   = "<ssh-key-name>"
  aws_subnet         = "<subnet-id>"
  aws_security_group = "<sg-id>"

}

Use SSM Instead of User Data to Register Publishers

provider "aws" {
  region = "us-east-1"
}

module "publisher-aws" {
  source  = "netskopeoss/publisher-aws/netskope"
  version = "0.1.1"

  for_each = toset(["01", "02", "03"])

  publisher_name = "<publisher-name>${each.key}"

  aws_key_name   = "<ssh-key-name>"
  aws_subnet           = "<subnet-id>"
  aws_security_group   = "<sg-id>"
  iam_instance_profile = "<ssm-iam-role>"  //Must include IAM Instance Profile with SSM Policy.
  use_ssm              = true

}

Requirements

Name Version
terraform >= 1.1.7
aws >= 3.0
netskope 0.2.0

Providers

Name Version
aws >= 3.0
netskope 0.2.0

Modules

No modules.

Resources

Name Type
aws_instance.NPAPublisher resource
aws_ssm_association.register_publishers resource
aws_ssm_document.PublisherRegistration resource
netskope_publishers.Publisher resource
aws_ami.npa-publisher data source

Inputs

Name Description Type Default Required
ami_id Publisher AMI ID - Latest will be used if this is not speciified. string "" no
associate_public_ip_address Publisher Assigned Public IP or Not bool false no
aws_instance_type AWS Instance Type - t3.medium is the reccomended instance size. string "t3.medium" no
aws_key_name AWS SSH Key Name string n/a yes
aws_monitoring Enable Detailed Monitoring of AWS Instance bool true no
aws_security_group AWS Security Group Id string n/a yes
aws_subnet AWS Subnet Id string n/a yes
ebs_optimized Enable EBS Optimized bool true no
http_endpoint Metadata Service enabled or disabled string "enabled" no
http_tokens Metadata Service V2 optional or reuqired - Use SSM set to required string "optional" no
iam_instance_profile IAM Instance Profile - IAM Role to allow SSM string "" no
publisher_name Publisher Name string n/a yes
use_ssm Use SSM to Register Publisher - Use if http_tokens set to required - Must include IAM Instance Profile if used bool false no

Outputs

Name Description
ec2_instance_id ID of the EC2 Instance used for the Publisher
publisher_id ID of the Publisher
publisher_name Name of the Publisher
publisher_private_ip Private IP of the Publisher
publisher_public_ip Public IP of the Publisher
publisher_token Public IP of the Publisher