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

Just up to the branch. #55

Open
wants to merge 7 commits into
base: main
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
3 changes: 1 addition & 2 deletions Day-3/modules/ec2_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ provider "aws" {
resource "aws_instance" "example" {
ami = var.ami_value
instance_type = var.instance_type_value
subnet_id = var.subnet_id_value
}
}
4 changes: 0 additions & 4 deletions Day-3/modules/ec2_instance/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ variable "ami_value" {
variable "instance_type_value" {
description = "value for instance_type"
}

variable "subnet_id_value" {
description = "value for the subnet_id"
}
6 changes: 3 additions & 3 deletions Day-6/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ variable "instance_type" {

module "ec2_instance" {
source = "./modules/ec2_instance"
ami = var.ami
instance_type = lookup(var.instance_type, terraform.workspace, "t2.micro")
}
ami_id = var.ami
instance_of_type = lookup(var.instance_type, terraform.workspace, "t2.micro")
}
10 changes: 5 additions & 5 deletions Day-6/modules/ec2_instance/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ provider "aws" {
region = "us-east-1"
}

variable "ami" {
variable "ami_id" {
description = "This is AMI for the instance"
}

variable "instance_type" {
variable "instance_of_type" {
description = "This is the instance type, for example: t2.micro"
}

resource "aws_instance" "example" {
ami = var.ami
instance_type = var.instance_type
}
ami = var.ami_id
instance_type = var.instance_of_type
}
6 changes: 3 additions & 3 deletions Day-7/02-vault-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ After creating the AppRole, you need to generate a Role ID and Secret ID pair. T
You can retrieve the Role ID using the Vault CLI:

```bash
vault read auth/approle/role/my-approle/role-id
vault read auth/approle/role/terraform/role-id
```

Save the Role ID for use in your Terraform configuration.
Expand All @@ -139,7 +139,7 @@ Save the Role ID for use in your Terraform configuration.
To generate a Secret ID, you can use the following command:

```bash
vault write -f auth/approle/role/my-approle/secret-id
vault write -f auth/approle/role/terraform/secret-id
```

This command generates a Secret ID and provides it in the response. Save the Secret ID securely, as it will be used for Terraform authentication.
This command generates a Secret ID and provides it in the response. Save the Secret ID securely, as it will be used for Terraform authentication.