{"id":16260070,"url":"https://github.com/cludden/concourse-steampipe-resource","last_synced_at":"2026-07-23T00:31:55.386Z","repository":{"id":72389462,"uuid":"512592956","full_name":"cludden/concourse-steampipe-resource","owner":"cludden","description":"A Concourse resource for implementing a wide variety of triggers and data integrations via Steampipe and its expansive plugin ecosystem","archived":false,"fork":false,"pushed_at":"2023-05-19T21:41:58.000Z","size":230,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-14T14:43:14.902Z","etag":null,"topics":["concourse","concourse-ci","concourse-resource","concourse-resources","steampipe"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit-0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cludden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-07-11T02:35:51.000Z","updated_at":"2022-09-07T16:25:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"54b6914b-fda6-430f-a7bb-b29fb0e95648","html_url":"https://github.com/cludden/concourse-steampipe-resource","commit_stats":{"total_commits":9,"total_committers":1,"mean_commits":9.0,"dds":0.0,"last_synced_commit":"ec43cb041f606d2e29577c03375a7d14be0c7175"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/cludden/concourse-steampipe-resource","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fconcourse-steampipe-resource","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fconcourse-steampipe-resource/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fconcourse-steampipe-resource/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fconcourse-steampipe-resource/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cludden","download_url":"https://codeload.github.com/cludden/concourse-steampipe-resource/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cludden%2Fconcourse-steampipe-resource/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35783461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["concourse","concourse-ci","concourse-resource","concourse-resources","steampipe"],"created_at":"2024-10-10T16:06:15.643Z","updated_at":"2026-07-23T00:31:55.371Z","avatar_url":"https://github.com/cludden.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# concourse-steampipe-resource\nA [Concourse](https://concourse-ci.org/) resource for implementing a wide variety of triggers and data integrations via [Steampipe](https://steampipe.io/) and its expansive [plugin](https://hub.steampipe.io/plugins) ecosystem.\n\n## Getting Started\n```yaml\nresource_types:\n  # register steampipe resource type\n  - name: steampipe\n    type: registry-image\n    source:\n      repository: ghcr.io/cludden/concourse-steampipe-resource\n\nresources:\n  # configure steampipe resource that emits a version everytime the `foo` autoscaling \n  # group's launch configuration changes\n  - name: aws-asg\n    type: steampipe\n    icon: aws\n    check_every: 10m\n    source:\n      # configure aws connection (https://steampipe.io/docs/managing/connections)\n      config: |\n        connection \"aws\" {\n          plugin  = \"aws\"\n          profile = \"target\"\n          regions = [\"us-east-1\"]\n        }\n      # populate aws shared credentials file to assume role (https://hub.steampipe.io/plugins/turbot/aws#assumerole-credentials-no-mfa)\n      files:\n        /home/steampipe/.aws/credentials: |\n          [base]\n          aws_access_key_id = ((aws.access_key))\n          aws_secret_access_key = ((aws.secret_key))\n          aws_session_token = ((aws.security_token))\n\n          [target]\n          duration_seconds = 900\n          external_id = foo\n          role_arn = arn:aws:iam::012345678910:role/foo\n          role_session_name = concourse-steampipe-resource\n          source_profile = base\n      # define steampipe query to execute\n      query: |\n        select\n          autoscaling_group_arn as arn,\n          launch_configuration_name as launch_config\n        from\n          aws_ec2_autoscaling_group\n        where\n          name = 'foo'\n        limit 1;\n\njobs:\n  - name: handle-launch-config-change\n    plan:\n      # trigger when autoscaling group's launch configuration changes\n      - get: aws-asg\n        trigger: true\n```\n\n## Configuration\n\n**Parameters:**\n| Parameter | Type | Description | Required |\n| :--- | :---: | :--- | :---: |\n| archive | [*archive.Archive](https://pkg.go.dev/github.com/cludden/concourse-go-sdk@v0.3.1/pkg/archive#Config) | optional archive config that can be used to enable [resource version archiving](https://github.com/cludden/concourse-go-sdk#archiving) | |\n| config | `string` | Steampipe configuration | ✓ |\n| debug | `bool` | enable debug logging | |\n| files | `map[string]string` | map of additional files to write prior to invoking steampipe, can be used for configuring plugins that rely on canonical configuration files (e.g. `aws`) | |\n| query | `string` | Steampipe query | ✓ |\n| version_mapping | `string` | an optional [Bloblang mapping](https://www.benthos.dev/docs/guides/bloblang/about) that can be used to customize the versions emitted by the resource; the mapping receives as input a document with a `before` field that contains the previous version (if available), and an `after` field that contains the result of the query (note that this is typically an array of objects) | |\n\n## Behavior\n\n### `check`\nChecks for new versions emitted via steampipe query\n\n### `in`\nWrites the JSON serialized version to the filesystem\n\n**Files:**\n- `version.json`\n\n### `out`\nNot implemented, will error if invoked via `put` step\n\n## Plugins\nThe official image hosted at `ghcr.io/cludden/concourse-steampipe-resource` ships with the following Steampipe plugins installed:\n- `aws`\n- `code`\n- `config`\n- `datadog`\n- `net`\n\nTo customize the installed plugins, build a derivative image.\n\n```dockerfile\nFROM ghcr.io/cludden/concourse-steampipe-resource\n\n# install plugins as steampipe user and remove default configs\nUSER steampipe:0\nRUN steampipe plugin install foo bar baz ...\nRUN rm -rf /home/steampipe/.steampipe/config/*.spc\nUSER root\n```\n\n## Version Mapping\nBy default, the versions emitted by this resource take the shape of the first row returned by the configured query.\n```\n# query\nselect\n  name,\n  image_id\nfrom\n  aws_ec2_ami\norder by\n  creation_date desc\nlimit 1;\n\n# sample version\n{\n  \"image_id\": \"ami-9239492398498459\",\n  \"name\": \"foo\"\n}\n```\n\nThe shape of the emitted version can be lightly customized by tweaking the query definition.\n```\n# query\nselect\n  name,\n  image_id,\n  mapping -\u003e 'Ebs' -\u003e\u003e 'VolumeSize' as volume_size,\n  mapping -\u003e 'Ebs' -\u003e\u003e 'VolumeType' as volume_type,\n  mapping -\u003e 'Ebs' -\u003e\u003e 'Encrypted' as encryption_status,\n  mapping -\u003e 'Ebs' -\u003e\u003e 'KmsKeyId' as kms_key,\n  mapping -\u003e 'Ebs' -\u003e\u003e 'DeleteOnTermination' as delete_on_termination\nfrom\n  aws_ec2_ami\n  cross join jsonb_array_elements(block_device_mappings) as mapping\norder by\n  creation_date desc\nlimit 1;\n\n# sample version\n{\n  \"delete_on_termination\": \"...\",\n  \"encryption_status\": \"...\",\n  \"image_id\": \"...\",\n  \"kms_key\": \"...\",\n  \"name\": \"foo\",\n  \"volume_size\": \"...\",\n  \"volume_type\": \"...\"\n}\n```\n\nHowever, sometimes you'll want to customize this behavior even further. This can be done by configuring the `version_mapping` source parameter which accepts a [Bloblang mapping](https://www.benthos.dev/docs/guides/bloblang/about). This mapping receives as input a document with a `before` field that contains the previous version (if available), and an `after` field that contains the result of the query (note that this is typically an array of objects). In the following example, we define a `query` that returns multiple rows, and a `version_mapping` that filters the rows to those whose name matches the name of the most recent image and then emit a version with a `name` key and an additional key with the ami id for each account/region combination.\n\n```\n# query\nselect\n  account_id,\n  image_id,\n  name,\n  region\nfrom\n  aws_ec2_ami_shared\nwhere\n  name like 'my-ami/%'\norder by\n  creation_date desc\nlimit 10;\n\n# version_mapping\nlet name = after.0.name.not_empty()\nlet images = after.filter(image -\u003e image.name == $name)\nroot = $images.fold({}, image -\u003e image.tally.assign({\n  \"name\": image.value.name,\n  (\"%s_%s\".format(image.value.account_id, image.value.region)): image.value.image_id\n}))\n\n# sample version\n{\n  \"name\": \"my-ami/9b996074-3341-454a-845d-7179eae004f0\",\n  \"012345678901_us-east-1\": \"ami-9239492398498459\",\n  \"012345678901_us-west-2\": \"ami-9348592974792937\"\n}\n```\n\n## License\nLicensed under the [MIT-0 License](LICENSE.md)  \nCopyright (c) 2022 Chris Ludden\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcludden%2Fconcourse-steampipe-resource","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcludden%2Fconcourse-steampipe-resource","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcludden%2Fconcourse-steampipe-resource/lists"}