How I can isolate the created resources in multiple module imports?

Dimitrios Desyllas - Apr 30 - - Dev Community

Upon this question:

I make my own terraform module that creates an EC-2 instance and a role for it:

resource "aws_instance" "instance" {
    ami=var.ami
    instance_type="t3a.micro"
    key_name = var.ssh_key
    iam_instance_profile = aws_iam_instance_profile.ec2_profile.name
    root_block_device {
        volume_size = 30
        volume_type = "gp3"
    }

    vpc_security_group_ids=var.ec2_security_groups

    # Ommitted for verbosity reduction
}

resource "aws_route53_record" "domain" {
  zone_id =

I try to make duplicate resources for each environment. Each resource is for a seperate client, therefore, I want each client to have its own folder instead of having seperate folders per environment.

Do you know how I can do that?

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Terabox Video Player