/AWS-Core-Management

AWS Core Management with Terraform

Primary LanguageTypeScript

AWS Core Management

index

Description

This project is a simple example of how to use Terraform to manage AWS resources.

Technologies

Terraform Python Flask React Next.js

Requirements

Usage

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:

Tutorial

  1. Register in the plataform with username, password, AWS Access Key ID and AWS Secret Access Key. Tutorial 1
  2. After registering, you will be redirected to the login page. Log in with the username and password you registered. Tutorial 2
  3. 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. Tutorial 3
  4. You can select a specific region by clicking on the region name. Here you can see the AWS resources. Tutorial 4
  5. Create a new resource by clicking on the Create button after selecting the resource you want to create. Tutorial 5
  6. Update the region configuration by clicking on the Update Region. Tutorial 6

Concepts

Conceito C+

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.

Conceito B

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;

Conceito A

Criar:

  • Criar um HA de servidores web.

Format of variables in Terraform JSON

  • 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": ["*"]
  }
}

Format of JSON variable file

{
  "aws-region": "us-east-2",
  "security_groups": [],
  "instances": [],
  "users": [],
  "users_groups": []
}