-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:turbot/steampipe-plugin-aws into ad…
…d-table-iot-greegrass
- Loading branch information
Showing
43 changed files
with
2,393 additions
and
51 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
select name | ||
from aws.aws_cloudwatch_log_group | ||
where name = '{{ resourceName }}' | ||
where name = '{{ resourceName }}' and region = '{{ output.region_name.value }}' |
Empty file.
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,7 @@ | ||
[ | ||
{ | ||
"endpoint": "{{ output.endpoint.value }}", | ||
"protocol": "sqs", | ||
"topic_arn": "{{ output.topic_arn.value }}" | ||
} | ||
] |
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,3 @@ | ||
select topic_arn, endpoint, protocol | ||
from aws.aws_sns_subscription | ||
where subscription_arn = '{{ output.resource_aka.value }}' |
11 changes: 11 additions & 0 deletions
11
aws-test/tests/aws_sns_subscription/test-get-subscription-attributes-expected.json
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,11 @@ | ||
[ | ||
{ | ||
"confirmation_was_authenticated": true, | ||
"delivery_policy": null, | ||
"effective_delivery_policy": null, | ||
"filter_policy": null, | ||
"pending_confirmation": false, | ||
"raw_message_delivery": false, | ||
"redrive_policy": null | ||
} | ||
] |
3 changes: 3 additions & 0 deletions
3
aws-test/tests/aws_sns_subscription/test-get-subscription-attributes-query.sql
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,3 @@ | ||
select confirmation_was_authenticated, delivery_policy, effective_delivery_policy, redrive_policy, filter_policy, pending_confirmation, raw_message_delivery | ||
from aws.aws_sns_subscription | ||
where subscription_arn = '{{ output.resource_aka.value }}' |
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,9 @@ | ||
[ | ||
{ | ||
"endpoint": "{{ output.endpoint.value }}", | ||
"owner": "{{ output.account_id.value }}", | ||
"protocol": "sqs", | ||
"subscription_arn": "{{ output.resource_aka.value }}", | ||
"topic_arn": "{{ output.topic_arn.value }}" | ||
} | ||
] |
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,3 @@ | ||
select topic_arn, subscription_arn, owner, protocol, endpoint | ||
from aws.aws_sns_subscription | ||
where akas::text = '["{{output.resource_aka.value}}"]' |
1 change: 1 addition & 0 deletions
1
aws-test/tests/aws_sns_subscription/test-notfound-expected.json
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 @@ | ||
[] |
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,3 @@ | ||
select * | ||
from aws.aws_sns_subscription | ||
where subscription_arn = '{{ output.resource_aka.value }}:dsf' |
11 changes: 11 additions & 0 deletions
11
aws-test/tests/aws_sns_subscription/test-turbot-expected.json
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,11 @@ | ||
[ | ||
{ | ||
"account_id": "{{ output.account_id.value }}", | ||
"akas": [ | ||
"{{ output.resource_aka.value }}" | ||
], | ||
"partition": "{{ output.aws_partition.value }}", | ||
"region": "{{ output.aws_region.value }}", | ||
"title": "{{ output.resource_aka.value.split(':').pop() }}" | ||
} | ||
] |
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,3 @@ | ||
select title, akas, account_id, region, partition | ||
from aws.aws_sns_subscription | ||
where subscription_arn = '{{ output.resource_aka.value }}' |
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 @@ | ||
{} |
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,93 @@ | ||
|
||
variable "resource_name" { | ||
type = string | ||
default = "turbot-test-20200125-create-update" | ||
description = "Name of the resource used throughout the test." | ||
} | ||
|
||
variable "aws_profile" { | ||
type = string | ||
default = "default" | ||
description = "AWS credentials profile used for the test. Default is to use the default profile." | ||
} | ||
|
||
variable "aws_region" { | ||
type = string | ||
default = "us-east-1" | ||
description = "AWS region used for the test. Does not work with default region in config, so must be defined here." | ||
} | ||
|
||
variable "aws_region_alternate" { | ||
type = string | ||
default = "us-east-2" | ||
description = "Alternate AWS region used for tests that require two regions (e.g. DynamoDB global tables)." | ||
} | ||
|
||
provider "aws" { | ||
profile = var.aws_profile | ||
region = var.aws_region | ||
} | ||
|
||
provider "aws" { | ||
alias = "alternate" | ||
profile = var.aws_profile | ||
region = var.aws_region_alternate | ||
} | ||
|
||
data "aws_partition" "current" {} | ||
data "aws_caller_identity" "current" {} | ||
data "aws_region" "primary" {} | ||
data "aws_region" "alternate" { | ||
provider = aws.alternate | ||
} | ||
|
||
data "null_data_source" "resource" { | ||
inputs = { | ||
scope = "arn:${data.aws_partition.current.partition}:::${data.aws_caller_identity.current.account_id}" | ||
} | ||
} | ||
|
||
# Create AWS > SNS > Topic | ||
resource "aws_sns_topic" "aws_sns_subscription" { | ||
name = var.resource_name | ||
} | ||
|
||
# Create AWS > SQS > Queue | ||
resource "aws_sqs_queue" "aws_sns_subscription" { | ||
name = var.resource_name | ||
} | ||
|
||
# Create AWS > SNS > Subscription | ||
resource "aws_sns_topic_subscription" "named_test_resource" { | ||
topic_arn = aws_sns_topic.aws_sns_subscription.arn | ||
protocol = "sqs" | ||
endpoint = aws_sqs_queue.aws_sns_subscription.arn | ||
} | ||
|
||
output "resource_aka" { | ||
value = aws_sns_topic_subscription.named_test_resource.arn | ||
} | ||
|
||
output "endpoint" { | ||
value = aws_sqs_queue.aws_sns_subscription.arn | ||
} | ||
|
||
output "topic_arn" { | ||
value = aws_sns_topic.aws_sns_subscription.arn | ||
} | ||
|
||
output "account_id" { | ||
value = data.aws_caller_identity.current.account_id | ||
} | ||
|
||
output "aws_region" { | ||
value = data.aws_region.primary.name | ||
} | ||
|
||
output "aws_partition" { | ||
value = data.aws_partition.current.partition | ||
} | ||
|
||
output "resource_name" { | ||
value = var.resource_name | ||
} |
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
Oops, something went wrong.