-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from byu-oit/feature-output-resources
Feature output resources
- Loading branch information
Showing
4 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,7 +30,7 @@ In a clean directory, create a `main.tf` file that looks like: | |
|
||
```hcl | ||
module "bastion" { | ||
source = "[email protected]:byu-oit/terraform-aws-bastion.git?ref=v1.0.1" | ||
source = "[email protected]:byu-oit/terraform-aws-bastion.git?ref=v1.0.2" | ||
env = "prd" | ||
vpc_vpn_to_campus = true | ||
netid = "mynetid" | ||
|
@@ -65,7 +65,7 @@ The bastion is really intended to be ephemeral (spin it up, use it, tear it down | |
| Name | Description | Default Value | | ||
| --- | --- | --- | | ||
| env | Environment of the AWS Account (for finding the shared VPC and tagging the bastion) (e.g. dev, prd)| | | ||
| vpc_vpn_to_campus | Retrieve VPC info for the VPC that has VPN access to campus | false | | ||
| vpc_vpn_to_campus | Set to true if the bastion needs to be in the VPC that has VPN access to campus | false | | ||
| netid | Your Net ID (for naming the bastion) | | | ||
| public_key | Public SSH Key (e.g. \"ssh-rsa AA....Qw== comment\"). | | | ||
| ingress_cidrs | IP Address Ranges that should have access to the bastion. | ["128.187.0.0/16"] | | ||
|
@@ -74,8 +74,11 @@ The bastion is really intended to be ephemeral (spin it up, use it, tear it down | |
| Name | Description | | ||
| --- | --- | | ||
| connect | SSH connection details for the bastion | | ||
| ec2_instance | The bastion EC2 Instance | | ||
| security_group | The security group that controls access to the bastion | | ||
| key_pair | The SSH keypair assigned to the bastion | | ||
|
||
## Resources | ||
* An EC2 Instance (the bastion) in a public subnet | ||
* A Security Group allowing SSH on port 22 from campus | ||
* A keypair using the public key input variable (granting access to the EC2 instance) | ||
* A keypair using the public key input variable (granting access to the EC2 instance) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
module "bastion" { | ||
source = "[email protected]:byu-oit/terraform-aws-bastion.git?ref=v1.0.1" | ||
source = "[email protected]:byu-oit/terraform-aws-bastion.git?ref=v1.0.2" | ||
env = "prd" | ||
vpc_vpn_to_campus = true | ||
netid = "mynetid" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,15 @@ | ||
output "connect" { | ||
value = "ssh ec2-user@${aws_instance.bastion.public_ip}" | ||
} | ||
|
||
output "ec2_instance" { | ||
value = aws_instance.bastion | ||
} | ||
|
||
output "security_group" { | ||
value = aws_security_group.sg | ||
} | ||
|
||
output "key_pair" { | ||
value = aws_key_pair.key | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters