-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refactor & e2e test #2
Merged
Merged
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
34f4c80
tidy up
wellsiau-aws b807990
use makefile
wellsiau-aws c4ff5ee
lambda edge
wellsiau-aws a571d12
tidy up
wellsiau-aws 2d7566b
various tidy up
wellsiau-aws 80d17ba
fix logging
wellsiau-aws e2e0370
pre-commit-fixes
wellsiau-aws 853231f
remove src
wellsiau-aws bc11cf4
checkov fix
wellsiau-aws 5895da4
update git ignore
wellsiau-aws fa15e74
functional-test
wellsiau-aws cd1e1eb
fix functional-test
wellsiau-aws 5ee00a3
fix path
wellsiau-aws 73ae098
readme update
wellsiau-aws 6aa3a5e
fix header
wellsiau-aws 09693d7
fix readme
wellsiau-aws 4b847b1
update tf test
wellsiau-aws 9bf3da0
fix bandit warning
wellsiau-aws fde18d8
add wait time
wellsiau-aws File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,6 +1,16 @@ | ||
#!/bin/bash | ||
## NOTE: this script runs at the end of functional test | ||
## Use this to load any configurations after the functional test | ||
## Use this to load any configurations after the functional test | ||
## TIPS: avoid modifying the .project_automation/functional_test/entrypoint.sh | ||
## migrate any customization you did on entrypoint.sh to this helper script | ||
echo "Executing Post-Entrypoint Helpers" | ||
echo "Executing Post-Entrypoint Helpers" | ||
|
||
#********** Project Path ************* | ||
PROJECT_PATH=${BASE_PATH}/project | ||
PROJECT_TYPE_PATH=${BASE_PATH}/projecttype | ||
cd ${PROJECT_PATH} | ||
|
||
#********** CLEANUP ************* | ||
echo "Cleaning up all temp files and artifacts" | ||
cd ${PROJECT_PATH} | ||
make -s clean |
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,6 +1,21 @@ | ||
#!/bin/bash | ||
## NOTE: this script runs at the start of functional test | ||
## use this to load any configuration before the functional test | ||
## use this to load any configuration before the functional test | ||
## TIPS: avoid modifying the .project_automation/functional_test/entrypoint.sh | ||
## migrate any customization you did on entrypoint.sh to this helper script | ||
echo "Executing Pre-Entrypoint Helpers" | ||
echo "Executing Pre-Entrypoint Helpers" | ||
|
||
|
||
#********** Project Path ************* | ||
PROJECT_PATH=${BASE_PATH}/project | ||
PROJECT_TYPE_PATH=${BASE_PATH}/projecttype | ||
cd ${PROJECT_PATH} | ||
|
||
#********** TFC Env Vars ************* | ||
export AWS_DEFAULT_REGION=us-west-2 | ||
export TFE_TOKEN=`aws secretsmanager get-secret-value --secret-id abp/hcp/token --region $AWS_DEFAULT_REGION | jq -r ".SecretString"` | ||
export TF_TOKEN_app_terraform_io=`aws secretsmanager get-secret-value --secret-id abp/hcp/token --region $AWS_DEFAULT_REGION | jq -r ".SecretString"` | ||
|
||
#********** MAKEFILE ************* | ||
echo "Build the lambda function packages" | ||
make all |
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,6 +1,6 @@ | ||
#!/bin/bash | ||
## NOTE: this script runs at the end of static test | ||
## Use this to load any configurations after the static test | ||
## Use this to load any configurations after the static test | ||
## TIPS: avoid modifying the .project_automation/static_test/entrypoint.sh | ||
## migrate any customization you did on entrypoint.sh to this helper script | ||
echo "Executing Post-Entrypoint Helpers" |
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,6 +1,6 @@ | ||
#!/bin/bash | ||
## NOTE: this script runs at the start of static test | ||
## use this to load any configuration before the static test | ||
## use this to load any configuration before the static test | ||
## TIPS: avoid modifying the .project_automation/static_test/entrypoint.sh | ||
## migrate any customization you did on entrypoint.sh to this helper script | ||
echo "Executing Pre-Entrypoint Helpers" |
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
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,9 +1,29 @@ | ||
# terraform-aws-plan-analyzer-runtask | ||
# Runtask Terraform Plan Analyzer | ||
|
||
Use this module to develop HCP Terraform run task and deploy it in AWS. | ||
## Overview | ||
|
||
Integrate Amazon Bedrock to your HashiCorp Cloud Platform Terraform (Terraform Cloud) Run Tasks for: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. prev. Terraform Cloud and "run tasks" start with small letters |
||
|
||
* Analyzing Terraform plan and generate short-summary | ||
|
||
* Function calling for other API-based analysis (e.g AMI analysis) | ||
|
||
### Terraform plan summary | ||
|
||
 | ||
|
||
### Function calling (AMI analysis) | ||
|
||
 | ||
|
||
## Architecture | ||
|
||
 | ||
|
||
This module must be deployed in AWS account with access to Amazon Bedrock model. We recommend you to use hub-spoke model, by deploying this module in one dedicated account. | ||
|
||
Please refer to the [best-practice](#best-practice) section below for more details. | ||
|
||
## Prerequisites | ||
|
||
To use this module you need have the following: | ||
|
@@ -13,7 +33,13 @@ To use this module you need have the following: | |
|
||
## Usage | ||
|
||
1. Reference the `examples/basic` folder on how to use this module | ||
* Build and package the Lambda files | ||
|
||
``` | ||
make all | ||
``` | ||
|
||
* Reference the `examples/basic` folder on how to use this module | ||
|
||
```sh | ||
cd examples/basic | ||
|
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
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
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,3 @@ | ||
FROM public.ecr.aws/codebuild/amazonlinux2-x86_64-standard:4.0 | ||
RUN yum install -y yum-utils && yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && yum install -y gh | ||
RUN yum install -y yum-utils && yum-config-manager --add-repo https://cli.github.com/packages/rpm/gh-cli.repo && yum install -y gh | ||
RUN pip install awscli |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wellsiau-aws let's rename to
Terraform run task plan analyzer