File tree Expand file tree Collapse file tree 3 files changed +27
-6
lines changed
Expand file tree Collapse file tree 3 files changed +27
-6
lines changed Original file line number Diff line number Diff line change 1212 required : true
1313 type : string
1414 aws_session_token :
15- description : " AWS Session Token from Learner Lab (if required) "
16- required : false
15+ description : " AWS Session Token from Learner Lab"
16+ required : true
1717 type : string
1818 push :
1919 branches :
4141 cd infrastructure/terraform
4242 terraform apply -auto-approve
4343 env :
44- AWS_ACCESS_KEY_ID : ${{ github.event.inputs.aws_access_key_id }}
45- AWS_SECRET_ACCESS_KEY : ${{ github.event.inputs.aws_secret_access_key }}
46- AWS_SESSION_TOKEN : ${{ github.event.inputs.aws_session_token }}
44+ TF_VAR_aws_access_key : ${{ github.event.inputs.aws_access_key_id }}
45+ TF_VAR_aws_secret_key : ${{ github.event.inputs.aws_secret_access_key }}
46+ TF_VAR_aws_session_token : ${{ github.event.inputs.aws_session_token }}
4747
4848 - name : Get EC2 Public IP
4949 id : get-ip
Original file line number Diff line number Diff line change 11provider "aws" {
2- region = var. aws_region
2+ region = var. aws_region
3+ access_key = var. aws_access_key
4+ secret_key = var. aws_secret_key
5+ token = var. aws_session_token
36}
47
58# Create a security group
Original file line number Diff line number Diff line change @@ -4,6 +4,24 @@ variable "aws_region" {
44 default = " us-east-1"
55}
66
7+ variable "aws_access_key" {
8+ description = " AWS access key"
9+ type = string
10+ sensitive = true
11+ }
12+
13+ variable "aws_secret_key" {
14+ description = " AWS secret key"
15+ type = string
16+ sensitive = true
17+ }
18+
19+ variable "aws_session_token" {
20+ description = " AWS session token"
21+ type = string
22+ sensitive = true
23+ }
24+
725variable "ami_id" {
826 description = " AMI ID for the EC2 instance"
927 type = string
You can’t perform that action at this time.
0 commit comments