diff --git a/deployments/department2/team3/cvms/cvm1/terragrunt.hcl b/deployments/department2/team3/cvms/cvm1/terragrunt.hcl new file mode 100644 index 0000000..33fce12 --- /dev/null +++ b/deployments/department2/team3/cvms/cvm1/terragrunt.hcl @@ -0,0 +1,25 @@ +terraform { + source = "${get_path_to_repo_root()}/modules/cvm" +} + +locals { + env_vars = read_terragrunt_config(find_in_parent_folders("account.hcl")) + environment = local.env_vars.locals.environment +} + +include "root" { + path = find_in_parent_folders() +} + +dependency "team3_cvm_sg" { + config_path = "../../security-groups/sg2" + mock_outputs = { + security_group_id = "xxxxxx" + } +} + +inputs = { + cvm_name = "team3-cvm" + security_groups = [dependency.team3_cvm_sg.outputs.security_group_id] + is_delete_with_instance = true +} \ No newline at end of file diff --git a/deployments/department2/team3/security-groups/sg2/terragrunt.hcl b/deployments/department2/team3/security-groups/sg2/terragrunt.hcl new file mode 100644 index 0000000..4349ab5 --- /dev/null +++ b/deployments/department2/team3/security-groups/sg2/terragrunt.hcl @@ -0,0 +1,16 @@ +terraform { + source = "${get_path_to_repo_root()}/modules/security_group" +} + +locals { + env_vars = read_terragrunt_config(find_in_parent_folders("account.hcl")) + environment = local.env_vars.locals.environment +} + +include "root" { + path = find_in_parent_folders() +} + +inputs = { + name = "team3-sg2" +} \ No newline at end of file