Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set environment tag to staging #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions 01_05_base/terraform.tfvars.backup

This file was deleted.

11 changes: 8 additions & 3 deletions 02_10_count/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ resource "aws_security_group" "sg-nodejs-instance" {
}

# INSTANCE
resource "aws_instance" "nodejs1" {
//count = 4
resource "aws_instance" "node_instances" {
count = 4

ami = data.aws_ami.aws-linux.id
instance_type = var.environment_instance_settings["PROD"].instance_type
Expand All @@ -156,6 +156,11 @@ resource "aws_instance" "nodejs1" {
tags = {Environment = var.environment_list[0]}
}

resource "aws_iam_user" "iam-users" {
for_each = var.iam_accounts

name = each.key
}

# //////////////////////////////
# DATA
Expand Down Expand Up @@ -186,5 +191,5 @@ data "aws_ami" "aws-linux" {
# OUTPUT
# //////////////////////////////
output "instance-dns" {
value = aws_instance.nodejs1.public_dns
value = aws_instance.node_instances.*.public_dns
}
5 changes: 0 additions & 5 deletions 03_07_custommodule/terraform.tfvars.backup

This file was deleted.

2 changes: 1 addition & 1 deletion 04_05_terraform_cloud_vcs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ variable "instance_count" {
variable "instance_tags" {
type = map
default = {
"environment" = "dev"
"environment" = "staging"
}
}
# //////////////////////////////
Expand Down