diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e7467fd --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +# Local .terraform directories +**/.terraform/* + +# .tfstate files +*.tfstate +*.tfstate.* +.terraform.lock.hcl + +# Crash log files +crash.log + +# Ignore any .tfvars files that are generated automatically for each Terraform run. Most +# .tfvars files are managed as part of configuration and so should be included in +# version control. +# +# example.tfvars + +# Ignore override files as they are usually used to override resources locally and so +# are not checked in +override.tf +override.tf.json +*_override.tf +*_override.tf.json + +# Include override files you do wish to add to version control using negated pattern +# +# !example_override.tf + +# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan +# example: *tfplan* diff --git a/README.md b/README.md index fa8d9cc..c8e49ff 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ To connect to the VM: - Create a SSH key on your Github account: [Add a ssh key documentation](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) - Share your handle Github with Padok's team member -- Launch a "Remote SSH Session" with VSCode extension via the command `ssh cs@.cs.padok.school` +- Launch a "Remote SSH Session" with VSCode extension via the command `ssh eleve@.cs.padok.school` ## Explore the Terraform code diff --git a/iac/dev.tfvars b/iac/dev.tfvars index 60e3f16..85e9403 100644 --- a/iac/dev.tfvars +++ b/iac/dev.tfvars @@ -1,4 +1,6 @@ -environment = "dev" -vpc_id = "vpc-0fbfe8a414325b6e6" -private_subnets = ["subnet-0e185b7265256ab22", "subnet-0b4e47a0eb4f52406"] -public_subnets = ["subnet-000da12999c598b26", "subnet-054b28934c16043b5"] \ No newline at end of file + +aws_region = "eu-west-3" +environment = "dev" +vpc_id = "vpc-02b1b1107bdb3dad4" +public_subnets = ["subnet-0fd3481b698bd44b7","subnet-0f60f004d87f6e1c5"] +private_subnets = ["subnet-07291e52d7cc7d0aa","subnet-0c1eef5af5c50f14a"] diff --git a/iac/prd.tfvars b/iac/prd.tfvars index 2c13c8a..a748652 100644 --- a/iac/prd.tfvars +++ b/iac/prd.tfvars @@ -1,5 +1,6 @@ -environment = "prd" -vpc_id = "vpc-06987f5dade98b59a" -private_subnets = ["subnet-0aaae4f50bfd26d64", "subnet-04659d20c010aac58"] -public_subnets = ["subnet-0b93808f63a1676d4", "subnet-023ee16302deb756c"] \ No newline at end of file +aws_region = "eu-west-3" +environment = "prd" +vpc_id = "vpc-0dd9c0f79c31c777e" +public_subnets = ["subnet-01af9d35b4279a9c2","subnet-0267c286d9c051e9c"] +private_subnets = ["subnet-0438f5549da998fd6","subnet-0ea9360b02a77cc08"] diff --git a/vscode-box/main.tf b/vscode-box/main.tf index 46b597d..5702432 100644 --- a/vscode-box/main.tf +++ b/vscode-box/main.tf @@ -145,5 +145,5 @@ resource "aws_route53_record" "vm" { # Output output "public_dns" { - value = {for user in local.github_usernames: user => "ssh cs@${user}.cs.padok.school"} + value = {for user in local.github_usernames: user => "ssh eleve@${user}.cs.padok.school"} } diff --git a/vscode-box/userdata.yaml.tpl b/vscode-box/userdata.yaml.tpl index df0c530..7ea9564 100644 --- a/vscode-box/userdata.yaml.tpl +++ b/vscode-box/userdata.yaml.tpl @@ -2,7 +2,7 @@ groups: - docker users: - - name: cs + - name: eleve ssh_import_id: - gh:${github_username} lock_passwd: true diff --git a/vscode-box/usernames.tf b/vscode-box/usernames.tf index 720d93b..eccecf9 100644 --- a/vscode-box/usernames.tf +++ b/vscode-box/usernames.tf @@ -1,5 +1,8 @@ locals { github_usernames = toset([ - "Anne-Flore","oussamaca" + "Anne-Flore", + "oussamaca", + # Antoine Ansari + "Mohsen51" ]) } diff --git a/vscode-box/vpc.tf b/vscode-box/vpc.tf index f8414b7..9aeb185 100644 --- a/vscode-box/vpc.tf +++ b/vscode-box/vpc.tf @@ -2,7 +2,7 @@ locals { common_tags = { source = "Dojo VSCode Box" } - env_name = "dojocs" + env_name = "dojo" } resource "aws_vpc" "vpc" { @@ -10,7 +10,7 @@ resource "aws_vpc" "vpc" { enable_dns_support = true enable_dns_hostnames = true tags = merge(local.common_tags, - { Name = "Dojo CS" }) + { Name = "Dojo" }) } data "aws_availability_zones" "available" {