Skip to content
This repository has been archived by the owner on Oct 18, 2023. It is now read-only.

Commit

Permalink
update terraform to provision endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
vggonzal authored and vggonzal committed Aug 3, 2023
1 parent 5be7d07 commit c9b0ba8
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ jobs:
pip3 install -U pip pytest
pip3 install -U pip connexion
pip3 install -U pip flask_testing
pip3 install -U pip pytest-dynamodb
- name: Lint
run: |
Expand Down
4 changes: 2 additions & 2 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@


## Dependencies
There are a handful of dependencies needed to deploy the entire Feature Translation Service
There are a handful of dependencies needed to deploy the entire Hydrocron

* Terraform - deployment technology. >= Terraform v0.12.7
* AWS CLI - Amazon Web Service command line interface. >= aws-cli/1.11.120
* python3 environment - tested with python 3.7, needed for packaging the lambda functions.

## Soft dependencies
These are dependencies for deploying the entire Feature Translation Service that exist outside of this build.
These are dependencies for deploying the entire Hydrocron that exist outside of this build.

* access key for NGAP environment
* Terraform variables defined below
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ resource "aws_lambda_permission" "allow_hydrocron" {
# API Gateway
resource "aws_api_gateway_rest_api" "hydrocron-api-gateway" {
name = "${local.ec2_resources_name}-api-gateway"
description = "API to access Feature Translation Service"
description = "API to access Hydrocron"
body = templatefile(
"${path.module}/api-specification-templates/hydrocron_aws_api.yml",
{
Expand Down
2 changes: 1 addition & 1 deletion terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# team members to control and update terraform state.
terraform {
backend "s3" {
key = "services/feature-translation-service/terraform.tfstate"
key = "services/hydrocron/terraform.tfstate"
region = "us-west-2"
}
}
Expand Down
10 changes: 6 additions & 4 deletions tests/example_load_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
from decimal import Decimal
import geopandas as gpd

from hydrocron_database import Hydrocron_DB
from pytest_dynamodb import factories



# ## Set up the connection to dynamoDB
Expand All @@ -21,11 +22,12 @@
aws_secret_access_key='a',
aws_session_token='fake_session_token',
region_name='us-west-2')

dyndb_resource = session.resource('dynamodb', endpoint_url='http://localhost:8000')

dynamo_instance = Hydrocron_DB(dyn_resource=dyndb_resource)
dyndb_resource = session.resource('dynamodb', endpoint_url='http://localhost:8001')


dynamodb_my_proc = factories.dynamodb_proc(dynamodb_dir="/", port=8001, delay=True)
dyndb_resource = factories.dynamodb('dynamodb')

# ## Create the table & load data

Expand Down
1 change: 1 addition & 0 deletions tests/pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
dynamodb_port = 8000

0 comments on commit c9b0ba8

Please sign in to comment.