-
Notifications
You must be signed in to change notification settings - Fork 1k
sfn-glue-terraform: Update AWS Provider to v6 #3091
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
Open
kakakakakku
wants to merge
4
commits into
aws-samples:main
Choose a base branch
from
kakakakakku:sfn-glue-terraform
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fb52fcd
sfn-glue-terraform: Update AWS Provider to v6
kakakakakku 7bba17f
sfn-glue-terraform: Replace deprecated aws_s3_bucket_object with aws_…
kakakakakku 1b8e400
sfn-glue-terraform: terraform fmt
kakakakakku c8123e8
sfn-glue-terraform: Fix service name
kakakakakku 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 hidden or 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,20 +1,20 @@ | ||
| # AWS Step Functions to start a AWS Glue Job Through a Cloudwatch event rule | ||
| # AWS Step Functions to start a AWS Glue Job Through a CloudWatch event rule | ||
|
|
||
| The Terraform template deploys a AWS Step Function, a AWS Glue Job, a Cloudwatch Event Rule, a Amazon S3 bucket and the minimum IAM resources required to run the application. | ||
| The Terraform template deploys a AWS Step Functions, a AWS Glue Job, a CloudWatch Event Rule, a Amazon S3 bucket and the minimum IAM resources required to run the application. | ||
|
Contributor
Author
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. 🙅♂️ Step Function |
||
|
|
||
| ## Architecture | ||
|  | ||
|
|
||
| This pattern demonstrates the use of Terraform modules and deploys the below resources: | ||
| * Amazon S3 bucket and load the sample Python script as an object | ||
| * Sample AWS Glue Job which executes the script in the S3 bucket | ||
| * AWS Step Function to invoke the AWS Glue Job synchronously. The Function will wait until the Job is completed | ||
| * Cloudwatch Event Rule which is configured to start the AWS Step Function evey 10 minutes | ||
| * AWS Step Functions to invoke the AWS Glue Job synchronously. The Function will wait until the Job is completed | ||
| * CloudWatch Event Rule which is configured to start the AWS Step Functions evey 10 minutes | ||
|
|
||
|
|
||
| ## How it works | ||
|
|
||
| The AWS Cloudwatch rule is configured to start a Step Function execution every 10 minutes. The Step function then invokes a AWS Glue Job with some default arguments and a test message. | ||
| The AWS CloudWatch rule is configured to start a Step Functions execution every 10 minutes. The Step function then invokes a AWS Glue Job with some default arguments and a test message. | ||
| The Arguments to the AWS Glue Job, the Python script and the CloudWatch event rule can be modified as per requirement. | ||
|
|
||
|
|
||
|
|
@@ -71,7 +71,7 @@ After deployment, go to the cloudwatch logs to check the event details. | |
| ```bash | ||
| terraform show | ||
| ``` | ||
| ``` | ||
|
|
||
| ---- | ||
| Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
|
|
||
|
|
||
This file contains hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -12,18 +12,18 @@ resource "aws_s3_bucket" "s3_sample_glue_bucket" { | |
| resource "aws_s3_bucket_public_access_block" "s3_glue_bucket_block_public_access" { | ||
| bucket = aws_s3_bucket.s3_sample_glue_bucket.id | ||
|
|
||
| block_public_acls = true | ||
| block_public_policy = true | ||
| ignore_public_acls = true | ||
| block_public_acls = true | ||
|
Contributor
Author
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. note: I applied |
||
| block_public_policy = true | ||
| ignore_public_acls = true | ||
| restrict_public_buckets = true | ||
| } | ||
|
|
||
| # upload the AWS Glue script to the bucket | ||
| resource "aws_s3_bucket_object" "glue_script_object" { | ||
| resource "aws_s3_object" "glue_script_object" { | ||
| bucket = aws_s3_bucket.s3_sample_glue_bucket.bucket | ||
| key = "glue_script.py" | ||
| source = "./resources/glue_script.py" | ||
| acl = "private" | ||
| acl = "private" | ||
| } | ||
|
|
||
| ## IAM Resources | ||
|
|
@@ -39,5 +39,5 @@ output "bucket_arn" { | |
| } | ||
|
|
||
| output "glue_script_name" { | ||
| value = aws_s3_bucket_object.glue_script_object.key | ||
| value = aws_s3_object.glue_script_object.key | ||
| } | ||
This file contains hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -4,7 +4,7 @@ variable "create" { | |
|
|
||
|
|
||
| variable "role_arn" { | ||
| default ="" | ||
| default = "" | ||
| } | ||
|
|
||
| variable "connections" { | ||
|
|
||
This file contains hidden or 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
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.
🙅♂️ Cloudwatch
🙆♂️ CloudWatch