Skip to content

Instantly share code, notes, and snippets.

@pmenglund
Created November 14, 2022 21:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pmenglund/e3e616e225527a39ae6ce4f42371f114 to your computer and use it in GitHub Desktop.
Save pmenglund/e3e616e225527a39ae6ce4f42371f114 to your computer and use it in GitHub Desktop.
terraform plan output
$ terraform plan
data.rockset_account.current: Reading...
data.rockset_account.current: Read complete after 0s [id=318212636800]
data.aws_iam_policy_document.rockset-trust-policy: Reading...
data.aws_iam_policy_document.rockset-trust-policy: Read complete after 0s [id=2982727827]
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# aws_iam_policy.rockset-s3-integration will be created
+ resource "aws_iam_policy" "rockset-s3-integration" {
+ arn = (known after apply)
+ id = (known after apply)
+ name = "rockset-s3-integration"
+ path = "/"
+ policy = jsonencode(
{
+ Id = "RocksetS3IntegrationPolicy"
+ Statement = [
+ {
+ Action = [
+ "s3:ListBucket",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::rockset-community-datasets",
]
+ Sid = "BucketActions"
},
+ {
+ Action = [
+ "s3:GetObject",
]
+ Effect = "Allow"
+ Resource = [
+ "arn:aws:s3:::rockset-community-datasets/*",
]
+ Sid = "ObjectActions"
},
]
+ Version = "2012-10-17"
}
)
+ policy_id = (known after apply)
+ tags_all = (known after apply)
}
# aws_iam_role.rockset will be created
+ resource "aws_iam_role" "rockset" {
+ arn = (known after apply)
+ assume_role_policy = jsonencode(
{
+ Statement = [
+ {
+ Action = "sts:AssumeRole"
+ Condition = {
+ StringEquals = {
+ "sts:ExternalId" = "e61625b901162f9a210b615794ab76108eed8904500f5dd85d9d52c33ef501ae"
}
}
+ Effect = "Allow"
+ Principal = {
+ AWS = "arn:aws:iam::318212636800:root"
}
+ Sid = ""
},
]
+ Version = "2012-10-17"
}
)
+ create_date = (known after apply)
+ force_detach_policies = false
+ id = (known after apply)
+ managed_policy_arns = (known after apply)
+ max_session_duration = 3600
+ name = "rockset-s3-integration"
+ name_prefix = (known after apply)
+ path = "/"
+ tags_all = (known after apply)
+ unique_id = (known after apply)
+ inline_policy {
+ name = (known after apply)
+ policy = (known after apply)
}
}
# aws_iam_role_policy_attachment.rockset_s3_integration will be created
+ resource "aws_iam_role_policy_attachment" "rockset_s3_integration" {
+ id = (known after apply)
+ policy_arn = (known after apply)
+ role = "rockset-s3-integration"
}
# aws_ssm_parameter.api-key will be created
+ resource "aws_ssm_parameter" "api-key" {
+ arn = (known after apply)
+ data_type = (known after apply)
+ id = (known after apply)
+ insecure_value = (known after apply)
+ key_id = (known after apply)
+ name = "/rockset/blog/apikey"
+ tags_all = (known after apply)
+ tier = (known after apply)
+ type = "SecureString"
+ value = (sensitive value)
+ version = (known after apply)
}
# rockset_alias.movies will be created
+ resource "rockset_alias" "movies" {
+ collections = [
+ "blog.movies-s3",
]
+ description = "created by Rockset terraform provider"
+ id = (known after apply)
+ name = "movies"
+ workspace = "blog"
}
# rockset_api_key.ql-only will be created
+ resource "rockset_api_key" "ql-only" {
+ id = (known after apply)
+ key = (sensitive value)
+ name = "blog-ql-only"
+ role = "blog-read-only"
+ user = (known after apply)
}
# rockset_kafka_collection.orders will be created
+ resource "rockset_kafka_collection" "orders" {
+ description = "created by Rockset terraform provider"
+ field_mapping_query = <<-EOT
SELECT
COUNT(i.orderid) AS orders,
SUM(i.orderunits) AS units,
i.address.zipcode,
i.address.state,
-- bucket data in five minute buckets
TIME_BUCKET(MINUTES(5), TIMESTAMP_MILLIS(i.ordertime)) AS _event_time
FROM
_input AS i
WHERE
-- drop all records with an incorrect state
i.address.state != 'State_'
GROUP BY
_event_time,
i.address.zipcode,
i.address.state
EOT
+ id = (known after apply)
+ name = "orders"
+ retention_secs = 2592000
+ wait_for_collection = true
+ wait_for_documents = 0
+ workspace = "blog"
+ source {
+ consumer_group_id = (known after apply)
+ integration_name = "confluent-cloud-blog"
+ offset_reset_policy = "EARLIEST"
+ status = (known after apply)
+ topic_name = "test_json"
+ use_v3 = true
}
}
# rockset_kafka_integration.confluent will be created
+ resource "rockset_kafka_integration" "confluent" {
+ bootstrap_servers = "pkc-pgq85.us-west-2.aws.confluent.cloud:9092"
+ connection_string = (known after apply)
+ description = "created by Rockset terraform provider"
+ id = (known after apply)
+ name = "confluent-cloud-blog"
+ security_config = {
+ "api_key" = "5E6CVIXJRFSJY26J"
+ "secret" = "WuPP..."
}
+ use_v3 = true
+ wait_for_integration = true
}
# rockset_query_lambda.top-rated will be created
+ resource "rockset_query_lambda" "top-rated" {
+ description = "created by Rockset terraform provider"
+ id = (known after apply)
+ name = "top-rated-movies"
+ state = (known after apply)
+ version = (known after apply)
+ workspace = "blog"
+ sql {
+ query = <<-EOT
SELECT
title,
TIME_BUCKET(
YEARS(1),
PARSE_TIMESTAMP('%Y-%m-%d', release_date)
) as year,
popularity
FROM
blog.movies AS m
where
release_date != ''
AND popularity > 10
GROUP BY
year,
title,
popularity
order by
popularity desc
EOT
}
}
# rockset_query_lambda_tag.stable will be created
+ resource "rockset_query_lambda_tag" "stable" {
+ id = (known after apply)
+ name = "stable"
+ query_lambda = "top-rated-movies"
+ version = (known after apply)
+ workspace = "blog"
}
# rockset_role.read-only will be created
+ resource "rockset_role" "read-only" {
+ created_at = (known after apply)
+ created_by = (known after apply)
+ id = (known after apply)
+ name = "blog-read-only"
+ owner_email = (known after apply)
+ privilege {
+ action = "EXECUTE_QUERY_LAMBDA_WS"
+ cluster = "*ALL*"
+ resource_name = "blog"
}
}
# rockset_s3_collection.movies will be created
+ resource "rockset_s3_collection" "movies" {
+ description = "created by Rockset terraform provider"
+ id = (known after apply)
+ name = "movies-s3"
+ retention_secs = 2592000
+ wait_for_collection = true
+ wait_for_documents = 0
+ workspace = "blog"
+ source {
+ bucket = "rockset-community-datasets"
+ format = "json"
+ integration_name = "rockset-community-datasets"
+ pattern = "public/movies/*.json"
}
}
# rockset_s3_integration.integration will be created
+ resource "rockset_s3_integration" "integration" {
+ aws_role_arn = (known after apply)
+ description = "created by Rockset terraform provider"
+ id = (known after apply)
+ name = "rockset-community-datasets"
}
# rockset_view.english-movies will be created
+ resource "rockset_view" "english-movies" {
+ created_by = (known after apply)
+ description = "created by Rockset terraform provider"
+ id = (known after apply)
+ name = "english-movies"
+ query = <<-EOT
SELECT
*
FROM
blog.movies AS m
WHERE
m.original_language = 'en'
EOT
+ workspace = "blog"
}
# rockset_workspace.blog will be created
+ resource "rockset_workspace" "blog" {
+ created_by = (known after apply)
+ description = "created by Rockset terraform provider"
+ id = (known after apply)
+ name = "blog"
}
Plan: 15 to add, 0 to change, 0 to destroy.
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform apply" now.  7s 665ms  13:53:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment