Skip to content

Commit

Permalink
Merge branch 'main' of github.com:turbot/steampipe-plugin-aws into ad…
Browse files Browse the repository at this point in the history
…d-table-iot-greegrass
  • Loading branch information
ParthaI committed Jan 30, 2024
2 parents 624e447 + 7f3849a commit 15143eb
Show file tree
Hide file tree
Showing 43 changed files with 2,393 additions and 51 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/steampipe-anywhere.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ on:
push:
tags:
- 'v*'

workflow_dispatch:
inputs:
version:
description: "The version to release (must be prefixed with 'v')"
required: true


jobs:
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
## v0.129.0 [2024-01-19]

_What's new?_

- New tables added
- [aws_servicecatalog_provisioned_product](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_servicecatalog_provisioned_product) ([#1917](https://github.com/turbot/steampipe-plugin-aws/pull/1917))

_Enhancements_

- Added `deletion_protection_enabled` column to `aws_dynamodb_table` table. ([#2049](https://github.com/turbot/steampipe-plugin-aws/pull/2049))

_Bug fixes_

- Fixed default page size in `aws_organizations_account` table. ([#2058](https://github.com/turbot/steampipe-plugin-aws/pull/2058))
- Fixed `processor_features` column in `aws_rds_db_instance` not returning data when default value is set. ([#2028](https://github.com/turbot/steampipe-plugin-aws/pull/2028))
- Temporarily removed `aws_organizations_organizational_unit` table due to LTREE column issue. ([#2058](https://github.com/turbot/steampipe-plugin-aws/pull/2058))

## v0.128.0 [2024-01-15]

_What's new?_

- New tables added
- [aws_cloudtrail_lookup_event](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_cloudtrail_lookup_event) ([#2047](https://github.com/turbot/steampipe-plugin-aws/pull/2047))
- [aws_organizations_organizational_unit](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_organizations_organizational_unit) ([#1677](https://github.com/turbot/steampipe-plugin-aws/pull/1677))
- [aws_organizations_root](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_organizations_root) ([#1677](https://github.com/turbot/steampipe-plugin-aws/pull/1677))
- [aws_sns_subscription](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_sns_subscription) ([#2046](https://github.com/turbot/steampipe-plugin-aws/pull/2046))

**Note :** Table `aws_sns_topic_subscription` will be changing behaviours in a future release to return results from `ListSubscriptionsByTopic` instead of `ListSubscriptions`.

## v0.127.0 [2024-01-10]

_What's new?_
Expand Down
2 changes: 1 addition & 1 deletion aws-test/tests/aws_cloudwatch_log_group/test-get-query.sql
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.
7 changes: 7 additions & 0 deletions aws-test/tests/aws_sns_subscription/test-get-expected.json
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 }}"
}
]
3 changes: 3 additions & 0 deletions aws-test/tests/aws_sns_subscription/test-get-query.sql
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 }}'
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
}
]
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 }}'
9 changes: 9 additions & 0 deletions aws-test/tests/aws_sns_subscription/test-list-expected.json
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 }}"
}
]
3 changes: 3 additions & 0 deletions aws-test/tests/aws_sns_subscription/test-list-query.sql
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}}"]'
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
3 changes: 3 additions & 0 deletions aws-test/tests/aws_sns_subscription/test-notfound-query.sql
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 aws-test/tests/aws_sns_subscription/test-turbot-expected.json
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() }}"
}
]
3 changes: 3 additions & 0 deletions aws-test/tests/aws_sns_subscription/test-turbot-query.sql
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 }}'
1 change: 1 addition & 0 deletions aws-test/tests/aws_sns_subscription/variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
93 changes: 93 additions & 0 deletions aws-test/tests/aws_sns_subscription/variables.tf
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
}
9 changes: 7 additions & 2 deletions aws/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ func Plugin(ctx context.Context) *plugin.Plugin {
"aws_cloudtrail_channel": tableAwsCloudtrailChannel(ctx),
"aws_cloudtrail_event_data_store": tableAwsCloudtrailEventDataStore(ctx),
"aws_cloudtrail_import": tableAwsCloudtrailImport(ctx),
"aws_cloudtrail_lookup_event": tableAwsCloudtrailLookupEvent(ctx),
"aws_cloudtrail_query": tableAwsCloudTrailQuery(ctx),
"aws_cloudtrail_trail": tableAwsCloudtrailTrail(ctx),
"aws_cloudtrail_trail_event": tableAwsCloudtrailTrailEvent(ctx),
Expand Down Expand Up @@ -336,8 +337,10 @@ func Plugin(ctx context.Context) *plugin.Plugin {
"aws_oam_sink": tableAwsOAMSink(ctx),
"aws_opensearch_domain": tableAwsOpenSearchDomain(ctx),
"aws_organizations_account": tableAwsOrganizationsAccount(ctx),
// "aws_organizations_organizational_unit": tableAwsOrganizationsOrganizationalUnit(ctx),
"aws_organizations_policy": tableAwsOrganizationsPolicy(ctx),
"aws_organizations_policy_target": tableAwsOrganizationsPolicyTarget(ctx),
"aws_organizations_root": tableAwsOrganizationsRoot(ctx),
"aws_pinpoint_app": tableAwsPinpointApp(ctx),
"aws_pipes_pipe": tableAwsPipes(ctx),
"aws_pricing_product": tableAwsPricingProduct(ctx),
Expand Down Expand Up @@ -415,11 +418,12 @@ func Plugin(ctx context.Context) *plugin.Plugin {
"aws_securitylake_data_lake": tableAwsSecurityLakeDataLake(ctx),
"aws_securitylake_subscriber": tableAwsSecurityLakeSubscriber(ctx),
"aws_serverlessapplicationrepository_application": tableAwsServerlessApplicationRepositoryApplication(ctx),
"aws_servicecatalog_portfolio": tableAwsServicecatalogPortfolio(ctx),
"aws_servicecatalog_product": tableAwsServicecatalogProduct(ctx),
"aws_servicecatalog_provisioned_product": tableAwsServicecatalogProvisionedProduct(ctx),
"aws_service_discovery_instance": tableAwsServiceDiscoveryInstance(ctx),
"aws_service_discovery_namespace": tableAwsServiceDiscoveryNamespace(ctx),
"aws_service_discovery_service": tableAwsServiceDiscoveryService(ctx),
"aws_servicecatalog_portfolio": tableAwsServicecatalogPortfolio(ctx),
"aws_servicecatalog_product": tableAwsServicecatalogProduct(ctx),
"aws_servicequotas_default_service_quota": tableAwsServiceQuotasDefaultServiceQuota(ctx),
"aws_servicequotas_service_quota": tableAwsServiceQuotasServiceQuota(ctx),
"aws_servicequotas_service_quota_change_request": tableAwsServiceQuotasServiceQuotaChangeRequest(ctx),
Expand All @@ -429,6 +433,7 @@ func Plugin(ctx context.Context) *plugin.Plugin {
"aws_sfn_state_machine_execution": tableAwsStepFunctionsStateMachineExecution(ctx),
"aws_sfn_state_machine_execution_history": tableAwsStepFunctionsStateMachineExecutionHistory(ctx),
"aws_simspaceweaver_simulation": tableAwsSimSpaceWeaverSimulation(ctx),
"aws_sns_subscription": tableAwsSnsSubscription(ctx),
"aws_sns_topic": tableAwsSnsTopic(ctx),
"aws_sns_topic_subscription": tableAwsSnsTopicSubscription(ctx),
"aws_sqs_queue": tableAwsSqsQueue(ctx),
Expand Down
Loading

0 comments on commit 15143eb

Please sign in to comment.