Skip to content

Commit

Permalink
examples
Browse files Browse the repository at this point in the history
  • Loading branch information
edbizarro committed Mar 25, 2019
1 parent 66ec1cb commit 7597f36
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
8 changes: 3 additions & 5 deletions examples/deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@

## Usage

Before running the commands above make sure to create a file named `terraform.tfvars`

To run this example you need to execute:

```
Expand All @@ -23,11 +21,11 @@ Note that this example may create resources which cost money. Run `terraform des

| Name | Description |
|------|-------------|
| database\_endpoint | Endpoint to connect to RDS metadata DB |
| database\_username | Username to connect to RDS metadata DB |
| this\_cluster\_security\_group\_id | The ID of the security group |
| this\_database\_endpoint | Endpoint to connect to RDS metadata DB |
| this\_database\_security\_group\_id | The ID of the security group |
| this\_database\_username | Username to connect to RDS metadata DB |
| this\_webserver\_public\_ip | Public IP address for the Airflow Webserver instance |
| webserver\_admin\_url | Public DNS for the Airflow Webserver instance |
| webserver\_public\_ip | Public IP address for the Airflow Webserver instance |

<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
9 changes: 8 additions & 1 deletion examples/deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@ provider "aws" {
region = "us-east-1"
}

#############################################################
# Data sources to get VPC and default security group details
#############################################################
data "aws_vpc" "default" {
default = true
}

module "airflow-cluster" {
source = "../../"
source = "powerdatahub/airflow/aws"
cluster_name = "airflow-example"
s3_bucket_name = "airflow-example-logs"
db_password = "123456789A*" # Just for example purposes, for real projects you may want to create a terraform.tfvars file
Expand Down
6 changes: 3 additions & 3 deletions examples/deploy/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ output "webserver_admin_url" {
value = "http://${aws_instance.airflow_webserver.public_dns}:8080"
}

output "webserver_public_ip" {
output "this_webserver_public_ip" {
description = "Public IP address for the Airflow Webserver instance"
value = "${aws_instance.airflow_webserver.public_ip}"
}

output "database_endpoint" {
output "this_database_endpoint" {
description = "Endpoint to connect to RDS metadata DB"
value = "${aws_db_instance.airflow_database.endpoint}"
}

output "database_username" {
output "this_database_username" {
description = "Username to connect to RDS metadata DB"
value = "${aws_db_instance.airflow_database.username}"
}

0 comments on commit 7597f36

Please sign in to comment.