-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(forwarder): relax DataAccessPointArn requirement (#245)
This commit relaxes DataAccessPointArn as a required parameter for the Forwarder stack. The prior settings assumed the stack would always point at Filedrop. In practice, there can be usecases where an access point should not be assumed: - if we point directly at an S3 bucket, for testing or aggregation purposes. - if we point the forwarder towards an HTTP endpoint instead.
- Loading branch information
Showing
9 changed files
with
146 additions
and
38 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
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
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,78 @@ | ||
# This test verifies our forwarder can write to an S3 bucket directly, | ||
# without being fronted by a DataAccessPoint | ||
run "setup" { | ||
module { | ||
source = "observeinc/collection/aws//modules/testing/setup" | ||
version = "2.9.0" | ||
} | ||
} | ||
|
||
run "target_bucket" { | ||
module { | ||
source = "observeinc/collection/aws//modules/testing/s3_bucket" | ||
version = "2.9.0" | ||
} | ||
|
||
variables { | ||
setup = run.setup | ||
} | ||
} | ||
|
||
run "sources" { | ||
module { | ||
source = "./modules/setup_sources" | ||
} | ||
|
||
variables { | ||
setup = run.setup | ||
} | ||
} | ||
|
||
run "install_forwarder" { | ||
variables { | ||
setup = run.setup | ||
app = "forwarder" | ||
parameters = { | ||
DestinationUri = "s3://${run.target_bucket.id}/" | ||
SourceBucketNames = "${join(",", [for k, v in run.sources.buckets : v.id])}" | ||
SourceTopicArns = "arn:aws:sns:${run.setup.region}:${run.setup.account_id}:*" | ||
NameOverride = run.setup.id | ||
} | ||
capabilities = [ | ||
"CAPABILITY_NAMED_IAM", | ||
"CAPABILITY_AUTO_EXPAND", | ||
] | ||
} | ||
} | ||
|
||
run "subscribe_sources" { | ||
module { | ||
source = "./modules/subscribe_sources" | ||
} | ||
|
||
variables { | ||
sources = run.sources | ||
queue_arn = run.install_forwarder.stack.outputs["Queue"] | ||
} | ||
} | ||
|
||
|
||
run "check_sqs" { | ||
module { | ||
source = "observeinc/collection/aws//modules/testing/exec" | ||
version = "2.9.0" | ||
} | ||
|
||
variables { | ||
command = "./scripts/check_object_diff" | ||
env_vars = { | ||
SOURCE = run.sources.buckets["sqs"].id | ||
DESTINATION = run.target_bucket.id | ||
} | ||
} | ||
|
||
assert { | ||
condition = output.exitcode == 0 | ||
error_message = "Failed to copy object using SQS" | ||
} | ||
} |
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