-
Notifications
You must be signed in to change notification settings - Fork 4
Unity Terraform Components
Tom Barber edited this page Mar 4, 2022
·
6 revisions
We currently support the following Terraform components, please check the documentation for specific Unity configuration notes.
Amazon EC2 Amazon OpenSearch Amazon MemoryDB Kubernetes via Helm Charts
- some ami
- some other ami
To access the EC2 instance you need to supply a public key as part of the authentication mechanism. To do this, generate a keypair on your local machine and then provide the public part as an aws_key_pair
resource.
You can find instructions about creating a public key on multiple operating systems here
resource "aws_key_pair" "deployer" {
key_name = "deployer-key"
public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD3F6tyPEFEzV0LX3X8BsXdMsQz1x2cEikKDEY0aIj41qgxMCP/iteneqXSIFZBp5vizPvaoIR3Um9xK7PGoW8giupGn+EPuxIA4cDM4vzOqOkiMPhz5XK0whEjkVzTo4+S0puvDZuwIsdiW9mxhJc7tgBNL0cYlWSYVkz4G/fslNfRPW5mYAM49f4fhtxPb5ok4Q2Lg9dPKVHO/Bgeu5woMc7RY0p1ej6D4CKFE6lymSDJpW0YHX/wqE9+cfEauh7xZcG0q9t2ta6F6fmX0agvpFyZo8aFbXeUBr7osSCJNgvavWbM/06niWrOvYX2xwWdhXmXSrbX8ZbabVohBK41 [email protected]"
}
resource "aws_instance" "unity-ec2-instance" {
ami = var.ami_id
instance_type = "t3.xlarge"
key_name = var.ami_key_pair_name
#security_groups = ["${aws_security_group.ingress-all-test.id}"]
vpc_security_group_ids = [aws_security_group.ingress-all-test.id]
tags = {
Name = var.ami_name
Deployment = "unity-demo"
}
ebs_block_device {
device_name = "/dev/sda1"
volume_size = 50
}
subnet_id = aws_subnet.subnet-uno.id
}