Skip to content

Commit

Permalink
Merge branch 'issue-1994' into add-table-iot-fleet-metric
Browse files Browse the repository at this point in the history
  • Loading branch information
ParthaI authored Jan 30, 2024
2 parents b40b7e9 + d9be0e0 commit da25609
Show file tree
Hide file tree
Showing 724 changed files with 38,361 additions and 3,518 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/steampipe-anywhere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Release Steampipe Anywhere Components

on:
push:
tags:
- 'v*'

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


jobs:
anywhere_publish_workflow:
uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main
secrets: inherit
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,7 @@ scripts/generate_parliament_iam_permissions/generate_go_file.
node_modules

# Ignore file types
.vscode/
.vscode/

# Ignore dist folders
dist/
17 changes: 14 additions & 3 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,25 @@ builds:
- GOPRIVATE=github.com/turbot
goos:
- linux
- darwin

goarch:
- amd64
- arm64
id: "steampipe-linux"
binary: "{{ .ProjectName }}.plugin"

id: "steampipe"
- env:
- CGO_ENABLED=0
- GO111MODULE=on
- GOPRIVATE=github.com/turbot
goos:
- darwin
goarch:
- amd64
- arm64
id: "steampipe-darwin"
binary: "{{ .ProjectName }}.plugin"
flags:
- -tags=netgo

archives:
- format: gz
Expand Down
74 changes: 73 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,75 @@
## 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?_

