-
Notifications
You must be signed in to change notification settings - Fork 644
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Formatting and types * Adding an analytics parameter * Add providers & versions * undo analytic source
- Loading branch information
1 parent
532bd4b
commit 3316cff
Showing
3 changed files
with
67 additions
and
25 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 |
---|---|---|
@@ -1,19 +1,24 @@ | ||
#Required: Always output the AWS Account ID | ||
output "cloudgoat_output_aws_account_id" { | ||
value = "${data.aws_caller_identity.aws-account-id.account_id}" | ||
value = data.aws_caller_identity.current.account_id | ||
} | ||
#Example: IAM User Credentials | ||
|
||
#Example: IAM User Access Key | ||
output "cloudgoat_output_johnsmith_access_key_id" { | ||
value = "${aws_iam_access_key.cg-johnsmith.id}" | ||
value = aws_iam_access_key.cg_johnsmith.id | ||
} | ||
|
||
#Example: IAM User Secret Key | ||
output "cloudgoat_output_johnsmith_secret_key" { | ||
value = "${aws_iam_access_key.cg-johnsmith.secret}" | ||
value = aws_iam_access_key.cg_johnsmith.secret | ||
} | ||
|
||
#Example: output for an SSH key | ||
output "cloudgoat_output_ssh_keyname" { | ||
value = "An SSH key-pair named ${var.ssh-key-name} has been generated stored in this directory." | ||
value = "An SSH key-pair named ${var.ssh_public_key} has been generated stored in this directory." | ||
} | ||
|
||
#Example: Always output any important URLs, IPs, or other such infromation | ||
output "cloudgoat_output_load_balancer_url" { | ||
value = "${aws_lb.cg-lb.dns_name}" | ||
value = aws_lb.cg_lb.dns_name | ||
} |
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
terraform { | ||
# Minimum Terraform version | ||
required_version = ">= 1.5" | ||
|
||
# Minimum AWS provider version | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 5.0.0" | ||
} | ||
} | ||
} | ||
|
||
# Specify what region and credentials to use | ||
provider "aws" { | ||
profile = var.profile | ||
region = var.region | ||
} |
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,33 +1,52 @@ | ||
#Required: AWS Profile | ||
#Required | ||
variable "profile" { | ||
|
||
description = "The AWS profile to use" | ||
type = string | ||
} | ||
#Required: AWS Region | ||
|
||
#Required | ||
variable "region" { | ||
default = "us-east-1" | ||
type = string | ||
} | ||
#Required: CGID Variable for unique naming | ||
variable "cgid" { | ||
|
||
#Required | ||
variable "cgid" { | ||
description = "CGID variable for unique naming" | ||
type = string | ||
} | ||
#Required: User's Public IP Address(es) | ||
|
||
#Required | ||
variable "cg_whitelist" { | ||
type = list | ||
description = "User's public IP address(es)" | ||
default = ["0.0.0.0/0"] | ||
type = list(string) | ||
} | ||
|
||
#Example | ||
variable "rds_username" { | ||
description = "RDS PostgreSQL Instance Username" | ||
default = "cgadmin" | ||
type = string | ||
} | ||
|
||
#Example: RDS PostgreSQL Instance Credentials | ||
variable "rds-username" { | ||
default = "cgadmin" | ||
#Example | ||
variable "rds_password" { | ||
description = "RDS PostgreSQL Instance Password" | ||
default = "Purplepwny2029" | ||
type = string | ||
} | ||
variable "rds-password" { | ||
default = "Purplepwny2029" | ||
|
||
#Example | ||
variable "ssh_public_key" { | ||
description = "SSH Public Key" | ||
default = "../cloudgoat.pub" | ||
type = string | ||
} | ||
#Example: SSH Public Key | ||
variable "ssh-public-key-for-ec2" { | ||
default = "../cloudgoat.pub" | ||
|
||
#Example | ||
variable "ssh_private_key" { | ||
description = "SSH Private Key" | ||
default = "../cloudgoat" | ||
type = string | ||
} | ||
#Example: SSH Private Key | ||
variable "ssh-private-key-for-ec2" { | ||
default = "../cloudgoat" | ||
} |