This project is a simple example of how to use Terraform to manage AWS resources.
Execute the install.sh
script to install the dependencies and configure the infrastructure.
$ ./install.sh
Open your browser and go to the URL http://localhost:3000
. You should see the following page:
- Register in the plataform with username, password, AWS Access Key ID and AWS Secret Access Key.
- After registering, you will be redirected to the login page. Log in with the username and password you registered.
- After logging in, you will be redirected to the home page. Here you can see the AWS regions. Create a new region by clicking on the
Create
button after selecting the region you want to create. - You can select a specific region by clicking on the region name. Here you can see the AWS resources.
- Create a new resource by clicking on the
Create
button after selecting the resource you want to create. - Update the region configuration by clicking on the
Update Region
.
Criar:
- VPC criação de uma VPC e sub-rede; instâncias: esta funcionalidade deverá permitir a escolha de pelo menos 2 tipos de configuração de hosts; ainda deverá ser possível aumentar e diminuir a quantidade de instâncias; security group: criação e a associação de grupos de segurança com instâncias; Usuário no IAM.
Deletar:
- Instâncias, grupos de segurança e usuário.
Listar:
- Aplicação deverá listar todas instâncias e suas regiões, usuários, grupos de segurança e suas regras.
Criar:
- Regras em security group; Instância em mais de uma região; Associar algum tipo de restrição de acesso a um usuário;
Deletar:
- Regras de security group; recursos implantados na Região;
Criar:
- Criar um HA de servidores web.
- Security Group
{
"id": "sg-0a1b2c3d",
"name": "sg-tcp/udp-22 - davirvs",
"description": "Security Group for EC2",
"ingress": [
{
"description": "SSH",
"from_port": 22,
"to_port": 22,
"protocol": "tcp",
"cidr_blocks": ["0.0.0.0/0"]
}
],
"egress": [
{
"description": "All",
"from_port": 0,
"to_port": 0,
"protocol": "-1",
"cidr_blocks": ["0.0.0.0/0"]
}
]
}
- EC2
{
"name": "davirvs1_ubuntu2204",
"ami": "ami-08c40ec9ead489470",
"instance_type": "t2.micro",
"security_groups_ids": ["sg-0a1b2c3d"]
}
- User
{
"name": "davirvsTeste1",
"policies": {
"name": "davirvsTeste1Restrictions",
"description": "Estas são as restrições do usuário davirvsTeste1",
"actions": ["ec2:DescribeInstances", "ec2:DescribeSecurityGroups"],
"resources": ["*"]
}
}
- Group
{
"id": "ug-0a1b2c3d",
"name": "davirvsGroups1",
"description": "davirvsGroups1 description",
"policies": {
"name": "davirvsGroups1Restrictions",
"description": "Estas são as restrições do grupo de usuários davirvsGroups1",
"actions": ["ec2:DescribeInstances", "ec2:DescribeSecurityGroups"],
"resources": ["*"]
}
}
{
"aws-region": "us-east-2",
"security_groups": [],
"instances": [],
"users": [],
"users_groups": []
}