-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AWSMC-1069] Update templates to use v2 API and support UPDATE (#129)
Co-authored-by: jvanbrie <jon.vanbriesen@datadoghq.com>
- Loading branch information
Showing
12 changed files
with
732 additions
and
623 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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,19 @@ | ||
general: | ||
auth: | ||
default: "<REPLACE_AWS_PROFILE>" | ||
s3_bucket: datadog-cloudformation-templates-aws-taskcat-test | ||
|
||
project: | ||
name: aws-organizations | ||
regions: | ||
- us-east-2 | ||
tests: | ||
default: | ||
template: ./main_organizations.yaml | ||
parameters: | ||
DatadogApiKey: "<REPLACE_DD_API_KEY>" | ||
DatadogAppKey: "<REPLACE_DD_APP_KEY>" | ||
DatadogSite: "datad0g.com" | ||
IAMRoleName: "DatadogIntegrationRole-taskcat-$[taskcat_random-string]" | ||
DisableMetricCollection: "false" | ||
CloudSecurityPostureManagement: "false" |
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,19 @@ | ||
# How to run taskcat tests | ||
|
||
## Setup | ||
``` | ||
export DD_API_KEY=<api key for test datadog org> | ||
export DD_APP_KEY=<app key for test datadog org> | ||
export AWS_SSO_PROFILE_NAME=<sso profile name for test aws account> | ||
``` | ||
|
||
### Run | ||
``` | ||
./run-taskcat-test.sh | ||
``` | ||
|
||
### Cleanup | ||
``` | ||
# To delete test stacks, run: | ||
taskcat test clean aws-organizations -a ${AWS_SSO_PROFILE_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,41 @@ | ||
#!/bin/bash | ||
|
||
if [ -z "$AWS_SSO_PROFILE_NAME" ]; then | ||
echo "Missing AWS_SSO_PROFILE_NAME - Must specify an AWS profile name" | ||
exit 1 | ||
fi | ||
|
||
aws sso login --profile ${AWS_SSO_PROFILE_NAME} | ||
|
||
TASKCAT_S3_BUCKET="datadog-cloudformation-templates-aws-taskcat-test" | ||
TASKCAT_PROJECT="aws-organizations" | ||
|
||
if [ -z "$DD_API_KEY" ]; then | ||
echo "Missing DD_API_KEY - Must specify a Datadog API key" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$DD_APP_KEY" ]; then | ||
echo "Missing DD_APP_KEY - Must specify a Datadog APP key" | ||
exit 1 | ||
fi | ||
|
||
if ! docker info > /dev/null 2>&1; then | ||
echo "This script uses docker, and it isn't running - please start docker and try again!" | ||
exit 1 | ||
fi | ||
|
||
mkdir -p ./tmp | ||
|
||
for f in ../*.yaml; do | ||
sed "s|<BUCKET_PLACEHOLDER>.s3.amazonaws.com/aws/<VERSION_PLACEHOLDER>|${TASKCAT_S3_BUCKET}.s3.amazonaws.com/${TASKCAT_PROJECT}|g" $f > ./tmp/$(basename $f) | ||
done | ||
|
||
sed "s|<REPLACE_DD_API_KEY>|${DD_API_KEY}|g ; s|<REPLACE_DD_APP_KEY>|${DD_APP_KEY}|g ; s|<REPLACE_AWS_PROFILE>|${AWS_SSO_PROFILE_NAME}|g" ./.taskcat.yml > ./tmp/.taskcat.yml | ||
|
||
taskcat upload -b ${TASKCAT_S3_BUCKET} -k ${TASKCAT_PROJECT} -p tmp | ||
|
||
taskcat test run --skip-upload --project-root tmp --no-delete | ||
|
||
echo "To delete test stacks, run:" | ||
echo " taskcat test clean ${TASKCAT_PROJECT} -a ${AWS_SSO_PROFILE_NAME}" |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.