- New tables added
- [aws_appsync_graphql_api](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_appsync_graphql_api) ([#2027](https://github.com/turbot/steampipe-plugin-aws/pull/2027))
- [aws_mq_broker](https://hub.steampipe.io/plugins/turbot/aws/tables/aws_mq_broker) ([#2020](https://github.com/turbot/steampipe-plugin-aws/pull/2020))

_Enhancements_

- Added `storage_throughput` column to `aws_rds_db_instance` table. ([#2010](https://github.com/turbot/steampipe-plugin-aws/pull/2010)) (Thanks [@toddwh50](https://github.com/toddwh50) for the contribution!)
- Added `layers` column to `aws_lambda_function` table. ([#2008](https://github.com/turbot/steampipe-plugin-aws/pull/2008)) (Thanks [@icaliskanoglu](https://github.com/icaliskanoglu) for the contribution!)
- Added `tags` column to `aws_backup_recovery_point` and `aws_backup_vault` tables. ([#2033](https://github.com/turbot/steampipe-plugin-aws/pull/2033))

_Bug fixes_

- Custom HTTP client should allow buildable settings through env var options such as AWS_CA_BUNDLE. ([#2044](https://github.com/turbot/steampipe-plugin-aws/pull/2044))
- Fixed `MaxItems` in `aws_iam_policy` and `aws_iam_policy_attachment` tables to use `1000` instead of `100` to avoid unnecessary API calls. ([#2025](https://github.com/turbot/steampipe-plugin-aws/pull/2025)) ([#2026](https://github.com/turbot/steampipe-plugin-aws/pull/2026))

## v0.126.0 [2023-12-29]

_Enhancements_

- Updated the plugin to use a shared, optimized HTTP client that enhances DNS management and reduces connection floods for more stable and efficient queries. ([#2036](https://github.com/turbot/steampipe-plugin-aws/pull/2036))

## v0.125.0 [2023-12-20]

_Enhancements_

- Updated the `.goreleaser` file to build the netgo package only for Darwin systems. ([#2029](https://github.com/turbot/steampipe-plugin-aws/pull/2029))

## v0.124.0 [2023-12-12]

_What's new?_

- The plugin can now be downloaded and used with the [Steampipe CLI](https://steampipe.io/docs), as a [Postgres FDW](https://steampipe.io/docs/steampipe_postgres/overview), as a [SQLite extension](https://steampipe.io/docs//steampipe_sqlite/overview) and as a standalone [exporter](https://steampipe.io/docs/steampipe_export/overview).
- The table docs have been updated to provide corresponding example queries for Postgres FDW and SQLite extension.
- Docs license updated to match Steampipe [CC BY-NC-ND license](https://github.com/turbot/steampipe-plugin-aws/blob/main/docs/LICENSE).

_Dependencies_

- Recompiled plugin with [steampipe-plugin-sdk v5.8.0](https://github.com/turbot/steampipe-plugin-sdk/blob/main/CHANGELOG.md#v580-2023-12-11) that includes plugin server enacapsulation for in-process and GRPC usage, adding Steampipe Plugin SDK version to `_ctx` column, and fixing connection and potential divide-by-zero bugs. ([#2011](https://github.com/turbot/steampipe-plugin-aws/pull/2011))

## v0.123.0 [2023-11-16]

_What's new?_
Expand Down Expand Up @@ -99,7 +171,7 @@ _Enhancements_
_Bug fixes_

- Fixed the data type of the `sms_configuration_failure` column in the `aws_cognito_user_pool` table to be of `STRING` type instead of `JSON`. ([#1890](https://github.com/turbot/steampipe-plugin-aws/pull/1890)) (Thanks [@KTamas](https://github.com/KTamas) for the contribution!)
- Fixed typo in the `listQueryRegionsForConnection` function in the `multi_regio,.go` file. ([#1887](https://github.com/turbot/steampipe-plugin-aws/pull/1887)) (Thanks [@pdecat](https://github.com/pdecat) for the contribution!)
- Fixed typo in the `listQueryRegionsForConnection` function in the `multi_region.go` file. ([#1887](https://github.com/turbot/steampipe-plugin-aws/pull/1887)) (Thanks [@pdecat](https://github.com/pdecat) for the contribution!)

_Dependencies_

Expand Down
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,18 @@ The AWS plugin has the power to:

- **[Detailed configuration guide →](https://hub.steampipe.io/plugins/turbot/aws#get-started)**

## Engines

This plugin is available for the following engines:

| Engine | Description
|---------------|------------------------------------------
| [Steampipe](https://steampipe.io/docs) | The Steampipe CLI exposes APIs and services as a high-performance relational database, giving you the ability to write SQL-based queries to explore dynamic data. Mods extend Steampipe's capabilities with dashboards, reports, and controls built with simple HCL. The Steampipe CLI is a turnkey solution that includes its own Postgres database, plugin management, and mod support.
| [Postgres FDW](https://steampipe.io/docs/steampipe_postgres/overview) | Steampipe Postgres FDWs are native Postgres Foreign Data Wrappers that translate APIs to foreign tables. Unlike Steampipe CLI, which ships with its own Postgres server instance, the Steampipe Postgres FDWs can be installed in any supported Postgres database version.
| [SQLite Extension](https://steampipe.io/docs//steampipe_sqlite/overview) | Steampipe SQLite Extensions provide SQLite virtual tables that translate your queries into API calls, transparently fetching information from your API or service as you request it.
| [Export](https://steampipe.io/docs/steampipe_export/overview) | Steampipe Plugin Exporters provide a flexible mechanism for exporting information from cloud services and APIs. Each exporter is a stand-alone binary that allows you to extract data using Steampipe plugins without a database.
| [Turbot Pipes](https://turbot.com/pipes/docs) | Turbot Pipes is the only intelligence, automation & security platform built specifically for DevOps. Pipes provide hosted Steampipe database instances, shared dashboards, snapshots, and more.

## Developing

Prerequisites:
Expand Down Expand Up @@ -71,11 +83,17 @@ Further reading:
- [Writing plugins](https://steampipe.io/docs/develop/writing-plugins)
- [Writing your first table](https://steampipe.io/docs/develop/writing-your-first-table)

## Contributing
## Open Source & Contributing

This repository is published under the [Apache 2.0](https://www.apache.org/licenses/LICENSE-2.0) (source code) and [CC BY-NC-ND](https://creativecommons.org/licenses/by-nc-nd/2.0/) (docs) licenses. Please see our [code of conduct](https://github.com/turbot/.github/blob/main/CODE_OF_CONDUCT.md). We look forward to collaborating with you!

[Steampipe](https://steampipe.io) is a product produced from this open source software, exclusively by [Turbot HQ, Inc](https://turbot.com). It is distributed under our commercial terms. Others are allowed to make their own distribution of the software, but cannot use any of the Turbot trademarks, cloud services, etc. You can learn more in our [Open Source FAQ](https://turbot.com/open-source).

## Get Involved

Please see the [contribution guidelines](https://github.com/turbot/steampipe/blob/main/CONTRIBUTING.md) and our [code of conduct](https://github.com/turbot/steampipe/blob/main/CODE_OF_CONDUCT.md). All contributions are subject to the [Apache 2.0 open source license](https://github.com/turbot/steampipe-plugin-aws/blob/main/LICENSE).
**[Join #steampipe on Slack →](https://turbot.com/community/join)**

`help wanted` issues:
Want to help but don't know where to start? Pick up one of the `help wanted` issues:

- [Steampipe](https://github.com/turbot/steampipe/labels/help%20wanted)
- [AWS Plugin](https://github.com/turbot/steampipe-plugin-aws/labels/help%20wanted)
10 changes: 0 additions & 10 deletions SECURITY.md

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1 +1 @@
null
[]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
null
[]
6 changes: 3 additions & 3 deletions aws-test/tests/aws_appautoscaling_policy/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ output "aws_partition" {
value = data.aws_partition.current.partition
}

output "resource_id" {
output "resource_name" {
value = aws_appautoscaling_policy.named_test_resource.id
}

output "resource_name" {
value = var.resource_name
output "resource_id" {
value = "table/${var.resource_name}"
}

Original file line number Diff line number Diff line change
@@ -1 +1 @@
null
[]
4 changes: 2 additions & 2 deletions aws-test/tests/aws_appautoscaling_target/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ output "aws_partition" {
}

output "resource_id" {
value = aws_appautoscaling_target.named_test_resource.id
value = "table/${var.resource_name}"
}

output "resource_name" {
value = var.resource_name
value = aws_appautoscaling_target.named_test_resource.id
}

Empty file.
8 changes: 8 additions & 0 deletions aws-test/tests/aws_appsync_graphql_api/test-get-expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[
{
"api_id": "{{output.resource_id.value}}",
"api_type": "GRAPHQL",
"arn": "{{output.resource_aka.value}}",
"name": "{{resourceName}}"
}
]
3 changes: 3 additions & 0 deletions aws-test/tests/aws_appsync_graphql_api/test-get-query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select name, arn, api_id, api_type
from aws_appsync_graphql_api
where api_id = '{{ output.resource_id.value }}'
12 changes: 12 additions & 0 deletions aws-test/tests/aws_appsync_graphql_api/test-hydrate-expected.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"akas": [
"{{ output.resource_aka.value }}"
],
"name": "{{resourceName}}",
"tags": {
"name": "{{resourceName}}"
},
"title": "{{resourceName}}"
}
]
3 changes: 3 additions & 0 deletions aws-test/tests/aws_appsync_graphql_api/test-hydrate-query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select name, akas, tags, title
from aws_appsync_graphql_api
where arn = '{{ output.resource_aka.value }}'
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[
{
"arn": "{{ output.resource_aka.value }}",
"name": "{{ resourceName }}"
}
]
3 changes: 3 additions & 0 deletions aws-test/tests/aws_appsync_graphql_api/test-list-query.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select name, arn
from aws_appsync_graphql_api
where arn = '{{ output.resource_aka.value }}';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
select name, arn
from aws_appsync_graphql_api
where name = 'dummy-{{ resourceName }}';
1 change: 1 addition & 0 deletions aws-test/tests/aws_appsync_graphql_api/variables.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{}
105 changes: 105 additions & 0 deletions aws-test/tests/aws_appsync_graphql_api/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@

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}"
}
}

data "aws_iam_policy_document" "assume_role" {
statement {
effect = "Allow"

principals {
type = "Service"
identifiers = ["appsync.amazonaws.com"]
}

actions = ["sts:AssumeRole"]
}
}

resource "aws_iam_role" "named_test_resource" {
name = var.resource_name
assume_role_policy = data.aws_iam_policy_document.assume_role.json
}

resource "aws_iam_role_policy_attachment" "named_test_resource" {
policy_arn = "arn:aws:iam::aws:policy/service-role/AWSAppSyncPushToCloudWatchLogs"
role = aws_iam_role.named_test_resource.name
}

resource "aws_appsync_graphql_api" "named_test_resource" {
authentication_type = "API_KEY"
name = var.resource_name

additional_authentication_provider {
authentication_type = "AWS_IAM"
}

log_config {
cloudwatch_logs_role_arn = aws_iam_role.named_test_resource.arn
field_log_level = "ERROR"
}

tags = {
name = var.resource_name
}
}

output "account_id" {
value = data.aws_caller_identity.current.account_id
}

output "resource_aka" {
value = aws_appsync_graphql_api.named_test_resource.arn
}

output "resource_id" {
value = aws_appsync_graphql_api.named_test_resource.id
}

output "resource_name" {
value = var.resource_name
}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
null
[]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
null
[]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
null
[]
Loading

0 comments on commit da25609

Please sign in to comment.