Skip to content

Instantly share code, notes, and snippets.

@simon-mo
Last active January 27, 2022 18:21
Show Gist options
  • Select an option

  • Save simon-mo/24055d608ff7107d4d7a4340f2069f56 to your computer and use it in GitHub Desktop.

Select an option

Save simon-mo/24055d608ff7107d4d7a4340f2069f56 to your computer and use it in GitHub Desktop.
terraform {}
provider "aws" {
region = "us-west-2"
}
# Human input variable
variable "db_server_name" {
default = "staging-rds.c7tsyexqvqcw.us-west-2.rds.amazonaws.com"
}
variable "databricks_role_arn" {
default = "arn:aws:iam::409614862495:role/default-autoscaling"
}
variable "vpc_id" {
default = "vpc-00972c2022aaccf37"
}
variable "security_group_id" {
default = "sg-021cbaa77489dc827"
}
data "aws_secretsmanager_secret_version" "db_password" {
secret_id = "arn:aws:secretsmanager:us-west-2:623395924981:secret:staging_rds_anyscaledb_pwd-DWXJb9"
}
data "aws_caller_identity" "current" {}
locals {
account_id = data.aws_caller_identity.current.account_id
suffix = "-tf-copy"
}
# DMS
resource "aws_dms_endpoint" "db" {
engine_name = "postgres"
endpoint_type = "source"
endpoint_id = "staging-rds${local.suffix}"
database_name = "anyscaledb"
port = 5432
server_name = var.db_server_name
username = "postgres"
password = data.aws_secretsmanager_secret_version.db_password.secret_string
extra_connection_attributes = "captureDDLs=Y"
}
resource "aws_dms_endpoint" "kinesis" {
engine_name = "kinesis"
endpoint_type = "target"
endpoint_id = "kinesis${local.suffix}"
kinesis_settings {
message_format = "json-unformatted"
include_partition_value = true
include_transaction_details = true
partition_include_schema_table = true
service_access_role_arn = aws_iam_role.dms_export_role.arn
stream_arn = aws_kinesis_stream.dms_cdc.arn
include_control_details = true
include_null_and_empty = true
include_table_alter_operations = true
}
}
data "aws_subnets" "default" {
filter {
name = "vpc-id"
values = [var.vpc_id]
}
}
resource "aws_dms_replication_subnet_group" "group" {
replication_subnet_group_id = "dms-replication-subnet-group${local.suffix}"
replication_subnet_group_description = "default subnet group"
subnet_ids = data.aws_subnets.default.ids
}
resource "aws_dms_replication_instance" "instance" {
replication_instance_id = "test-replication-instance${local.suffix}"
replication_instance_class = "dms.r5.2xlarge"
replication_subnet_group_id = aws_dms_replication_subnet_group.group.id
vpc_security_group_ids = [var.security_group_id]
}
resource "aws_dms_replication_task" "rds_to_kinesis" {
replication_task_id = "rds-to-kinesis${local.suffix}"
migration_type = "full-load-and-cdc"
replication_instance_arn = aws_dms_replication_instance.instance.replication_instance_arn
source_endpoint_arn = aws_dms_endpoint.db.endpoint_arn
target_endpoint_arn = aws_dms_endpoint.kinesis.endpoint_arn
replication_task_settings = file("replication_task_settings.json")
table_mappings = file("table_mappings.json")
}
# Kinesis
resource "aws_kinesis_stream" "dms_cdc" {
name = "test-dms-cdc-stream${local.suffix}"
stream_mode_details {
stream_mode = "ON_DEMAND"
}
}
resource "aws_kinesis_firehose_delivery_stream" "cdc_s3" {
name = "KDS-S3-e4gTU${local.suffix}"
destination = "extended_s3"
kinesis_source_configuration {
kinesis_stream_arn = aws_kinesis_stream.dms_cdc.arn
role_arn = aws_iam_role.kinesis_role.arn
}
extended_s3_configuration {
bucket_arn = aws_s3_bucket.export_bucket.arn
buffer_interval = 60
buffer_size = 5
compression_format = "GZIP"
error_output_prefix = "kinesis-stream-errors/"
prefix = "kinesis-stream/"
role_arn = aws_iam_role.kinesis_role.arn
s3_backup_mode = "Disabled"
cloudwatch_logging_options {
enabled = true
log_group_name = "/aws/kinesisfirehose/KDS-S3-e4gTU${local.suffix}"
log_stream_name = "DestinationDelivery"
}
processing_configuration {
enabled = false
}
}
}
# S3
resource "aws_s3_bucket" "export_bucket" {
bucket = "anyscale-test-s3-snapshot-export-bucket${local.suffix}"
}
resource "aws_s3_bucket_policy" "databricks_access" {
bucket = aws_s3_bucket.export_bucket.id
policy = jsonencode(
{
Statement = [
{
Action = [
"s3:GetObject",
"s3:ListBucket",
]
Effect = "Allow"
Principal = {
AWS = var.databricks_role_arn
}
Resource = [
aws_s3_bucket.export_bucket.arn,
"${aws_s3_bucket.export_bucket.arn}/*",
]
},
]
Version = "2012-10-17"
}
)
}
# Role for DMS
resource "aws_iam_role" "dms_export_role" {
name = "rds-s3-export-role${local.suffix}"
assume_role_policy = jsonencode(
{
Statement = [
{
Action = "sts:AssumeRole"
Condition = {}
Effect = "Allow"
Principal = {
Service = [
"export.rds.amazonaws.com",
"dms.amazonaws.com",
]
}
},
]
Version = "2012-10-17"
}
)
path = "/service-role/"
}
resource "aws_iam_policy" "dms_export_role_policy" {
description = "RDS Snapshot Export To S3"
name = "snapExport2021-10-28-03.12.37.580${local.suffix}"
path = "/service-role/"
policy = jsonencode(
{
Statement = [
{
Action = "kms:*"
Effect = "Allow"
Resource = "*"
Sid = "VisualEditor0"
},
{
Action = [
"s3:PutObject*",
"s3:ListBucket",
"s3:GetObject*",
"s3:DeleteObject*",
"s3:GetBucketLocation",
]
Effect = "Allow"
Resource = [
aws_s3_bucket.export_bucket.arn,
"${aws_s3_bucket.export_bucket.arn}/*"
]
Sid = "VisualEditor1"
},
{
Action = [
"kinesis:PutRecord",
"kinesis:PutRecords",
"kinesis:DescribeStream",
]
Effect = "Allow"
Resource = [
aws_kinesis_stream.dms_cdc.arn
]
Sid = "Kinesis"
},
]
Version = "2012-10-17"
}
)
}
resource "aws_iam_role_policy_attachment" "dms_export_role_policy" {
role = aws_iam_role.dms_export_role.id
policy_arn = aws_iam_policy.dms_export_role_policy.arn
}
# Role for Kinesis
resource "aws_iam_role" "kinesis_role" {
name = "KinesisFirehoseServiceRole-${local.suffix}"
path = "/service-role/"
assume_role_policy = jsonencode(
{
Statement = [
{
Action = "sts:AssumeRole"
Effect = "Allow"
Principal = {
Service = "firehose.amazonaws.com"
}
},
]
Version = "2012-10-17"
}
)
}
resource "aws_iam_policy" "kinesis_policy" {
name = "KinesisFirehoseServicePolicy-KDS-S3-e4gTU-us-west-2${local.suffix}"
path = "/service-role/"
policy = <<EOT
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "",
"Effect": "Allow",
"Action": [
"glue:GetTable",
"glue:GetTableVersion",
"glue:GetTableVersions"
],
"Resource": [
"arn:aws:glue:us-west-2:${local.account_id}:catalog",
"arn:aws:glue:us-west-2:${local.account_id}:database/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%",
"arn:aws:glue:us-west-2:${local.account_id}:table/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%"
]
},
{
"Sid": "",
"Effect": "Allow",
"Action": [
"s3:AbortMultipartUpload",
"s3:GetBucketLocation",
"s3:GetObject",
"s3:ListBucket",
"s3:ListBucketMultipartUploads",
"s3:PutObject"
],
"Resource": [
"${aws_s3_bucket.export_bucket.arn}",
"${aws_s3_bucket.export_bucket.arn}/*"
]
},
{
"Sid": "",
"Effect": "Allow",
"Action": [
"lambda:InvokeFunction",
"lambda:GetFunctionConfiguration"
],
"Resource": "arn:aws:lambda:us-west-2:${local.account_id}:function:%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%"
},
{
"Effect": "Allow",
"Action": [
"kms:GenerateDataKey",
"kms:Decrypt"
],
"Resource": [
"arn:aws:kms:us-west-2:${local.account_id}:key/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%"
],
"Condition": {
"StringEquals": {
"kms:ViaService": "s3.us-west-2.amazonaws.com"
},
"StringLike": {
"kms:EncryptionContext:aws:s3:arn": [
"arn:aws:s3:::%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%/*",
"arn:aws:s3:::%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%"
]
}
}
},
{
"Sid": "",
"Effect": "Allow",
"Action": [
"logs:PutLogEvents"
],
"Resource": [
"arn:aws:logs:us-west-2:${local.account_id}:log-group:/aws/kinesisfirehose/KDS-S3-e4gTU:log-stream:*",
"arn:aws:logs:us-west-2:${local.account_id}:log-group:%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%:log-stream:*"
]
},
{
"Sid": "",
"Effect": "Allow",
"Action": [
"kinesis:DescribeStream",
"kinesis:GetShardIterator",
"kinesis:GetRecords",
"kinesis:ListShards"
],
"Resource": "${aws_kinesis_stream.dms_cdc.arn}"
},
{
"Effect": "Allow",
"Action": [
"kms:Decrypt"
],
"Resource": [
"arn:aws:kms:us-west-2:${local.account_id}:key/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%"
],
"Condition": {
"StringEquals": {
"kms:ViaService": "kinesis.us-west-2.amazonaws.com"
},
"StringLike": {
"kms:EncryptionContext:aws:kinesis:arn": "${aws_kinesis_stream.dms_cdc.arn}"
}
}
}
]
}
EOT
}
resource "aws_iam_role_policy_attachment" "kinesis_role_policy" {
role = aws_iam_role.kinesis_role.id
policy_arn = aws_iam_policy.kinesis_policy.arn
}
{
"Logging": {
"EnableLogging": false,
"LogComponents": [
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "TRANSFORMATION"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "SOURCE_UNLOAD"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "IO"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "TARGET_LOAD"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "PERFORMANCE"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "SOURCE_CAPTURE"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "SORTER"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "REST_SERVER"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "VALIDATOR_EXT"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "TARGET_APPLY"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "TASK_MANAGER"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "TABLES_MANAGER"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "METADATA_MANAGER"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "FILE_FACTORY"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "COMMON"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "ADDONS"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "DATA_STRUCTURE"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "COMMUNICATION"
},
{
"Severity": "LOGGER_SEVERITY_DEFAULT",
"Id": "FILE_TRANSFER"
}
]
},
"StreamBufferSettings": {
"StreamBufferCount": 3,
"CtrlStreamBufferSizeInMB": 5,
"StreamBufferSizeInMB": 8
},
"ErrorBehavior": {
"FailOnNoTablesCaptured": true,
"ApplyErrorUpdatePolicy": "LOG_ERROR",
"FailOnTransactionConsistencyBreached": false,
"RecoverableErrorThrottlingMax": 1800,
"DataErrorEscalationPolicy": "SUSPEND_TABLE",
"ApplyErrorEscalationCount": 0,
"RecoverableErrorStopRetryAfterThrottlingMax": true,
"RecoverableErrorThrottling": true,
"ApplyErrorFailOnTruncationDdl": false,
"DataTruncationErrorPolicy": "LOG_ERROR",
"ApplyErrorInsertPolicy": "LOG_ERROR",
"ApplyErrorEscalationPolicy": "LOG_ERROR",
"RecoverableErrorCount": -1,
"DataErrorEscalationCount": 0,
"TableErrorEscalationPolicy": "STOP_TASK",
"RecoverableErrorInterval": 5,
"ApplyErrorDeletePolicy": "IGNORE_RECORD",
"TableErrorEscalationCount": 0,
"FullLoadIgnoreConflicts": true,
"DataErrorPolicy": "LOG_ERROR",
"TableErrorPolicy": "SUSPEND_TABLE"
},
"TTSettings": {
"TTS3Settings": null,
"TTRecordSettings": null,
"EnableTT": false
},
"FullLoadSettings": {
"CommitRate": 10000,
"StopTaskCachedChangesApplied": false,
"StopTaskCachedChangesNotApplied": false,
"MaxFullLoadSubTasks": 8,
"TransactionConsistencyTimeout": 600,
"CreatePkAfterFullLoad": false,
"TargetTablePrepMode": "DROP_AND_CREATE"
},
"TargetMetadata": {
"ParallelApplyBufferSize": 0,
"ParallelApplyQueuesPerThread": 0,
"ParallelApplyThreads": 0,
"TargetSchema": "",
"InlineLobMaxSize": 0,
"ParallelLoadQueuesPerThread": 0,
"SupportLobs": true,
"LobChunkSize": 0,
"TaskRecoveryTableEnabled": false,
"ParallelLoadThreads": 0,
"LobMaxSize": 256,
"BatchApplyEnabled": false,
"FullLobMode": false,
"LimitedSizeLobMode": true,
"LoadMaxFileSize": 0,
"ParallelLoadBufferSize": 0
},
"BeforeImageSettings": null,
"ControlTablesSettings": {
"HistoryTimeslotInMinutes": 5,
"StatusTableEnabled": false,
"SuspendedTablesTableEnabled": false,
"HistoryTableEnabled": false,
"ControlSchema": "",
"FullLoadExceptionTableEnabled": false
},
"LoopbackPreventionSettings": null,
"CharacterSetSettings": null,
"FailTaskWhenCleanTaskResourceFailed": false,
"ChangeProcessingTuning": {
"StatementCacheSize": 50,
"CommitTimeout": 1,
"BatchApplyPreserveTransaction": true,
"BatchApplyTimeoutMin": 1,
"BatchSplitSize": 0,
"BatchApplyTimeoutMax": 30,
"MinTransactionSize": 1000,
"MemoryKeepTime": 60,
"BatchApplyMemoryLimit": 500,
"MemoryLimitTotal": 1024
},
"ChangeProcessingDdlHandlingPolicy": {
"HandleSourceTableDropped": true,
"HandleSourceTableTruncated": true,
"HandleSourceTableAltered": true
},
"PostProcessingRules": null
}
{
"rules": [
{
"rule-type": "selection",
"rule-id": "807690761",
"rule-name": "807690761",
"object-locator": {
"schema-name": "public",
"table-name": "%"
},
"rule-action": "include",
"filters": []
}
]
}
{
"version": 4,
"terraform_version": "0.14.2",
"serial": 21,
"lineage": "122361d9-13b8-84c6-42b2-2101200f92b5",
"outputs": {},
"resources": [
{
"mode": "data",
"type": "aws_caller_identity",
"name": "current",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"account_id": "623395924981",
"arn": "arn:aws:sts::623395924981:assumed-role/AWSReservedSSO_DevPowerUser_3e49c6be23cd1ab3/[email protected]",
"id": "623395924981",
"user_id": "AROAZCJKK5P2Z27H5N4ED:[email protected]"
},
"sensitive_attributes": []
}
]
},
{
"mode": "data",
"type": "aws_secretsmanager_secret_version",
"name": "db_password",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:secretsmanager:us-west-2:623395924981:secret:staging_rds_anyscaledb_pwd-DWXJb9",
"id": "arn:aws:secretsmanager:us-west-2:623395924981:secret:staging_rds_anyscaledb_pwd-DWXJb9|AWSCURRENT",
"secret_binary": "",
"secret_id": "arn:aws:secretsmanager:us-west-2:623395924981:secret:staging_rds_anyscaledb_pwd-DWXJb9",
"secret_string": "xjBULPV2bb0UaCTkHjWkXzXoOaKbF7yaycTzqomO",
"version_id": "4AEDEBA7-BF12-4A01-9980-308A2B4D95EE",
"version_stage": "AWSCURRENT",
"version_stages": [
"AWSCURRENT"
]
},
"sensitive_attributes": []
}
]
},
{
"mode": "data",
"type": "aws_subnets",
"name": "default",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"filter": [
{
"name": "vpc-id",
"values": [
"vpc-00972c2022aaccf37"
]
}
],
"id": "us-west-2",
"ids": [
"subnet-06fd6f6cc02395c72",
"subnet-0aa517d144f53b9d8",
"subnet-0d8f1580083688ecf",
"subnet-0c5b7efe5f1e89be5",
"subnet-02d6787169a8ed7c0",
"subnet-01998c5fbc61307fb",
"subnet-0ce644e68722377ef",
"subnet-0924c0c80518ca0a0"
],
"tags": null
},
"sensitive_attributes": []
}
]
},
{
"mode": "managed",
"type": "aws_dms_endpoint",
"name": "db",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"certificate_arn": "",
"database_name": "anyscaledb",
"elasticsearch_settings": [],
"endpoint_arn": "arn:aws:dms:us-west-2:623395924981:endpoint:3OBZTZZHCRAHVRMHLIN6UPWM23CMJZQ7QZZMTHI",
"endpoint_id": "staging-rds-tf-copy",
"endpoint_type": "source",
"engine_name": "postgres",
"extra_connection_attributes": "captureDDLs=Y",
"id": "staging-rds-tf-copy",
"kafka_settings": [],
"kinesis_settings": [],
"kms_key_arn": "arn:aws:kms:us-west-2:623395924981:key/246f9576-c5cc-40a9-8ded-8e4416da6a5e",
"mongodb_settings": [],
"password": "xjBULPV2bb0UaCTkHjWkXzXoOaKbF7yaycTzqomO",
"port": 5432,
"s3_settings": [],
"secrets_manager_access_role_arn": "",
"secrets_manager_arn": "",
"server_name": "staging-rds.c7tsyexqvqcw.us-west-2.rds.amazonaws.com",
"service_access_role": null,
"ssl_mode": "none",
"tags": {},
"tags_all": {},
"username": "postgres"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"data.aws_secretsmanager_secret_version.db_password"
]
}
]
},
{
"mode": "managed",
"type": "aws_dms_endpoint",
"name": "kinesis",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"certificate_arn": "",
"database_name": null,
"elasticsearch_settings": [],
"endpoint_arn": "arn:aws:dms:us-west-2:623395924981:endpoint:WHFUJXXPBIQQNWQKD3KXEZCUFLFF3C26UK3KJHY",
"endpoint_id": "kinesis-tf-copy",
"endpoint_type": "target",
"engine_name": "kinesis",
"extra_connection_attributes": "",
"id": "kinesis-tf-copy",
"kafka_settings": [],
"kinesis_settings": [
{
"include_control_details": true,
"include_null_and_empty": true,
"include_partition_value": true,
"include_table_alter_operations": true,
"include_transaction_details": true,
"message_format": "json-unformatted",
"partition_include_schema_table": true,
"service_access_role_arn": "arn:aws:iam::623395924981:role/service-role/rds-s3-export-role-tf-copy",
"stream_arn": "arn:aws:kinesis:us-west-2:623395924981:stream/test-dms-cdc-stream-tf-copy"
}
],
"kms_key_arn": "",
"mongodb_settings": [],
"password": null,
"port": null,
"s3_settings": [],
"secrets_manager_access_role_arn": null,
"secrets_manager_arn": null,
"server_name": null,
"service_access_role": null,
"ssl_mode": "none",
"tags": {},
"tags_all": {},
"username": null
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"aws_iam_role.dms_export_role",
"aws_kinesis_stream.dms_cdc"
]
}
]
},
{
"mode": "managed",
"type": "aws_dms_replication_instance",
"name": "instance",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"allocated_storage": 100,
"allow_major_version_upgrade": null,
"apply_immediately": null,
"auto_minor_version_upgrade": false,
"availability_zone": "us-west-2b",
"engine_version": "3.4.3",
"id": "test-replication-instance-tf-copy",
"kms_key_arn": "arn:aws:kms:us-west-2:623395924981:key/246f9576-c5cc-40a9-8ded-8e4416da6a5e",
"multi_az": false,
"preferred_maintenance_window": "tue:06:08-tue:06:38",
"publicly_accessible": false,
"replication_instance_arn": "arn:aws:dms:us-west-2:623395924981:rep:L2X6VXI3UKOUAYXHMQM3UATEOAYQDZ5DPFP37SI",
"replication_instance_class": "dms.r5.2xlarge",
"replication_instance_id": "test-replication-instance-tf-copy",
"replication_instance_private_ips": [
"10.0.5.166"
],
"replication_instance_public_ips": [
""
],
"replication_subnet_group_id": "dms-replication-subnet-group-tf-copy",
"tags": {},
"tags_all": {},
"timeouts": null,
"vpc_security_group_ids": [
"sg-021cbaa77489dc827"
]
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjoxODAwMDAwMDAwMDAwLCJkZWxldGUiOjE4MDAwMDAwMDAwMDAsInVwZGF0ZSI6MTgwMDAwMDAwMDAwMH19",
"dependencies": [
"aws_dms_replication_subnet_group.group"
]
}
]
},
{
"mode": "managed",
"type": "aws_dms_replication_subnet_group",
"name": "group",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"id": "dms-replication-subnet-group-tf-copy",
"replication_subnet_group_arn": "arn:aws:dms:us-west-2:623395924981:subgrp:dms-replication-subnet-group-tf-copy",
"replication_subnet_group_description": "default subnet group",
"replication_subnet_group_id": "dms-replication-subnet-group-tf-copy",
"subnet_ids": [
"subnet-01998c5fbc61307fb",
"subnet-02d6787169a8ed7c0",
"subnet-06fd6f6cc02395c72",
"subnet-0924c0c80518ca0a0",
"subnet-0aa517d144f53b9d8",
"subnet-0c5b7efe5f1e89be5",
"subnet-0ce644e68722377ef",
"subnet-0d8f1580083688ecf"
],
"tags": {},
"tags_all": {},
"vpc_id": "vpc-00972c2022aaccf37"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"data.aws_subnets.default"
]
}
]
},
{
"mode": "managed",
"type": "aws_dms_replication_task",
"name": "rds_to_kinesis",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"cdc_start_position": "",
"cdc_start_time": null,
"id": "rds-to-kinesis-tf-copy",
"migration_type": "full-load-and-cdc",
"replication_instance_arn": "arn:aws:dms:us-west-2:623395924981:rep:L2X6VXI3UKOUAYXHMQM3UATEOAYQDZ5DPFP37SI",
"replication_task_arn": "arn:aws:dms:us-west-2:623395924981:task:242HBACHZWQDCB4YLCK5I6OYIDRFQ5MLROES3XY",
"replication_task_id": "rds-to-kinesis-tf-copy",
"replication_task_settings": "{\"BeforeImageSettings\":null,\"ChangeProcessingDdlHandlingPolicy\":{\"HandleSourceTableAltered\":true,\"HandleSourceTableDropped\":true,\"HandleSourceTableTruncated\":true},\"ChangeProcessingTuning\":{\"BatchApplyMemoryLimit\":500,\"BatchApplyPreserveTransaction\":true,\"BatchApplyTimeoutMax\":30,\"BatchApplyTimeoutMin\":1,\"BatchSplitSize\":0,\"CommitTimeout\":1,\"MemoryKeepTime\":60,\"MemoryLimitTotal\":1024,\"MinTransactionSize\":1000,\"StatementCacheSize\":50},\"CharacterSetSettings\":null,\"ControlTablesSettings\":{\"ControlSchema\":\"\",\"FullLoadExceptionTableEnabled\":false,\"HistoryTableEnabled\":false,\"HistoryTimeslotInMinutes\":5,\"StatusTableEnabled\":false,\"SuspendedTablesTableEnabled\":false},\"ErrorBehavior\":{\"ApplyErrorDeletePolicy\":\"IGNORE_RECORD\",\"ApplyErrorEscalationCount\":0,\"ApplyErrorEscalationPolicy\":\"LOG_ERROR\",\"ApplyErrorFailOnTruncationDdl\":false,\"ApplyErrorInsertPolicy\":\"LOG_ERROR\",\"ApplyErrorUpdatePolicy\":\"LOG_ERROR\",\"DataErrorEscalationCount\":0,\"DataErrorEscalationPolicy\":\"SUSPEND_TABLE\",\"DataErrorPolicy\":\"LOG_ERROR\",\"DataTruncationErrorPolicy\":\"LOG_ERROR\",\"FailOnNoTablesCaptured\":true,\"FailOnTransactionConsistencyBreached\":false,\"FullLoadIgnoreConflicts\":true,\"RecoverableErrorCount\":-1,\"RecoverableErrorInterval\":5,\"RecoverableErrorStopRetryAfterThrottlingMax\":true,\"RecoverableErrorThrottling\":true,\"RecoverableErrorThrottlingMax\":1800,\"TableErrorEscalationCount\":0,\"TableErrorEscalationPolicy\":\"STOP_TASK\",\"TableErrorPolicy\":\"SUSPEND_TABLE\"},\"FailTaskWhenCleanTaskResourceFailed\":false,\"FullLoadSettings\":{\"CommitRate\":10000,\"CreatePkAfterFullLoad\":false,\"MaxFullLoadSubTasks\":8,\"StopTaskCachedChangesApplied\":false,\"StopTaskCachedChangesNotApplied\":false,\"TargetTablePrepMode\":\"DROP_AND_CREATE\",\"TransactionConsistencyTimeout\":600},\"Logging\":{\"EnableLogging\":false,\"LogComponents\":[{\"Id\":\"TRANSFORMATION\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"SOURCE_UNLOAD\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"IO\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"TARGET_LOAD\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"PERFORMANCE\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"SOURCE_CAPTURE\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"SORTER\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"REST_SERVER\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"VALIDATOR_EXT\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"TARGET_APPLY\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"TASK_MANAGER\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"TABLES_MANAGER\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"METADATA_MANAGER\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"FILE_FACTORY\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"COMMON\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"ADDONS\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"DATA_STRUCTURE\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"COMMUNICATION\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"},{\"Id\":\"FILE_TRANSFER\",\"Severity\":\"LOGGER_SEVERITY_DEFAULT\"}]},\"LoopbackPreventionSettings\":null,\"PostProcessingRules\":null,\"StreamBufferSettings\":{\"CtrlStreamBufferSizeInMB\":5,\"StreamBufferCount\":3,\"StreamBufferSizeInMB\":8},\"TTSettings\":{\"EnableTT\":false,\"TTRecordSettings\":null,\"TTS3Settings\":null},\"TargetMetadata\":{\"BatchApplyEnabled\":false,\"FullLobMode\":false,\"InlineLobMaxSize\":0,\"LimitedSizeLobMode\":true,\"LoadMaxFileSize\":0,\"LobChunkSize\":0,\"LobMaxSize\":256,\"ParallelApplyBufferSize\":0,\"ParallelApplyQueuesPerThread\":0,\"ParallelApplyThreads\":0,\"ParallelLoadBufferSize\":0,\"ParallelLoadQueuesPerThread\":0,\"ParallelLoadThreads\":0,\"SupportLobs\":true,\"TargetSchema\":\"\",\"TaskRecoveryTableEnabled\":false}}",
"source_endpoint_arn": "arn:aws:dms:us-west-2:623395924981:endpoint:3OBZTZZHCRAHVRMHLIN6UPWM23CMJZQ7QZZMTHI",
"table_mappings": "{\n \"rules\": [\n {\n \"rule-type\": \"selection\",\n \"rule-id\": \"807690761\",\n \"rule-name\": \"807690761\",\n \"object-locator\": {\n \"schema-name\": \"public\",\n \"table-name\": \"%\"\n },\n \"rule-action\": \"include\",\n \"filters\": []\n }\n ]\n}\n",
"tags": {},
"tags_all": {},
"target_endpoint_arn": "arn:aws:dms:us-west-2:623395924981:endpoint:WHFUJXXPBIQQNWQKD3KXEZCUFLFF3C26UK3KJHY"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"aws_dms_endpoint.db",
"aws_dms_endpoint.kinesis",
"aws_dms_replication_instance.instance",
"aws_dms_replication_subnet_group.group",
"aws_iam_role.dms_export_role",
"aws_kinesis_stream.dms_cdc",
"data.aws_secretsmanager_secret_version.db_password",
"data.aws_subnets.default"
]
}
]
},
{
"mode": "managed",
"type": "aws_iam_policy",
"name": "dms_export_role_policy",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:iam::623395924981:policy/service-role/snapExport2021-10-28-03.12.37.580-tf-copy",
"description": "RDS Snapshot Export To S3",
"id": "arn:aws:iam::623395924981:policy/service-role/snapExport2021-10-28-03.12.37.580-tf-copy",
"name": "snapExport2021-10-28-03.12.37.580-tf-copy",
"name_prefix": null,
"path": "/service-role/",
"policy": "{\"Statement\":[{\"Action\":\"kms:*\",\"Effect\":\"Allow\",\"Resource\":\"*\",\"Sid\":\"VisualEditor0\"},{\"Action\":[\"s3:PutObject*\",\"s3:ListBucket\",\"s3:GetObject*\",\"s3:DeleteObject*\",\"s3:GetBucketLocation\"],\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy\",\"arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy/*\"],\"Sid\":\"VisualEditor1\"},{\"Action\":[\"kinesis:PutRecord\",\"kinesis:PutRecords\",\"kinesis:DescribeStream\"],\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:kinesis:us-west-2:623395924981:stream/test-dms-cdc-stream-tf-copy\"],\"Sid\":\"Kinesis\"}],\"Version\":\"2012-10-17\"}",
"policy_id": "ANPAZCJKK5P2VWPQD5VTR",
"tags": {},
"tags_all": {}
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"aws_kinesis_stream.dms_cdc",
"aws_s3_bucket.export_bucket"
]
}
]
},
{
"mode": "managed",
"type": "aws_iam_policy",
"name": "kinesis_policy",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:iam::623395924981:policy/service-role/KinesisFirehoseServicePolicy-KDS-S3-e4gTU-us-west-2-tf-copy",
"description": "",
"id": "arn:aws:iam::623395924981:policy/service-role/KinesisFirehoseServicePolicy-KDS-S3-e4gTU-us-west-2-tf-copy",
"name": "KinesisFirehoseServicePolicy-KDS-S3-e4gTU-us-west-2-tf-copy",
"name_prefix": null,
"path": "/service-role/",
"policy": "{\"Statement\":[{\"Action\":[\"glue:GetTable\",\"glue:GetTableVersion\",\"glue:GetTableVersions\"],\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:glue:us-west-2:623395924981:catalog\",\"arn:aws:glue:us-west-2:623395924981:database/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%\",\"arn:aws:glue:us-west-2:623395924981:table/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%\"],\"Sid\":\"\"},{\"Action\":[\"s3:AbortMultipartUpload\",\"s3:GetBucketLocation\",\"s3:GetObject\",\"s3:ListBucket\",\"s3:ListBucketMultipartUploads\",\"s3:PutObject\"],\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy\",\"arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy/*\"],\"Sid\":\"\"},{\"Action\":[\"lambda:InvokeFunction\",\"lambda:GetFunctionConfiguration\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:lambda:us-west-2:623395924981:function:%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%\",\"Sid\":\"\"},{\"Action\":[\"kms:GenerateDataKey\",\"kms:Decrypt\"],\"Condition\":{\"StringEquals\":{\"kms:ViaService\":\"s3.us-west-2.amazonaws.com\"},\"StringLike\":{\"kms:EncryptionContext:aws:s3:arn\":[\"arn:aws:s3:::%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%/*\",\"arn:aws:s3:::%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%\"]}},\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:kms:us-west-2:623395924981:key/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%\"]},{\"Action\":[\"logs:PutLogEvents\"],\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:logs:us-west-2:623395924981:log-group:/aws/kinesisfirehose/KDS-S3-e4gTU:log-stream:*\",\"arn:aws:logs:us-west-2:623395924981:log-group:%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%:log-stream:*\"],\"Sid\":\"\"},{\"Action\":[\"kinesis:DescribeStream\",\"kinesis:GetShardIterator\",\"kinesis:GetRecords\",\"kinesis:ListShards\"],\"Effect\":\"Allow\",\"Resource\":\"arn:aws:kinesis:us-west-2:623395924981:stream/test-dms-cdc-stream-tf-copy\",\"Sid\":\"\"},{\"Action\":[\"kms:Decrypt\"],\"Condition\":{\"StringEquals\":{\"kms:ViaService\":\"kinesis.us-west-2.amazonaws.com\"},\"StringLike\":{\"kms:EncryptionContext:aws:kinesis:arn\":\"arn:aws:kinesis:us-west-2:623395924981:stream/test-dms-cdc-stream-tf-copy\"}},\"Effect\":\"Allow\",\"Resource\":[\"arn:aws:kms:us-west-2:623395924981:key/%FIREHOSE_POLICY_TEMPLATE_PLACEHOLDER%\"]}],\"Version\":\"2012-10-17\"}",
"policy_id": "ANPAZCJKK5P26O6GE3F5I",
"tags": {},
"tags_all": {}
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"aws_kinesis_stream.dms_cdc",
"aws_s3_bucket.export_bucket",
"data.aws_caller_identity.current"
]
}
]
},
{
"mode": "managed",
"type": "aws_iam_role",
"name": "dms_export_role",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:iam::623395924981:role/service-role/rds-s3-export-role-tf-copy",
"assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":[\"export.rds.amazonaws.com\",\"dms.amazonaws.com\"]},\"Action\":\"sts:AssumeRole\",\"Condition\":{}}]}",
"create_date": "2022-01-27T02:02:42Z",
"description": "",
"force_detach_policies": false,
"id": "rds-s3-export-role-tf-copy",
"inline_policy": [
{
"name": "",
"policy": ""
}
],
"managed_policy_arns": [
"arn:aws:iam::623395924981:policy/service-role/snapExport2021-10-28-03.12.37.580-tf-copy"
],
"max_session_duration": 3600,
"name": "rds-s3-export-role-tf-copy",
"name_prefix": "",
"path": "/service-role/",
"permissions_boundary": null,
"tags": {},
"tags_all": {},
"unique_id": "AROAZCJKK5P2U5ZYE5OEO"
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
},
{
"mode": "managed",
"type": "aws_iam_role",
"name": "kinesis_role",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"arn": "arn:aws:iam::623395924981:role/service-role/KinesisFirehoseServiceRole--tf-copy",
"assume_role_policy": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":{\"Service\":\"firehose.amazonaws.com\"},\"Action\":\"sts:AssumeRole\"}]}",
"create_date": "2022-01-27T02:02:42Z",
"description": "",
"force_detach_policies": false,
"id": "KinesisFirehoseServiceRole--tf-copy",
"inline_policy": [
{
"name": "",
"policy": ""
}
],
"managed_policy_arns": [
"arn:aws:iam::623395924981:policy/service-role/KinesisFirehoseServicePolicy-KDS-S3-e4gTU-us-west-2-tf-copy"
],
"max_session_duration": 3600,
"name": "KinesisFirehoseServiceRole--tf-copy",
"name_prefix": "",
"path": "/service-role/",
"permissions_boundary": null,
"tags": {},
"tags_all": {},
"unique_id": "AROAZCJKK5P2XMYUTB553"
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
},
{
"mode": "managed",
"type": "aws_iam_role_policy_attachment",
"name": "dms_export_role_policy",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"id": "rds-s3-export-role-tf-copy-20220127020305225500000002",
"policy_arn": "arn:aws:iam::623395924981:policy/service-role/snapExport2021-10-28-03.12.37.580-tf-copy",
"role": "rds-s3-export-role-tf-copy"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"aws_iam_policy.dms_export_role_policy",
"aws_iam_role.dms_export_role",
"aws_kinesis_stream.dms_cdc",
"aws_s3_bucket.export_bucket"
]
}
]
},
{
"mode": "managed",
"type": "aws_iam_role_policy_attachment",
"name": "kinesis_role_policy",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"id": "KinesisFirehoseServiceRole--tf-copy-20220127020304753700000001",
"policy_arn": "arn:aws:iam::623395924981:policy/service-role/KinesisFirehoseServicePolicy-KDS-S3-e4gTU-us-west-2-tf-copy",
"role": "KinesisFirehoseServiceRole--tf-copy"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"aws_iam_policy.kinesis_policy",
"aws_iam_role.kinesis_role",
"aws_kinesis_stream.dms_cdc",
"aws_s3_bucket.export_bucket",
"data.aws_caller_identity.current"
]
}
]
},
{
"mode": "managed",
"type": "aws_kinesis_firehose_delivery_stream",
"name": "cdc_s3",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 1,
"attributes": {
"arn": "arn:aws:firehose:us-west-2:623395924981:deliverystream/KDS-S3-e4gTU-tf-copy",
"destination": "extended_s3",
"destination_id": "destinationId-000000000001",
"elasticsearch_configuration": [],
"extended_s3_configuration": [
{
"bucket_arn": "arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy",
"buffer_interval": 60,
"buffer_size": 5,
"cloudwatch_logging_options": [
{
"enabled": true,
"log_group_name": "/aws/kinesisfirehose/KDS-S3-e4gTU-tf-copy",
"log_stream_name": "DestinationDelivery"
}
],
"compression_format": "GZIP",
"data_format_conversion_configuration": [],
"dynamic_partitioning_configuration": [],
"error_output_prefix": "kinesis-stream-errors/",
"kms_key_arn": "",
"prefix": "kinesis-stream/",
"processing_configuration": [
{
"enabled": false,
"processors": []
}
],
"role_arn": "arn:aws:iam::623395924981:role/service-role/KinesisFirehoseServiceRole--tf-copy",
"s3_backup_configuration": [],
"s3_backup_mode": "Disabled"
}
],
"http_endpoint_configuration": [],
"id": "arn:aws:firehose:us-west-2:623395924981:deliverystream/KDS-S3-e4gTU-tf-copy",
"kinesis_source_configuration": [
{
"kinesis_stream_arn": "arn:aws:kinesis:us-west-2:623395924981:stream/test-dms-cdc-stream-tf-copy",
"role_arn": "arn:aws:iam::623395924981:role/service-role/KinesisFirehoseServiceRole--tf-copy"
}
],
"name": "KDS-S3-e4gTU-tf-copy",
"redshift_configuration": [],
"s3_configuration": [],
"server_side_encryption": [
{
"enabled": false,
"key_arn": "",
"key_type": "AWS_OWNED_CMK"
}
],
"splunk_configuration": [],
"tags": {},
"tags_all": {},
"version_id": "1"
},
"sensitive_attributes": [],
"private": "eyJzY2hlbWFfdmVyc2lvbiI6IjEifQ==",
"dependencies": [
"aws_iam_role.kinesis_role",
"aws_kinesis_stream.dms_cdc",
"aws_s3_bucket.export_bucket"
]
}
]
},
{
"mode": "managed",
"type": "aws_kinesis_stream",
"name": "dms_cdc",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 1,
"attributes": {
"arn": "arn:aws:kinesis:us-west-2:623395924981:stream/test-dms-cdc-stream-tf-copy",
"encryption_type": "NONE",
"enforce_consumer_deletion": false,
"id": "arn:aws:kinesis:us-west-2:623395924981:stream/test-dms-cdc-stream-tf-copy",
"kms_key_id": "",
"name": "test-dms-cdc-stream-tf-copy",
"retention_period": 24,
"shard_count": 0,
"shard_level_metrics": [],
"stream_mode_details": [
{
"stream_mode": "ON_DEMAND"
}
],
"tags": {},
"tags_all": {},
"timeouts": null
},
"sensitive_attributes": [],
"private": "eyJlMmJmYjczMC1lY2FhLTExZTYtOGY4OC0zNDM2M2JjN2M0YzAiOnsiY3JlYXRlIjozMDAwMDAwMDAwMDAsImRlbGV0ZSI6NzIwMDAwMDAwMDAwMCwidXBkYXRlIjo3MjAwMDAwMDAwMDAwfSwic2NoZW1hX3ZlcnNpb24iOiIxIn0="
}
]
},
{
"mode": "managed",
"type": "aws_s3_bucket",
"name": "export_bucket",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"acceleration_status": "",
"acl": "private",
"arn": "arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy",
"bucket": "anyscale-test-s3-snapshot-export-bucket-tf-copy",
"bucket_domain_name": "anyscale-test-s3-snapshot-export-bucket-tf-copy.s3.amazonaws.com",
"bucket_prefix": null,
"bucket_regional_domain_name": "anyscale-test-s3-snapshot-export-bucket-tf-copy.s3.us-west-2.amazonaws.com",
"cors_rule": [],
"force_destroy": false,
"grant": [],
"hosted_zone_id": "Z3BJ6K6RIION7M",
"id": "anyscale-test-s3-snapshot-export-bucket-tf-copy",
"lifecycle_rule": [],
"logging": [],
"object_lock_configuration": [],
"policy": null,
"region": "us-west-2",
"replication_configuration": [],
"request_payer": "BucketOwner",
"server_side_encryption_configuration": [],
"tags": {},
"tags_all": {},
"versioning": [
{
"enabled": false,
"mfa_delete": false
}
],
"website": [],
"website_domain": null,
"website_endpoint": null
},
"sensitive_attributes": [],
"private": "bnVsbA=="
}
]
},
{
"mode": "managed",
"type": "aws_s3_bucket_policy",
"name": "databricks_access",
"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
"instances": [
{
"schema_version": 0,
"attributes": {
"bucket": "anyscale-test-s3-snapshot-export-bucket-tf-copy",
"id": "anyscale-test-s3-snapshot-export-bucket-tf-copy",
"policy": "{\"Statement\":[{\"Action\":[\"s3:GetObject\",\"s3:ListBucket\"],\"Effect\":\"Allow\",\"Principal\":{\"AWS\":\"arn:aws:iam::409614862495:role/default-autoscaling\"},\"Resource\":[\"arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy\",\"arn:aws:s3:::anyscale-test-s3-snapshot-export-bucket-tf-copy/*\"]}],\"Version\":\"2012-10-17\"}"
},
"sensitive_attributes": [],
"private": "bnVsbA==",
"dependencies": [
"aws_s3_bucket.export_bucket"
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment