-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into aws-concurrency-beyond-batch
- Loading branch information
Showing
63 changed files
with
3,254 additions
and
830 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
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,15 @@ | ||
version: "3.8" | ||
|
||
services: | ||
localstack: | ||
container_name: "conformance-aws-secrets-manager" | ||
image: localstack/localstack | ||
ports: | ||
- "127.0.0.1:4566:4566" | ||
environment: | ||
- DEBUG=1 | ||
- DOCKER_HOST=unix:///var/run/docker.sock | ||
volumes: | ||
- "${PWD}/.github/scripts/docker-compose-init/init-conformance-state-aws-secrets-manager.sh:/etc/localstack/init/ready.d/init-aws.sh" # ready hook | ||
- "${LOCALSTACK_VOLUME_DIR:-./volume}:/var/lib/localstack" | ||
- "/var/run/docker.sock:/var/run/docker.sock" |
54 changes: 54 additions & 0 deletions
54
...ub/infrastructure/terraform/conformance/secretstores/aws/secretsmanager/secretsmanager.tf
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,54 @@ | ||
terraform { | ||
required_version = ">=0.13" | ||
|
||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "~> 4.0" | ||
} | ||
} | ||
} | ||
|
||
variable "TIMESTAMP" { | ||
type = string | ||
description = "Timestamp of the GitHub workflow run." | ||
} | ||
|
||
variable "UNIQUE_ID" { | ||
type = string | ||
description = "Unique ID of the GitHub workflow run." | ||
} | ||
|
||
provider "aws" { | ||
region = "us-east-1" | ||
default_tags { | ||
tags = { | ||
Purpose = "AutomatedConformanceTesting" | ||
Timestamp = "${var.TIMESTAMP}" | ||
} | ||
} | ||
} | ||
|
||
# Create the first secret in AWS Secrets Manager | ||
resource "aws_secretsmanager_secret" "conftestsecret" { | ||
name = "conftestsecret" | ||
description = "Secret for conformance test" | ||
recovery_window_in_days = 0 | ||
} | ||
|
||
resource "aws_secretsmanager_secret_version" "conftestsecret_value" { | ||
secret_id = aws_secretsmanager_secret.conftestsecret.id | ||
secret_string = "abcd" | ||
} | ||
|
||
# Create the second secret in AWS Secrets Manager | ||
resource "aws_secretsmanager_secret" "secondsecret" { | ||
name = "secondsecret" | ||
description = "Another secret for conformance test" | ||
recovery_window_in_days = 0 | ||
} | ||
|
||
resource "aws_secretsmanager_secret_version" "secondsecret_value" { | ||
secret_id = aws_secretsmanager_secret.secondsecret.id | ||
secret_string = "efgh" | ||
} |
9 changes: 9 additions & 0 deletions
9
.../components-scripts/conformance-secretstores.aws.secretsmanager.secretsmanager-destroy.sh
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,9 @@ | ||
#!/bin/sh | ||
|
||
set +e | ||
|
||
# Navigate to the Terraform directory | ||
cd ".github/infrastructure/terraform/conformance/secretstores/aws/secretsmanager" | ||
|
||
# Run Terraform | ||
terraform destroy -auto-approve -var="UNIQUE_ID=$UNIQUE_ID" -var="TIMESTAMP=$CURRENT_TIME" |
15 changes: 15 additions & 0 deletions
15
...ts/components-scripts/conformance-secretstores.aws.secretsmanager.secretsmanager-setup.sh
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,15 @@ | ||
#!/bin/sh | ||
|
||
set -e | ||
|
||
# Set variables for GitHub Actions | ||
echo "AWS_REGION=us-east-1" >> $GITHUB_ENV | ||
|
||
# Navigate to the Terraform directory | ||
cd ".github/infrastructure/terraform/conformance/secretstores/aws/secretsmanager" | ||
|
||
# Run Terraform | ||
terraform init | ||
terraform validate -no-color | ||
terraform plan -no-color -var="UNIQUE_ID=$UNIQUE_ID" -var="TIMESTAMP=$CURRENT_TIME" | ||
terraform apply -auto-approve -var="UNIQUE_ID=$UNIQUE_ID" -var="TIMESTAMP=$CURRENT_TIME" |
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
9 changes: 9 additions & 0 deletions
9
.github/scripts/docker-compose-init/init-conformance-state-aws-secrets-manager.sh
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,9 @@ | ||
#!/bin/bash | ||
|
||
awslocal secretsmanager create-secret \ | ||
--name conftestsecret \ | ||
--secret-string "abcd" | ||
|
||
awslocal secretsmanager create-secret \ | ||
--name secondsecret \ | ||
--secret-string "efgh" |
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
Oops, something went wrong.