Skip to content

Instantly share code, notes, and snippets.

@manavskohli
Last active February 14, 2019 18:37
Show Gist options
  • Save manavskohli/fc509bd75e3f41f1a8f418e7fb43043f to your computer and use it in GitHub Desktop.
Save manavskohli/fc509bd75e3f41f1a8f418e7fb43043f to your computer and use it in GitHub Desktop.
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
<= read (data resources)
Terraform will perform the following actions:
<= data.aws_iam_policy_document.move_object
id: <computed>
json: <computed>
statement.#: "3"
statement.0.actions.#: "3"
statement.0.actions.2809485102: "logs:CreateLogGroup"
statement.0.actions.3285979848: "logs:CreateLogStream"
statement.0.actions.39743051: "logs:PutLogEvents"
statement.0.effect: "Allow"
statement.0.resources.#: "1"
statement.0.resources.162423377: "arn:aws:logs:*:*:*"
statement.1.actions.#: "1"
statement.1.actions.2071725391: "s3:GetObject"
statement.1.effect: "Allow"
statement.1.resources.#: <computed>
statement.2.actions.#: "1"
statement.2.actions.315547055: "s3:PutObject"
statement.2.effect: "Allow"
statement.2.resources.#: <computed>
<= data.aws_iam_policy_document.sns_policy
id: <computed>
json: <computed>
statement.#: "1"
statement.0.actions.#: "1"
statement.0.actions.2735494433: "SNS:Publish"
statement.0.condition.#: "1"
statement.0.condition.~2771205928.test: "ArnLike"
statement.0.condition.~2771205928.values.#: <computed>
statement.0.condition.~2771205928.variable: "aws:SourceArn"
statement.0.effect: "Allow"
statement.0.principals.#: "1"
statement.0.principals.636693895.identifiers.#: "1"
statement.0.principals.636693895.identifiers.2679715827: "*"
statement.0.principals.636693895.type: "AWS"
statement.0.resources.#: "1"
statement.0.resources.184539420: "arn:aws:sns:us-east-1:*:s3_fanout"
+ aws_iam_role.source_to_target_sync
id: <computed>
arn: <computed>
assume_role_policy: "{\n \"Version\": \"2012-10-17\",\n \"Statement\": [\n {\n \"Sid\": \"\",\n \"Effect\": \"Allow\",\n \"Action\": \"sts:AssumeRole\",\n \"Principal\": {\n \"Service\": \"lambda.amazonaws.com\"\n }\n }\n ]\n}"
create_date: <computed>
force_detach_policies: "false"
max_session_duration: "3600"
name: "source_to_target_sync"
path: "/"
unique_id: <computed>
+ aws_iam_role_policy.lambda_sync_permissions
id: <computed>
name: "lambda_sync_permissions"
policy: "${data.aws_iam_policy_document.move_object.json}"
role: "${aws_iam_role.source_to_target_sync.id}"
+ aws_lambda_function.source_to_target_1_sync
id: <computed>
arn: <computed>
filename: "push_to_bucket_1.zip"
function_name: "source_to_target_1_sync"
handler: "push_to_bucket_1.lambda_handler"
invoke_arn: <computed>
last_modified: <computed>
memory_size: "128"
publish: "false"
qualified_arn: <computed>
role: "${aws_iam_role.source_to_target_sync.arn}"
runtime: "python2.7"
source_code_hash: "l6/u/zgzbUbtAZANUgY7E6gkHeE08UBXLrWhmI/8GcE="
source_code_size: <computed>
timeout: "3"
tracing_config.#: <computed>
version: <computed>
+ aws_lambda_function.source_to_target_2_sync
id: <computed>
arn: <computed>
filename: "push_to_bucket_2.zip"
function_name: "source_to_target_2_sync"
handler: "push_to_bucket_2.lambda_handler"
invoke_arn: <computed>
last_modified: <computed>
memory_size: "128"
publish: "false"
qualified_arn: <computed>
role: "${aws_iam_role.source_to_target_sync.arn}"
runtime: "python2.7"
source_code_hash: "lW+Uw2RE57adAxA+Y8v4UEqy0+ld0vnmmxuvB3zvBT4="
source_code_size: <computed>
timeout: "3"
tracing_config.#: <computed>
version: <computed>
+ aws_lambda_permission.with_sns_1
id: <computed>
action: "lambda:InvokeFunction"
function_name: "source_to_target_1_sync"
principal: "sns.amazonaws.com"
source_arn: "${aws_sns_topic.s3_fanout.arn}"
statement_id: "AllowExecutionFromSNS"
+ aws_lambda_permission.with_sns_2
id: <computed>
action: "lambda:InvokeFunction"
function_name: "source_to_target_2_sync"
principal: "sns.amazonaws.com"
source_arn: "${aws_sns_topic.s3_fanout.arn}"
statement_id: "AllowExecutionFromSNS"
+ aws_s3_bucket.source-bucket
id: <computed>
acceleration_status: <computed>
acl: "private"
arn: <computed>
bucket: "source-bucket"
bucket_domain_name: <computed>
bucket_regional_domain_name: <computed>
force_destroy: "false"
hosted_zone_id: <computed>
region: <computed>
request_payer: <computed>
tags.%: "1"
tags.Name: "Source bucket"
versioning.#: <computed>
website_domain: <computed>
website_endpoint: <computed>
+ aws_s3_bucket.target-bucket-one
id: <computed>
acceleration_status: <computed>
acl: "private"
arn: <computed>
bucket: "target-bucket-one"
bucket_domain_name: <computed>
bucket_regional_domain_name: <computed>
force_destroy: "false"
hosted_zone_id: <computed>
region: <computed>
request_payer: <computed>
tags.%: "1"
tags.Name: "Target bucket 1"
versioning.#: <computed>
website_domain: <computed>
website_endpoint: <computed>
+ aws_s3_bucket.target-bucket-two
id: <computed>
acceleration_status: <computed>
acl: "private"
arn: <computed>
bucket: "target-bucket-two"
bucket_domain_name: <computed>
bucket_regional_domain_name: <computed>
force_destroy: "false"
hosted_zone_id: <computed>
region: <computed>
request_payer: <computed>
tags.%: "1"
tags.Name: "Target bucket 2"
versioning.#: <computed>
website_domain: <computed>
website_endpoint: <computed>
+ aws_s3_bucket_notification.object_create_sns
id: <computed>
bucket: "${aws_s3_bucket.source-bucket.id}"
topic.#: "1"
topic.0.events.#: "1"
topic.0.events.3356830603: "s3:ObjectCreated:*"
topic.0.id: <computed>
topic.0.topic_arn: "${aws_sns_topic.s3_fanout.arn}"
+ aws_sns_topic.s3_fanout
id: <computed>
arn: <computed>
name: "s3_fanout"
policy: "${data.aws_iam_policy_document.sns_policy.json}"
+ aws_sns_topic_subscription.topic_lambda_sync_bucket_1
id: <computed>
arn: <computed>
confirmation_timeout_in_minutes: "1"
endpoint: "${aws_lambda_function.source_to_target_1_sync.arn}"
endpoint_auto_confirms: "false"
protocol: "lambda"
raw_message_delivery: "false"
topic_arn: "${aws_sns_topic.s3_fanout.arn}"
+ aws_sns_topic_subscription.topic_lambda_sync_bucket_2
id: <computed>
arn: <computed>
confirmation_timeout_in_minutes: "1"
endpoint: "${aws_lambda_function.source_to_target_2_sync.arn}"
endpoint_auto_confirms: "false"
protocol: "lambda"
raw_message_delivery: "false"
topic_arn: "${aws_sns_topic.s3_fanout.arn}"
Plan: 13 to add, 0 to change, 0 to destroy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment