diff --git a/.github/workflows/steampipe-anywhere.yml b/.github/workflows/steampipe-anywhere.yml new file mode 100644 index 0000000..05092d6 --- /dev/null +++ b/.github/workflows/steampipe-anywhere.yml @@ -0,0 +1,12 @@ +name: Release Steampipe Anywhere Components + +on: + push: + tags: + - 'v*' + + +jobs: + anywhere_publish_workflow: + uses: turbot/steampipe-workflows/.github/workflows/steampipe-anywhere.yml@main + secrets: inherit diff --git a/README.md b/README.md index 825863f..3e4eec4 100644 --- a/README.md +++ b/README.md @@ -30,6 +30,18 @@ from scaleway_account_ssh_key; ``` +## 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/index) | 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/index) | 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/index) | 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: @@ -69,11 +81,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-scaleway/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) - [Scaleway Plugin](https://github.com/turbot/steampipe-plugin-scaleway/labels/help%20wanted) diff --git a/docs/LICENSE b/docs/LICENSE new file mode 100644 index 0000000..236ac28 --- /dev/null +++ b/docs/LICENSE @@ -0,0 +1,402 @@ +Attribution-NonCommercial-NoDerivatives 4.0 International + +======================================================================= + +Creative Commons Corporation ("Creative Commons") is not a law firm and +does not provide legal services or legal advice. Distribution of +Creative Commons public licenses does not create a lawyer-client or +other relationship. Creative Commons makes its licenses and related +information available on an "as-is" basis. Creative Commons gives no +warranties regarding its licenses, any material licensed under their +terms and conditions, or any related information. Creative Commons +disclaims all liability for damages resulting from their use to the +fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and +conditions that creators and other rights holders may use to share +original works of authorship and other material subject to copyright +and certain other rights specified in the public license below. The +following considerations are for informational purposes only, are not +exhaustive, and do not form part of our licenses. + + Considerations for licensors: Our public licenses are + intended for use by those authorized to give the public + permission to use material in ways otherwise restricted by + copyright and certain other rights. Our licenses are + irrevocable. Licensors should read and understand the terms + and conditions of the license they choose before applying it. + Licensors should also secure all rights necessary before + applying our licenses so that the public can reuse the + material as expected. Licensors should clearly mark any + material not subject to the license. This includes other CC- + licensed material, or material used under an exception or + limitation to copyright. More considerations for licensors: + wiki.creativecommons.org/Considerations_for_licensors + + Considerations for the public: By using one of our public + licenses, a licensor grants the public permission to use the + licensed material under specified terms and conditions. If + the licensor's permission is not necessary for any reason--for + example, because of any applicable exception or limitation to + copyright--then that use is not regulated by the license. Our + licenses grant only permissions under copyright and certain + other rights that a licensor has authority to grant. Use of + the licensed material may still be restricted for other + reasons, including because others have copyright or other + rights in the material. A licensor may make special requests, + such as asking that all changes be marked or described. + Although not required by our licenses, you are encouraged to + respect those requests where reasonable. More considerations + for the public: + wiki.creativecommons.org/Considerations_for_licensees + +======================================================================= + +Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 +International Public License + +By exercising the Licensed Rights (defined below), You accept and agree +to be bound by the terms and conditions of this Creative Commons +Attribution-NonCommercial-NoDerivatives 4.0 International Public +License ("Public License"). To the extent this Public License may be +interpreted as a contract, You are granted the Licensed Rights in +consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the +Licensor receives from making the Licensed Material available under +these terms and conditions. + + +Section 1 -- Definitions. + + a. Adapted Material means material subject to Copyright and Similar + Rights that is derived from or based upon the Licensed Material + and in which the Licensed Material is translated, altered, + arranged, transformed, or otherwise modified in a manner requiring + permission under the Copyright and Similar Rights held by the + Licensor. For purposes of this Public License, where the Licensed + Material is a musical work, performance, or sound recording, + Adapted Material is always produced where the Licensed Material is + synched in timed relation with a moving image. + + b. Copyright and Similar Rights means copyright and/or similar rights + closely related to copyright including, without limitation, + performance, broadcast, sound recording, and Sui Generis Database + Rights, without regard to how the rights are labeled or + categorized. For purposes of this Public License, the rights + specified in Section 2(b)(1)-(2) are not Copyright and Similar + Rights. + + c. Effective Technological Measures means those measures that, in the + absence of proper authority, may not be circumvented under laws + fulfilling obligations under Article 11 of the WIPO Copyright + Treaty adopted on December 20, 1996, and/or similar international + agreements. + + d. Exceptions and Limitations means fair use, fair dealing, and/or + any other exception or limitation to Copyright and Similar Rights + that applies to Your use of the Licensed Material. + + e. Licensed Material means the artistic or literary work, database, + or other material to which the Licensor applied this Public + License. + + f. Licensed Rights means the rights granted to You subject to the + terms and conditions of this Public License, which are limited to + all Copyright and Similar Rights that apply to Your use of the + Licensed Material and that the Licensor has authority to license. + + g. Licensor means the individual(s) or entity(ies) granting rights + under this Public License. + + h. NonCommercial means not primarily intended for or directed towards + commercial advantage or monetary compensation. For purposes of + this Public License, the exchange of the Licensed Material for + other material subject to Copyright and Similar Rights by digital + file-sharing or similar means is NonCommercial provided there is + no payment of monetary compensation in connection with the + exchange. + + i. Share means to provide material to the public by any means or + process that requires permission under the Licensed Rights, such + as reproduction, public display, public performance, distribution, + dissemination, communication, or importation, and to make material + available to the public including in ways that members of the + public may access the material from a place and at a time + individually chosen by them. + + j. Sui Generis Database Rights means rights other than copyright + resulting from Directive 96/9/EC of the European Parliament and of + the Council of 11 March 1996 on the legal protection of databases, + as amended and/or succeeded, as well as other essentially + equivalent rights anywhere in the world. + + k. You means the individual or entity exercising the Licensed Rights + under this Public License. Your has a corresponding meaning. + + +Section 2 -- Scope. + + a. License grant. + + 1. Subject to the terms and conditions of this Public License, + the Licensor hereby grants You a worldwide, royalty-free, + non-sublicensable, non-exclusive, irrevocable license to + exercise the Licensed Rights in the Licensed Material to: + + a. reproduce and Share the Licensed Material, in whole or + in part, for NonCommercial purposes only; and + + b. produce and reproduce, but not Share, Adapted Material + for NonCommercial purposes only. + + 2. Exceptions and Limitations. For the avoidance of doubt, where + Exceptions and Limitations apply to Your use, this Public + License does not apply, and You do not need to comply with + its terms and conditions. + + 3. Term. The term of this Public License is specified in Section + 6(a). + + 4. Media and formats; technical modifications allowed. The + Licensor authorizes You to exercise the Licensed Rights in + all media and formats whether now known or hereafter created, + and to make technical modifications necessary to do so. The + Licensor waives and/or agrees not to assert any right or + authority to forbid You from making technical modifications + necessary to exercise the Licensed Rights, including + technical modifications necessary to circumvent Effective + Technological Measures. For purposes of this Public License, + simply making modifications authorized by this Section 2(a) + (4) never produces Adapted Material. + + 5. Downstream recipients. + + a. Offer from the Licensor -- Licensed Material. Every + recipient of the Licensed Material automatically + receives an offer from the Licensor to exercise the + Licensed Rights under the terms and conditions of this + Public License. + + b. No downstream restrictions. You may not offer or impose + any additional or different terms or conditions on, or + apply any Effective Technological Measures to, the + Licensed Material if doing so restricts exercise of the + Licensed Rights by any recipient of the Licensed + Material. + + 6. No endorsement. Nothing in this Public License constitutes or + may be construed as permission to assert or imply that You + are, or that Your use of the Licensed Material is, connected + with, or sponsored, endorsed, or granted official status by, + the Licensor or others designated to receive attribution as + provided in Section 3(a)(1)(A)(i). + + b. Other rights. + + 1. Moral rights, such as the right of integrity, are not + licensed under this Public License, nor are publicity, + privacy, and/or other similar personality rights; however, to + the extent possible, the Licensor waives and/or agrees not to + assert any such rights held by the Licensor to the limited + extent necessary to allow You to exercise the Licensed + Rights, but not otherwise. + + 2. Patent and trademark rights are not licensed under this + Public License. + + 3. To the extent possible, the Licensor waives any right to + collect royalties from You for the exercise of the Licensed + Rights, whether directly or through a collecting society + under any voluntary or waivable statutory or compulsory + licensing scheme. In all other cases the Licensor expressly + reserves any right to collect such royalties, including when + the Licensed Material is used other than for NonCommercial + purposes. + + +Section 3 -- License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the +following conditions. + + a. Attribution. + + 1. If You Share the Licensed Material, You must: + + a. retain the following if it is supplied by the Licensor + with the Licensed Material: + + i. identification of the creator(s) of the Licensed + Material and any others designated to receive + attribution, in any reasonable manner requested by + the Licensor (including by pseudonym if + designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of + warranties; + + v. a URI or hyperlink to the Licensed Material to the + extent reasonably practicable; + + b. indicate if You modified the Licensed Material and + retain an indication of any previous modifications; and + + c. indicate the Licensed Material is licensed under this + Public License, and include the text of, or the URI or + hyperlink to, this Public License. + + For the avoidance of doubt, You do not have permission under + this Public License to Share Adapted Material. + + 2. You may satisfy the conditions in Section 3(a)(1) in any + reasonable manner based on the medium, means, and context in + which You Share the Licensed Material. For example, it may be + reasonable to satisfy the conditions by providing a URI or + hyperlink to a resource that includes the required + information. + + 3. If requested by the Licensor, You must remove any of the + information required by Section 3(a)(1)(A) to the extent + reasonably practicable. + + +Section 4 -- Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that +apply to Your use of the Licensed Material: + + a. for the avoidance of doubt, Section 2(a)(1) grants You the right + to extract, reuse, reproduce, and Share all or a substantial + portion of the contents of the database for NonCommercial purposes + only and provided You do not Share Adapted Material; + + b. if You include all or a substantial portion of the database + contents in a database in which You have Sui Generis Database + Rights, then the database in which You have Sui Generis Database + Rights (but not its individual contents) is Adapted Material; and + + c. You must comply with the conditions in Section 3(a) if You Share + all or a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not +replace Your obligations under this Public License where the Licensed +Rights include other Copyright and Similar Rights. + + +Section 5 -- Disclaimer of Warranties and Limitation of Liability. + + a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE + EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS + AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF + ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, + IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, + WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR + PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, + ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT + KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT + ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. + + b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE + TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, + NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, + INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, + COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR + USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN + ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR + DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR + IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. + + c. The disclaimer of warranties and limitation of liability provided + above shall be interpreted in a manner that, to the extent + possible, most closely approximates an absolute disclaimer and + waiver of all liability. + + +Section 6 -- Term and Termination. + + a. This Public License applies for the term of the Copyright and + Similar Rights licensed here. However, if You fail to comply with + this Public License, then Your rights under this Public License + terminate automatically. + + b. Where Your right to use the Licensed Material has terminated under + Section 6(a), it reinstates: + + 1. automatically as of the date the violation is cured, provided + it is cured within 30 days of Your discovery of the + violation; or + + 2. upon express reinstatement by the Licensor. + + For the avoidance of doubt, this Section 6(b) does not affect any + right the Licensor may have to seek remedies for Your violations + of this Public License. + + c. For the avoidance of doubt, the Licensor may also offer the + Licensed Material under separate terms or conditions or stop + distributing the Licensed Material at any time; however, doing so + will not terminate this Public License. + + d. Sections 1, 5, 6, 7, and 8 survive termination of this Public + License. + + +Section 7 -- Other Terms and Conditions. + + a. The Licensor shall not be bound by any additional or different + terms or conditions communicated by You unless expressly agreed. + + b. Any arrangements, understandings, or agreements regarding the + Licensed Material not stated herein are separate from and + independent of the terms and conditions of this Public License. + + +Section 8 -- Interpretation. + + a. For the avoidance of doubt, this Public License does not, and + shall not be interpreted to, reduce, limit, restrict, or impose + conditions on any use of the Licensed Material that could lawfully + be made without permission under this Public License. + + b. To the extent possible, if any provision of this Public License is + deemed unenforceable, it shall be automatically reformed to the + minimum extent necessary to make it enforceable. If the provision + cannot be reformed, it shall be severed from this Public License + without affecting the enforceability of the remaining terms and + conditions. + + c. No term or condition of this Public License will be waived and no + failure to comply consented to unless expressly agreed to by the + Licensor. + + d. Nothing in this Public License constitutes or may be interpreted + as a limitation upon, or waiver of, any privileges and immunities + that apply to the Licensor or You, including from the legal + processes of any jurisdiction or authority. + +======================================================================= + +Creative Commons is not a party to its public +licenses. Notwithstanding, Creative Commons may elect to apply one of +its public licenses to material it publishes and in those instances +will be considered the “Licensor.” The text of the Creative Commons +public licenses is dedicated to the public domain under the CC0 Public +Domain Dedication. Except for the limited purpose of indicating that +material is shared under a Creative Commons public license or as +otherwise permitted by the Creative Commons policies published at +creativecommons.org/policies, Creative Commons does not authorize the +use of the trademark "Creative Commons" or any other trademark or logo +of Creative Commons without its prior written consent including, +without limitation, in connection with any unauthorized modifications +to any of its public licenses or any other arrangements, +understandings, or agreements concerning use of licensed material. For +the avoidance of doubt, this paragraph does not form part of the +public licenses. + +Creative Commons may be contacted at creativecommons.org. \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index c09733f..b9a9c91 100644 --- a/docs/index.md +++ b/docs/index.md @@ -8,13 +8,14 @@ short_name: "scaleway" description: "Steampipe plugin to query servers, networks, databases and more from your Scaleway project." og_description: "Query Scaleway with SQL! Open source CLI. No DB required." og_image: "/images/plugins/turbot/scaleway-social-graphic.png" +engines: ["steampipe", "sqlite", "postgres", "export"] --- # Scaleway + Steampipe [Scaleway](https://www.scaleway.com) is a cloud platform, offering BareMetal and Virtual SSD Cloud Servers for any workload. -[Steampipe](https://steampipe.io) is an open source CLI to instantly query cloud APIs using SQL. +[Steampipe](https://steampipe.io) is an open-source zero-ETL engine to instantly query cloud APIs using SQL. List VPC private networks in your Scaleway project: @@ -147,11 +148,6 @@ connection "scaleway_all" { } ``` -## Get involved - -- Open source: https://github.com/turbot/steampipe-plugin-scaleway -- Community: [Join #steampipe on Slack →](https://turbot.com/community/join) - ## Multi-Region Connections You may also specify one or more regions with the `regions` argument: diff --git a/docs/tables/scaleway_account_ssh_key.md b/docs/tables/scaleway_account_ssh_key.md index 402fbcb..4e60120 100644 --- a/docs/tables/scaleway_account_ssh_key.md +++ b/docs/tables/scaleway_account_ssh_key.md @@ -1,12 +1,32 @@ -# Table: scaleway_account_ssh_key +--- +title: "Steampipe Table: scaleway_account_ssh_key - Query Scaleway Account SSH Keys using SQL" +description: "Allows users to query Scaleway Account SSH Keys, specifically the details of each SSH key associated with the account, providing insights into key management and security." +--- -SSH keys allow you to securely connect to your compute instances without using a password. +# Table: scaleway_account_ssh_key - Query Scaleway Account SSH Keys using SQL + +Scaleway is a cloud computing company that provides a range of scalable computing resources, including bare metal servers, development platforms, and storage options. Among these resources, Scaleway Account SSH Keys are used to ensure secure shell access to instances. These keys are critical for maintaining the security and integrity of user data and operations within the Scaleway environment. + +## Table Usage Guide + +The `scaleway_account_ssh_key` table provides insights into the SSH keys associated with a Scaleway account. As a DevOps engineer, explore key-specific details through this table, including key fingerprints, creation dates, and associated metadata. Utilize it to uncover information about keys, such as their usage across instances, their creation and modification history, and the overall security posture of your Scaleway account. ## Examples ### Basic info +Explore the creation dates and unique identifiers of your Scaleway account's SSH keys. This allows you to manage and track the keys more effectively. -```sql +```sql+postgres +select + name, + id, + created_at, + fingerprint +from + scaleway_account_ssh_key; +``` + +```sql+sqlite select name, id, @@ -17,8 +37,9 @@ from ``` ### List SSH keys older than 90 days +Discover the SSH keys that have been in use for more than 90 days. This is useful in understanding potential security risks associated with outdated keys and aids in maintaining optimal security practices. -```sql +```sql+postgres select name, id, @@ -30,3 +51,16 @@ from where extract(day from current_timestamp - created_at) > 90; ``` + +```sql+sqlite +select + name, + id, + created_at, + fingerprint, + cast((julianday('now') - julianday(created_at)) as integer) as age +from + scaleway_account_ssh_key +where + cast((julianday('now') - julianday(created_at)) as integer) > 90; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_baremetal_server.md b/docs/tables/scaleway_baremetal_server.md index de7c470..f67e1e7 100644 --- a/docs/tables/scaleway_baremetal_server.md +++ b/docs/tables/scaleway_baremetal_server.md @@ -1,12 +1,36 @@ -# Table: scaleway_baremetal_server +--- +title: "Steampipe Table: scaleway_baremetal_server - Query Scaleway Baremetal Servers using SQL" +description: "Allows users to query Scaleway Baremetal Servers, specifically providing information about the server's status, location, and configuration." +--- -A bare metal provides a dedicated server to run your applications on. +# Table: scaleway_baremetal_server - Query Scaleway Baremetal Servers using SQL + +A Scaleway Baremetal Server is a physical server provided by Scaleway, a cloud computing company. These servers offer high-performance capabilities and full control over the hardware, making them ideal for compute-intensive workloads. They can be customized according to the user's needs, with a variety of CPUs, memory, and storage options available. + +## Table Usage Guide + +The `scaleway_baremetal_server` table offers insights into the Baremetal Servers within Scaleway. As a system administrator, you can explore server-specific details through this table, including server status, location, and configuration. Use this table to monitor the performance and health of your servers, verify their configurations, and ensure they are optimally located for their intended workloads. ## Examples ### Basic info +Explore the status and timeline of your Scaleway baremetal servers across different projects and organizations. This aids in understanding the distribution and upkeep of your servers, assisting in resource management and operational efficiency. -```sql +```sql+postgres +select + name, + id, + status, + updated_at, + created_date, + zone, + project, + organization +from + scaleway_baremetal_server; +``` + +```sql+sqlite select name, id, @@ -21,8 +45,9 @@ from ``` ### List stopped bare metal servers +Discover the segments that include inactive bare metal servers across various zones, projects, and organizations. This can be useful for assessing resource utilization and identifying potential areas for cost savings. -```sql +```sql+postgres select name, id, @@ -36,9 +61,24 @@ where status = 'stopped'; ``` +```sql+sqlite +select + name, + id, + status, + zone, + project, + organization +from + scaleway_baremetal_server +where + status = 'stopped'; +``` + ### List bare metal servers older than 90 days +Determine the areas in which bare metal servers have been running for over 90 days. This is useful for assessing long-term usage and identifying potential areas for resource optimization. -```sql +```sql+postgres select name, id, @@ -53,3 +93,19 @@ where state = 'running' and extract(day from current_timestamp - created_date) > 90; ``` + +```sql+sqlite +select + name, + id, + status, + julianday('now') - julianday(created_date) as age, + zone, + project, + organization +from + scaleway_baremetal_server +where + state = 'running' + and julianday('now') - julianday(created_date) > 90; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_iam_api_key.md b/docs/tables/scaleway_iam_api_key.md index 806343d..66daf6e 100644 --- a/docs/tables/scaleway_iam_api_key.md +++ b/docs/tables/scaleway_iam_api_key.md @@ -1,14 +1,36 @@ -# Table: scaleway_iam_api_key +--- +title: "Steampipe Table: scaleway_iam_api_key - Query Scaleway IAM API Keys using SQL" +description: "Allows users to query Scaleway IAM API Keys, specifically providing details about each key, including ID, state, creation and expiration dates, and associated user information." +--- -API keys allow you to securely connect to scaleway console in your organization. +# Table: scaleway_iam_api_key - Query Scaleway IAM API Keys using SQL -This table requires the `organization_id` config argument to be set. +Scaleway IAM API Keys are unique identifiers associated with a Scaleway account. These keys are used to authenticate and authorize actions in the Scaleway API. They can be created, deleted, and managed through the Scaleway console or API. + +## Table Usage Guide + +The `scaleway_iam_api_key` table provides insights into IAM API keys within Scaleway Identity and Access Management (IAM). As a security analyst, explore key-specific details through this table, including key states, creation and expiration dates, and associated user information. Utilize it to monitor and manage the lifecycle of API keys, ensuring they are rotated regularly and expired keys are deleted, enhancing the security posture of your Scaleway environment. + +**Important Notes** +- This table requires the `organization_id` config argument to be set. ## Examples ### Basic info +Explore which Scaleway IAM API keys have been created, when they were made, and their expiration dates. This allows for efficient management of API keys, ensuring none are expired or unused. -```sql +```sql+postgres +select + access_key, + created_at, + user_id, + expires_at, + default_project_id +from + scaleway_iam_api_key +``` + +```sql+sqlite select access_key, created_at, @@ -20,8 +42,9 @@ from ``` ### List API keys older than 90 days +Determine the areas in which API keys are older than 90 days to manage and update them as necessary. This helps in maintaining security and ensuring all keys are up-to-date. -```sql +```sql+postgres select access_key, created_at, @@ -34,3 +57,17 @@ from where extract(day from current_timestamp - created_at) > 90; ``` + +```sql+sqlite +select + access_key, + created_at, + user_id, + expires_at, + default_project_id, + julianday('now') - julianday(created_at) as age +from + scaleway_iam_api_key +where + julianday('now') - julianday(created_at) > 90; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_iam_user.md b/docs/tables/scaleway_iam_user.md index bdd7279..5581c39 100644 --- a/docs/tables/scaleway_iam_user.md +++ b/docs/tables/scaleway_iam_user.md @@ -1,14 +1,37 @@ -# Table: scaleway_iam_user +--- +title: "Steampipe Table: scaleway_iam_user - Query Scaleway IAM Users using SQL" +description: "Allows users to query Scaleway Identity and Access Management (IAM) Users, providing insights into user permissions, roles, and associated metadata." +--- -Users allow you to connect to scaleway console in your organization. +# Table: scaleway_iam_user - Query Scaleway IAM Users using SQL -This table requires the `organization_id` config argument to be set. +Scaleway Identity and Access Management (IAM) is a service within Scaleway that helps manage access to Scaleway resources. It allows you to control who is authenticated and authorized to use resources. IAM makes it easy to manage users, security credentials, and permissions to access resources. + +## Table Usage Guide + +The `scaleway_iam_user` table provides insights into IAM users within Scaleway Identity and Access Management (IAM). As a DevOps engineer, explore user-specific details through this table, including permissions, roles, and associated metadata. Utilize it to uncover information about users, such as those with specific permissions, the roles assigned to each user, and the verification of user credentials. + +**Important Notes** +- This table requires the `organization_id` config argument to be set. ## Examples ### Basic info +Explore the user profiles in your Scaleway IAM to understand their status and security settings. This can help identify if any users have an outdated login or if two-factor authentication is enabled, assisting in maintaining account security. + +```sql+postgres +select + email, + created_at, + last_login_at, + id, + status, + two_factor_enabled +from + scaleway_iam_user +``` -```sql +```sql+sqlite select email, created_at, @@ -21,8 +44,20 @@ from ``` ### List all the users for whom MFA is not enabled +Explore which users have not activated Multi-Factor Authentication (MFA) to identify potential security risks and enhance user account protection measures. -```sql +```sql+postgres +select + email, + id, + two_factor_enabled +from + scaleway_iam_user +where + not two_factor_enabled; +``` + +```sql+sqlite select email, id, @@ -34,8 +69,20 @@ where ``` ### List all the users not actived +Discover the segments that comprise users with an unknown status in the Scaleway IAM service. This allows you to pinpoint specific instances where user status may need investigation or clarification, enhancing your overall user management process. -```sql +```sql+postgres +select + email, + id, + status +from + scaleway_iam_user +where + status = 'unknown_status'; +``` + +```sql+sqlite select email, id, @@ -47,8 +94,9 @@ where ``` ### List all the users never connected +Identify users who have never logged in to your system, which can help in assessing inactive accounts and potentially freeing up resources. -```sql +```sql+postgres select email, id, @@ -57,3 +105,15 @@ from scaleway_iam_user where last_login_at is null; + + +```sql+sqlite +select + email, + id, + last_login_at +from + scaleway_iam_user +where + last_login_at is null; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_instance_image.md b/docs/tables/scaleway_instance_image.md index 73bfc66..1cd417b 100644 --- a/docs/tables/scaleway_instance_image.md +++ b/docs/tables/scaleway_instance_image.md @@ -1,12 +1,35 @@ -# Table: scaleway_instance_image +--- +title: "Steampipe Table: scaleway_instance_image - Query Scaleway Instance Images using SQL" +description: "Allows users to query Scaleway Instance Images, providing detailed information about each image available for use with Scaleway's Instances." +--- -Images are backups of your instances. You can reuse that image to restore your data or create a series of instances with a predefined configuration. +# Table: scaleway_instance_image - Query Scaleway Instance Images using SQL + +Scaleway Instance Images are pre-configured operating system environments that can be used as a base to create new instances in Scaleway's cloud computing service. These images include a variety of Linux distributions, developer tools, and container technologies. They allow users to quickly launch and scale applications in the cloud. + +## Table Usage Guide + +The `scaleway_instance_image` table provides insights into Instance Images within Scaleway's cloud computing service. As a cloud architect or developer, explore image-specific details through this table, including their IDs, names, and the architectures they support. Utilize it to uncover information about images, such as their creation dates, modification dates, and the public visibility status. ## Examples ### Basic info +Explore the details of your Scaleway instances, such as their names, IDs, states, creation dates, and associated projects and organizations. This helps you to effectively manage and monitor your Scaleway resources. + +```sql+postgres +select + name, + id, + state, + creation_date, + zone, + project, + organization +from + scaleway_instance_image; +``` -```sql +```sql+sqlite select name, id, @@ -20,8 +43,9 @@ from ``` ### List custom (user-defined) images +Discover the segments that are utilizing custom images in your cloud infrastructure. This can assist in identifying areas for optimization and potential security risks. -```sql +```sql+postgres select name, id, @@ -36,9 +60,25 @@ where not public; ``` +```sql+sqlite +select + name, + id, + state, + creation_date, + zone, + project, + organization +from + scaleway_instance_image +where + public = 0; +``` + ### List images older than 90 days +Determine the areas in which images from Scaleway instances have been stored for more than 90 days. This can be useful in identifying outdated or potentially unnecessary data, enabling more efficient resource management and cost savings. -```sql +```sql+postgres select name, id, @@ -52,3 +92,18 @@ from where extract(day from current_timestamp - creation_date) > 90; ``` + +```sql+sqlite +select + name, + id, + state, + julianday('now') - julianday(creation_date) as age, + zone, + project, + organization +from + scaleway_instance_image +where + julianday('now') - julianday(creation_date) > 90; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_instance_ip.md b/docs/tables/scaleway_instance_ip.md index 314a7d1..6027ab4 100644 --- a/docs/tables/scaleway_instance_ip.md +++ b/docs/tables/scaleway_instance_ip.md @@ -1,12 +1,32 @@ -# Table: scaleway_instance_ip +--- +title: "Steampipe Table: scaleway_instance_ip - Query Scaleway Instance IPs using SQL" +description: "Allows users to query Instance IPs in Scaleway, specifically to obtain details about public and private IP addresses associated with instances, providing insights into network configurations and potential anomalies." +--- -A flexible IP address is an IP address which you hold independently of any server. You can attach it to any of your servers and do live migration of the IP address between your servers. +# Table: scaleway_instance_ip - Query Scaleway Instance IPs using SQL + +Scaleway Instance IP is a resource within Scaleway that allows you to manage and configure IP addresses associated with your instances. It provides a centralized way to set up and manage IP addresses for various Scaleway resources, including Bare Metal servers, Development Instances, and more. Scaleway Instance IP helps you stay informed about the network configurations of your Scaleway resources, and take appropriate actions when necessary. + +## Table Usage Guide + +The `scaleway_instance_ip` table provides insights into IP addresses associated with instances within Scaleway. As a network administrator, explore IP-specific details through this table, including server IDs, public and private IP addresses, and associated metadata. Utilize it to uncover information about network configurations, such as those with specific server IDs, the relationships between servers and IP addresses, and the verification of IP status. ## Examples ### Basic info +Explore which instances in your Scaleway project are associated with specific IP addresses, to better manage your resources and ensure optimal project performance. This could be particularly useful for identifying potential bottlenecks or understanding the distribution of your resources. + +```sql+postgres +select + id, + address, + zone, + project +from + scaleway_instance_ip; +``` -```sql +```sql+sqlite select id, address, @@ -17,8 +37,9 @@ from ``` ### List unused instance IPs +Discover the segments that contain unused IP addresses within your Scaleway instances. This can be useful for optimizing resource usage and reducing unnecessary costs. -```sql +```sql+postgres select id, address, @@ -30,3 +51,16 @@ where server is null and reverse is null; ``` + +```sql+sqlite +select + id, + address, + zone, + project +from + scaleway_instance_ip +where + server is null + and reverse is null; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_instance_security_group.md b/docs/tables/scaleway_instance_security_group.md index 66d0b48..c354f35 100644 --- a/docs/tables/scaleway_instance_security_group.md +++ b/docs/tables/scaleway_instance_security_group.md @@ -1,12 +1,34 @@ -# Table: scaleway_instance_security_group +--- +title: "Steampipe Table: scaleway_instance_security_group - Query Scaleway Instance Security Groups using SQL" +description: "Allows users to query Scaleway Instance Security Groups, providing insights into the configuration, state, and rules associated with each security group." +--- -A security group is a set of firewall rules on a set of instances. Security groups enable to create rules that either drop or allow incoming traffic from certain ports of your instances. +# Table: scaleway_instance_security_group - Query Scaleway Instance Security Groups using SQL + +A Scaleway Instance Security Group is a virtual firewall that controls inbound and outbound traffic for one or more instances. It acts as a barrier between an instance and the rest of the network, allowing only traffic that matches the defined rules. These security groups are stateful, meaning that any outbound traffic that is permitted will automatically allow the corresponding inbound traffic. + +## Table Usage Guide + +The `scaleway_instance_security_group` table provides insights into the security groups within Scaleway Instance. As a security analyst, explore security group-specific details through this table, including their configuration, state, and associated rules. Utilize it to uncover information about security groups, such as those with overly permissive rules, the state of each security group, and the verification of inbound and outbound rules. ## Examples ### Basic info +Explore which security groups were created on a specific date within your Scaleway instance. This can help you identify instances where changes were made to the default project or specific zones, aiding in configuration review and management. -```sql +```sql+postgres +select + name, + id, + creation_date, + project_default, + zone, + project +from + scaleway_instance_security_group; +``` + +```sql+sqlite select name, id, @@ -19,8 +41,9 @@ from ``` ### List default security groups +Explore which security groups are set as the default in your project to ensure correct configurations and prevent potential security risks. This can be particularly useful in managing access controls and maintaining secure project environments. -```sql +```sql+postgres select name, id, @@ -33,3 +56,17 @@ from where project_default; ``` + +```sql+sqlite +select + name, + id, + creation_date, + project_default, + zone, + project +from + scaleway_instance_security_group +where + project_default = 1; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_instance_server.md b/docs/tables/scaleway_instance_server.md index eb4d02b..4067dd3 100644 --- a/docs/tables/scaleway_instance_server.md +++ b/docs/tables/scaleway_instance_server.md @@ -1,12 +1,35 @@ -# Table: scaleway_instance_server +--- +title: "Steampipe Table: scaleway_instance_server - Query Scaleway Instances using SQL" +description: "Allows users to query Scaleway Instances, specifically the server details, providing insights into server configurations, statuses, and other related information." +--- -An instance, either virtual or physical, provides resources to run your applications on. +# Table: scaleway_instance_server - Query Scaleway Instances using SQL + +Scaleway Instances is a service offered by Scaleway that allows you to deploy virtual instances in seconds. These instances are scalable, powerful, and reliable cloud servers designed for developers. They are equipped with SSD disks, high-end Intel CPUs, and come with a variety of OS and Apps. + +## Table Usage Guide + +The `scaleway_instance_server` table provides insights into the instances within Scaleway. As a system administrator or a developer, explore server-specific details through this table, including server configurations, statuses, and other related information. Utilize it to uncover information about servers, such as their commercial type, creation date, dynamic IP required status, and more. ## Examples ### Basic info +Explore which Scaleway servers are currently active, when they were created, and where they are located. This is useful for gaining insights into resource allocation and server management across different projects and organizations. + +```sql+postgres +select + name, + id, + state, + creation_date, + zone, + project, + organization +from + scaleway_instance_server; +``` -```sql +```sql+sqlite select name, id, @@ -20,8 +43,9 @@ from ``` ### List stopped instance servers +Identify instances where Scaleway servers are in a 'stopped' state. This is useful to manage resources and maintain operational efficiency by pinpointing idle servers. -```sql +```sql+postgres select name, id, @@ -35,9 +59,24 @@ where state = 'stopped'; ``` +```sql+sqlite +select + name, + id, + state, + zone, + project, + organization +from + scaleway_instance_server +where + state = 'stopped'; +``` + ### List instance servers older than 90 days +Determine the areas in which instance servers have been running for more than 90 days. This is useful for identifying potential areas for resource optimization and cost-saving by assessing long-running servers. -```sql +```sql+postgres select name, id, @@ -52,3 +91,19 @@ where state = 'running' and extract(day from current_timestamp - creation_date) > 90; ``` + +```sql+sqlite +select + name, + id, + state, + julianday('now') - julianday(creation_date) as age, + zone, + project, + organization +from + scaleway_instance_server +where + state = 'running' + and julianday('now') - julianday(creation_date) > 90; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_instance_snapshot.md b/docs/tables/scaleway_instance_snapshot.md index b2e5749..7b1974a 100644 --- a/docs/tables/scaleway_instance_snapshot.md +++ b/docs/tables/scaleway_instance_snapshot.md @@ -1,12 +1,34 @@ -# Table: scaleway_instance_snapshot +--- +title: "Steampipe Table: scaleway_instance_snapshot - Query Scaleway Instance Snapshots using SQL" +description: "Allows users to query Scaleway Instance Snapshots, primarily revealing details about the snapshot's state, size, creation date, and associated instance." +--- -Snapshots contain the data of a specific volume at a particular point in time. The data can include the instance's operating system, configuration information or files stored on the volume. +# Table: scaleway_instance_snapshot - Query Scaleway Instance Snapshots using SQL + +Scaleway Instance Snapshots are a resource within Scaleway's cloud services that allow users to create a point-in-time copy of their instances. This is particularly useful for creating backups, migrating data, or testing changes without affecting the original instance. These snapshots contain all the information necessary to restore your instance (system settings, applications, and data) from the moment the snapshot was taken. + +## Table Usage Guide + +The `scaleway_instance_snapshot` table provides insights into Instance Snapshots within Scaleway's cloud services. As a system administrator or DevOps engineer, explore snapshot-specific details through this table, including snapshot state, size, creation date, and the associated instance. Utilize it to manage and understand your instance backups, verify snapshot details, and ensure the integrity and safety of your data. ## Examples ### Basic info +Explore which Scaleway instance snapshots are currently active, by assessing their state and size. This can help manage resources and plan projects more efficiently. -```sql +```sql+postgres +select + name, + id, + state, + size, + zone, + project +from + scaleway_instance_snapshot; +``` + +```sql+sqlite select name, id, @@ -19,8 +41,9 @@ from ``` ### List snapshots older than 90 days +Assess the elements within your Scaleway instances by identifying snapshots that have been stored for more than 90 days. This can be useful for managing storage and ensuring efficient use of resources. -```sql +```sql+postgres select name, id, @@ -35,9 +58,25 @@ where extract(day from current_timestamp - creation_date) > 90; ``` +```sql+sqlite +select + name, + id, + state, + julianday('now') - julianday(creation_date) as age, + size, + zone, + project +from + scaleway_instance_snapshot +where + julianday('now') - julianday(creation_date) > 90; +``` + ### List large snapshots (> 100GB or 100000000000 Bytes) +Discover the segments that contain large snapshots, specifically those exceeding 100GB. This can be beneficial in managing storage space and optimizing resource allocation within your project. -```sql +```sql+postgres select name, id, @@ -50,3 +89,17 @@ from where size > 100000000000; ``` + +```sql+sqlite +select + name, + id, + state, + size, + zone, + project +from + scaleway_instance_snapshot +where + size > 100000000000; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_instance_volume.md b/docs/tables/scaleway_instance_volume.md index d7f2213..bd102ac 100644 --- a/docs/tables/scaleway_instance_volume.md +++ b/docs/tables/scaleway_instance_volume.md @@ -1,12 +1,35 @@ -# Table: scaleway_instance_volume +--- +title: "Steampipe Table: scaleway_instance_volume - Query Scaleway Instance Volumes using SQL" +description: "Allows users to query Scaleway Instance Volumes, providing detailed insights into the storage capabilities and configurations of Scaleway instances." +--- -A volume is where you store your data inside your instance. It appears as a block device on Linux that you can use to create a filesystem and mount it. +# Table: scaleway_instance_volume - Query Scaleway Instance Volumes using SQL + +Scaleway Instance Volumes are block storage devices that you can attach to your Scaleway Instances. They offer reliable, scalable, and high-performance storage for your cloud servers. Instance Volumes can be used for primary storage of data, to provide additional storage capacity, or to increase I/O performance. + +## Table Usage Guide + +The `scaleway_instance_volume` table provides insights into the storage capabilities and configurations of Scaleway instances. As a system administrator or DevOps engineer, you can explore volume-specific details through this table, including size, type, and state. Utilize it to monitor storage usage, verify configurations, and ensure optimal storage performance for your Scaleway instances. ## Examples ### Basic info +Explore which instances are active within your Scaleway project, along with their respective sizes and types. This can help you manage resources and identify areas for potential optimization or scaling. + +```sql+postgres +select + name, + id, + state, + size, + volume_type, + zone, + project +from + scaleway_instance_volume; +``` -```sql +```sql+sqlite select name, id, @@ -20,8 +43,19 @@ from ``` ### Count of volumes by volume type +Analyze the distribution of volume types in your Scaleway instance to better understand your storage utilization. This could potentially help optimize storage resources by identifying which volume types are most commonly used. -```sql +```sql+postgres +select + volume_type, + count(id) +from + scaleway_instance_volume +group by + volume_type; +``` + +```sql+sqlite select volume_type, count(id) @@ -32,8 +66,19 @@ group by ``` ### List unattached volumes +Discover the segments that consist of unused storage volumes within your Scaleway instances. This can aid in optimizing storage utilization and reducing unnecessary costs. + +```sql+postgres +select + id, + volume_type +from + scaleway_instance_volume +where + server is null; +``` -```sql +```sql+sqlite select id, volume_type @@ -44,8 +89,24 @@ where ``` ### List volumes with size more than 10 GB (10000000000 Bytes) +Identify instances where your Scaleway volumes exceed 10 GB to help manage your storage resources more effectively. + +```sql+postgres +select + name, + id, + state, + size, + volume_type, + zone, + project +from + scaleway_instance_volume +where + size > 10000000000; +``` -```sql +```sql+sqlite select name, id, @@ -61,8 +122,9 @@ where ``` ### Find volumes attached to stopped instance servers +Determine the areas in which storage volumes are attached to servers that are not currently active. This is useful for optimizing resource usage and managing costs, as unused volumes may be unnecessarily incurring charges. -```sql +```sql+postgres select v.name, v.id, @@ -77,3 +139,19 @@ from where s.id = v.server ->> 'id'; ``` + +```sql+sqlite +select + v.name, + v.id, + v.state, + v.volume_type, + s.name as server_name, + v.zone, + v.project +from + scaleway_instance_volume as v, + scaleway_instance_server as s +where + s.id = json_extract(v.server, '$.id'); +``` \ No newline at end of file diff --git a/docs/tables/scaleway_kubernetes_cluster.md b/docs/tables/scaleway_kubernetes_cluster.md index dedac58..78eb5f7 100644 --- a/docs/tables/scaleway_kubernetes_cluster.md +++ b/docs/tables/scaleway_kubernetes_cluster.md @@ -1,12 +1,35 @@ -# Table: scaleway_kubernetes_cluster +--- +title: "Steampipe Table: scaleway_kubernetes_cluster - Query Scaleway Kubernetes Clusters using SQL" +description: "Allows users to query Scaleway Kubernetes Clusters, specifically providing information about the clusters' configuration, status, and metadata." +--- -A Scaleway Kubernetes is a public cloud managed Kubernetes available in Scaleway. +# Table: scaleway_kubernetes_cluster - Query Scaleway Kubernetes Clusters using SQL + +A Scaleway Kubernetes Cluster is a managed service in the Scaleway ecosystem that allows users to deploy, manage, and scale containerized applications using Kubernetes, an open-source container orchestration platform. It provides a highly available and scalable infrastructure for deploying and running applications and services. The clusters can be customized according to the user's requirements, including the choice of the Kubernetes version, the size and type of worker nodes, and the geographical location of the cluster. + +## Table Usage Guide + +The `scaleway_kubernetes_cluster` table provides insights into Kubernetes Clusters within Scaleway. As a DevOps engineer, explore cluster-specific details through this table, including version, status, and associated metadata. Utilize it to uncover information about clusters, such as their configuration, the geographical location, and the current status of the clusters. ## Examples ### Basic info +Explore which Kubernetes clusters are currently active within your Scaleway account. This can help you understand the status and version of each cluster, which is useful for maintenance and upgrade planning. + +```sql+postgres +select + name, + description, + type, + cluster_url, + id, + status, + version +from + scaleway_kubernetes_cluster; +``` -```sql +```sql+sqlite select name, description, @@ -20,8 +43,23 @@ from ``` ### List Kapsule clusters +Discover the segments that are utilizing Kapsule clusters within your Scaleway Kubernetes environment. This query is beneficial for gaining insights into the operational status and details of these specific clusters. -```sql +```sql+postgres +select + name, + description, + type, + cluster_url, + id, + status +from + scaleway_kubernetes_cluster +where + type = 'kapsule'; +``` + +```sql+sqlite select name, description, @@ -36,8 +74,23 @@ where ``` ### List Kosmos clusters +Determine the areas in which multicloud Kosmos clusters are being used. This query can be useful to understand the spread and utilization of multicloud resources, providing valuable insight for resource management and planning. -```sql +```sql+postgres +select + name, + description, + type, + cluster_url, + id, + status +from + scaleway_kubernetes_cluster +where + type = 'multicloud'; +``` + +```sql+sqlite select name, description, @@ -52,8 +105,23 @@ where ``` ### List clusters with Kubernetes version inferior to 1.24 +Identify any clusters operating on a Kubernetes version less than 1.24. This is useful for pinpointing clusters that may need to be updated to maintain compatibility and security standards. -```sql +```sql+postgres +select + name, + description, + type, + cluster_url, + id, + status +from + scaleway_kubernetes_cluster +where + version < '1.24'; +``` + +```sql+sqlite select name, description, @@ -68,8 +136,9 @@ where ``` ### List clusters with upgrades available +Discover the segments that have upgrades available in your Kubernetes clusters on Scaleway. This can help in maintaining up-to-date environments, improving security and performance. -```sql +```sql+postgres select name, type, @@ -83,9 +152,24 @@ where upgrade_available is true; ``` +```sql+sqlite +select + name, + type, + id, + version, + auto_upgrade, + upgrade_available +from + scaleway_kubernetes_cluster +where + upgrade_available = 1; +``` + ### List clusters with auto-upgrade enabled +Determine the areas in which clusters have the auto-upgrade feature enabled to ensure that they are always running the latest version and are not vulnerable to outdated software issues. -```sql +```sql+postgres select name, type, @@ -98,3 +182,17 @@ from where auto_upgrade @> '{"enabled":true}'; ``` + +```sql+sqlite +select + name, + type, + id, + version, + auto_upgrade, + upgrade_available +from + scaleway_kubernetes_cluster +where + json_extract(auto_upgrade, '$.enabled') = 1; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_kubernetes_node.md b/docs/tables/scaleway_kubernetes_node.md index 1788c6d..63eaf01 100644 --- a/docs/tables/scaleway_kubernetes_node.md +++ b/docs/tables/scaleway_kubernetes_node.md @@ -1,12 +1,33 @@ -# Table: scaleway_kubernetes_node +--- +title: "Steampipe Table: scaleway_kubernetes_node - Query Scaleway Kubernetes Nodes using SQL" +description: "Allows users to query Scaleway Kubernetes Nodes, providing insights into the node details, including their status, versions, and associated metadata." +--- -A Scaleway Kubernetes node may be a virtual or physical machine, depending on the cluster. Each node is managed by the control plane and contains the services necessary to run Pods. +# Table: scaleway_kubernetes_node - Query Scaleway Kubernetes Nodes using SQL + +Scaleway Kubernetes Nodes are the worker machines in a Kubernetes cluster that run containerized applications. Each node contains the necessary services to run Pods (the smallest and simplest unit in the Kubernetes object model that you create or deploy), including the container runtime, kubelet, and the kube-proxy. Nodes can be a virtual or physical machine, depending on the cluster. + +## Table Usage Guide + +The `scaleway_kubernetes_node` table provides insights into Kubernetes Nodes within Scaleway. As a DevOps engineer, explore node-specific details through this table, including status, versions, and associated metadata. Utilize it to uncover information about nodes, such as their health status, the Kubernetes version they are running, and their associated roles and labels. ## Examples ### Basic info +Analyze the status and creation date of your Scaleway Kubernetes nodes to understand their current operational state and longevity. This can be useful in assessing the overall health and maintenance needs of your Kubernetes infrastructure. + +```sql+postgres +select + name, + cluster_id, + id, + status, + created_at +from + scaleway_kubernetes_node; +``` -```sql +```sql+sqlite select name, cluster_id, @@ -18,8 +39,23 @@ from ``` ### List kubernetes nodes where status is not ready +Identify Kubernetes nodes that are not in a 'ready' status. This query is useful in pinpointing potential issues within your Kubernetes cluster that may need attention or troubleshooting. + +```sql+postgres +select + name, + cluster_id, + id, + status, + error_message, + created_at +from + scaleway_kubernetes_node +where + status <> 'ready'; +``` -```sql +```sql+sqlite select name, cluster_id, @@ -34,8 +70,23 @@ where ``` ### List kubernetes nodes with ipv6 public +Analyze the settings to understand the status and creation date of Kubernetes nodes on Scaleway that are utilizing IPv6 public IP addresses. This is useful for maintaining network configurations and ensuring optimal performance. -```sql +```sql+postgres +select + name, + cluster_id, + id, + status, + public_ip_v6, + created_at +from + scaleway_kubernetes_node +where + public_ip_v6 != ''; +``` + +```sql+sqlite select name, cluster_id, @@ -50,8 +101,9 @@ where ``` ### List kubernetes nodes created more than 90 days ago +Identify instances where Kubernetes nodes have been active for a prolonged period of time, specifically more than 90 days. This can be useful in managing resources and ensuring optimal performance within your system. -```sql +```sql+postgres select name, cluster_id, @@ -64,3 +116,17 @@ from where created_at <= now() - interval '90' day; ``` + +```sql+sqlite +select + name, + cluster_id, + id, + status, + updated_at, + created_at +from + scaleway_kubernetes_node +where + created_at <= datetime('now','-90 day'); +``` \ No newline at end of file diff --git a/docs/tables/scaleway_kubernetes_pool.md b/docs/tables/scaleway_kubernetes_pool.md index 543b0ce..ab78207 100644 --- a/docs/tables/scaleway_kubernetes_pool.md +++ b/docs/tables/scaleway_kubernetes_pool.md @@ -1,12 +1,35 @@ -# Table: scaleway_kubernetes_pool +--- +title: "Steampipe Table: scaleway_kubernetes_pool - Query Scaleway Kubernetes Pools using SQL" +description: "Allows users to query Scaleway Kubernetes Pools, specifically providing insights into the configuration, status, and metadata of each pool." +--- -A Scaleway Kubernetes pool is a group of Scaleway Instances, organized by type. It represents the computing power of the cluster and contains the Kubernetes nodes, on which the containers run. +# Table: scaleway_kubernetes_pool - Query Scaleway Kubernetes Pools using SQL + +Scaleway Kubernetes Pools are a feature within Scaleway's Kubernetes Service that allows for the grouping of nodes within a Kubernetes cluster. These pools provide a way to manage the distribution and scaling of workloads across different nodes. Kubernetes Pools are essential for maintaining the performance and reliability of applications running on a Kubernetes cluster. + +## Table Usage Guide + +The `scaleway_kubernetes_pool` table offers insights into the configuration and status of Kubernetes Pools within Scaleway's Kubernetes Service. As a DevOps engineer or system administrator, you can explore details about each pool, such as its size, autoscaling settings, and associated metadata. Utilize this table to monitor the state of your Kubernetes Pools, identify any potential scaling issues, and ensure optimal distribution of workloads across your Kubernetes cluster. ## Examples ### Basic info +Explore the status and details of your Kubernetes clusters in Scaleway. This allows you to assess the health and version of your clusters, helping with maintenance and troubleshooting. -```sql +```sql+postgres +select + name, + node_type, + cluster_id, + id, + status, + created_at, + version +from + scaleway_kubernetes_pool; +``` + +```sql+sqlite select name, node_type, @@ -20,8 +43,24 @@ from ``` ### List kubernetes pools with a specific node type +Determine the areas in which Kubernetes pools are utilizing a specific node type within the Scaleway platform. This can be useful for resource optimization and understanding the distribution of node types across your Kubernetes clusters. + +```sql+postgres +select + name, + node_type, + cluster_id, + id, + status, + created_at, + version +from + scaleway_kubernetes_pool +where + node_type = 'play2_nano'; +``` -```sql +```sql+sqlite select name, node_type, @@ -37,8 +76,9 @@ where ``` ### List kubernetes pools with auto-scaling disabled +Identify Kubernetes pools where auto-scaling is turned off. This can be useful in managing system resources and preventing unexpected scaling actions. -```sql +```sql+postgres select name, node_type, @@ -53,9 +93,25 @@ where autoscaling is false; ``` +```sql+sqlite +select + name, + node_type, + cluster_id, + id, + status, + autoscaling, + version +from + scaleway_kubernetes_pool +where + autoscaling is 0; +``` + ### List kubernetes pools with Kubernetes version inferior to 1.24 +Determine the areas in which Kubernetes pools are operating on versions older than 1.24. This can help in identifying pools that may need to be updated for security or feature improvements. -```sql +```sql+postgres select name, node_type, @@ -68,3 +124,17 @@ from where version < '1.24'; ``` + +```sql+sqlite +select + name, + node_type, + cluster_id, + id, + status, + version +from + scaleway_kubernetes_pool +where + version < '1.24'; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_object_bucket.md b/docs/tables/scaleway_object_bucket.md index f6c3720..21e7588 100644 --- a/docs/tables/scaleway_object_bucket.md +++ b/docs/tables/scaleway_object_bucket.md @@ -1,12 +1,32 @@ -# Table: scaleway_object_bucket +--- +title: "Steampipe Table: scaleway_object_bucket - Query Scaleway Object Storage Buckets using SQL" +description: "Allows users to query Scaleway Object Storage Buckets, providing insights into the configuration and metadata of each bucket." +--- -A Scaleway Object bucket is a public cloud storage resource available in Scaleway, an object storage offering. +# Table: scaleway_object_bucket - Query Scaleway Object Storage Buckets using SQL + +Scaleway Object Storage is a service within Scaleway that allows you to store and retrieve any amount of data, at any time, from anywhere. It is designed to make web-scale computing easier by enabling you to store and retrieve any amount of data, at any time, from within Scaleway's computing environment. Scaleway Object Storage is a simple, scalable, and reliable object storage solution for managing data for applications, websites, backup, and restore, archive, and big data analytics. + +## Table Usage Guide + +The `scaleway_object_bucket` table provides insights into Object Storage Buckets within Scaleway. As a DevOps engineer, explore bucket-specific details through this table, including bucket name, region, creation date, and owner. Utilize it to uncover information about buckets, such as their ACLs, CORS configuration, and lifecycle configuration rules. ## Examples ### Basic info +Explore which of your Scaleway object storage buckets are publicly accessible. This can help in identifying potential security risks and ensuring that sensitive data is not exposed unintentionally. -```sql +```sql+postgres +select + name, + region, + project, + bucket_policy_is_public +from + scaleway_object_bucket; +``` + +```sql+sqlite select name, region, @@ -17,8 +37,21 @@ from ``` ### List buckets with versioning disabled +Discover the segments that have versioning disabled in your Scaleway object storage. This can be useful to identify potential risks and ensure data integrity by enabling versioning. -```sql +```sql+postgres +select + name, + region, + project, + versioning_enabled +from + scaleway_object_bucket +where + not versioning_enabled; +``` + +```sql+sqlite select name, region, @@ -31,8 +64,9 @@ where ``` ### List buckets with no lifecycle policy +Explore which Scaleway object buckets are missing a lifecycle policy. This can be useful to identify potential areas of cost savings, as lifecycle policies can help manage storage costs by automatically archiving or deleting old data. -```sql +```sql+postgres select name, region, @@ -43,3 +77,15 @@ from where lifecycle_rules is null; ``` + +```sql+sqlite +select + name, + region, + project, + versioning_enabled +from + scaleway_object_bucket +where + lifecycle_rules is null; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_rdb_database.md b/docs/tables/scaleway_rdb_database.md index 3020b7b..3bd6f32 100644 --- a/docs/tables/scaleway_rdb_database.md +++ b/docs/tables/scaleway_rdb_database.md @@ -1,12 +1,34 @@ -# Table: scaleway_rdb_database +--- +title: "Steampipe Table: scaleway_rdb_database - Query Scaleway RDB Databases using SQL" +description: "Allows users to query Scaleway RDB Databases, specifically the database details, providing insights into database configurations, settings, and status." +--- -An RDB database is a fully managed database that supports high availability, automatic backups, and more. +# Table: scaleway_rdb_database - Query Scaleway RDB Databases using SQL + +A Scaleway RDB Database is a managed relational database service that offers automated backups, high availability, and the ability to scale capacity up or down based on demand. It supports multiple database engines including MySQL, PostgreSQL, and Redis. With Scaleway RDB Database, you can focus on your application logic rather than managing database infrastructure. + +## Table Usage Guide + +The `scaleway_rdb_database` table provides insights into RDB Databases within Scaleway. As a Database Administrator, explore database-specific details through this table, including configurations, settings, and status. Utilize it to uncover information about databases, such as their current operational state, the engine used, and the associated instance information. ## Examples ### Basic info +Explore which Scaleway databases are managed and identify their respective sizes and locations. This can help in assessing resource allocation and optimizing database management across different projects. -```sql +```sql+postgres +select + name, + instance_id, + size, + managed, + region, + project +from + scaleway_rdb_database; +``` + +```sql+sqlite select name, instance_id, @@ -19,8 +41,9 @@ from ``` ### List managed databases +Explore which databases are managed within your Scaleway RDB project. This query helps you to pinpoint specific locations and assess the elements within your project, providing insights into your data management and storage. -```sql +```sql+postgres select name, instance_id, @@ -34,9 +57,24 @@ where managed; ``` +```sql+sqlite +select + name, + instance_id, + size, + managed, + region, + project +from + scaleway_rdb_database +where + managed = 1; +``` + ### Get count of databases by instance +Explore the distribution of databases across different instances to understand how data is organized and managed within your Scaleway RDB environment. This can help optimize resource allocation and management strategies. -```sql +```sql+postgres select instance_id, count(name) @@ -45,3 +83,13 @@ from group by instance_id; ``` + +```sql+sqlite +select + instance_id, + count(name) +from + scaleway_rdb_database +group by + instance_id; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_rdb_instance.md b/docs/tables/scaleway_rdb_instance.md index ca59189..e048347 100644 --- a/docs/tables/scaleway_rdb_instance.md +++ b/docs/tables/scaleway_rdb_instance.md @@ -1,12 +1,34 @@ -# Table: scaleway_rdb_instance +--- +title: "Steampipe Table: scaleway_rdb_instance - Query Scaleway RDB Instances using SQL" +description: "Allows users to query Scaleway RDB Instances, specifically to retrieve information about each RDB instance like its name, status, region, and other related data." +--- -A database instance is composed of one or more nodes, depending on the high-availability cluster setting. +# Table: scaleway_rdb_instance - Query Scaleway RDB Instances using SQL + +Scaleway RDB Instances are a part of Scaleway's managed database services. These services provide a scalable, reliable, and easy to use database solution. They are fully managed by Scaleway, ensuring automatic updates, backups, and scalability without any manual intervention. + +## Table Usage Guide + +The `scaleway_rdb_instance` table provides insights into RDB instances within Scaleway's managed database services. As a database administrator or a DevOps engineer, you can explore instance-specific details through this table, including instance status, region, and other related data. Utilize it to manage and monitor your RDB instances effectively, ensuring optimal performance and security. ## Examples ### Basic info +Explore which Scaleway RDB instances are currently active or inactive, their associated engines, and the regions they're located in, all within the context of a specific project. This is beneficial for maintaining an overview of your database instances and their status, especially in larger projects. -```sql +```sql+postgres +select + name, + id, + status, + engine, + region, + project +from + scaleway_rdb_instance; +``` + +```sql+sqlite select name, id, @@ -19,8 +41,19 @@ from ``` ### Count instances by engine type +Analyze the distribution of instances based on their engine types to understand the usage patterns and preferences in your Scaleway RDB instances. This can help in making informed decisions for resource allocation and optimization. + +```sql+postgres +select + engine, + count(id) as instance_count +from + scaleway_rdb_instance +group by + engine; +``` -```sql +```sql+sqlite select engine, count(id) as instance_count @@ -31,8 +64,9 @@ group by ``` ### List instances older than 90 days +Determine the areas in which Scaleway RDB instances have been running for over 90 days. This can be useful for identifying potential cost-saving opportunities by shutting down or resizing long-running instances. -```sql +```sql+postgres select name, id, @@ -47,9 +81,25 @@ where extract(day from current_timestamp - created_at) > 90; ``` +```sql+sqlite +select + name, + id, + status, + engine, + julianday('now') - julianday(created_at) as age, + region, + project +from + scaleway_rdb_instance +where + julianday('now') - julianday(created_at) > 90; +``` + ### List instances with automatic backup disabled +Identify instances where automatic backup has been disabled, allowing you to assess risk and take necessary action to ensure data safety across different projects and regions. This is particularly useful in maintaining data integrity and preventing potential data loss. -```sql +```sql+postgres select name, id, @@ -62,3 +112,17 @@ from where (backup_schedule ->> 'disabled')::boolean; ``` + +```sql+sqlite +select + name, + id, + status, + json_extract(backup_schedule, '$.disabled') as automatic_backup, + region, + project +from + scaleway_rdb_instance +where + json_extract(backup_schedule, '$.disabled') = 'true'; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_registry_image.md b/docs/tables/scaleway_registry_image.md index b2c8af3..93c8c02 100644 --- a/docs/tables/scaleway_registry_image.md +++ b/docs/tables/scaleway_registry_image.md @@ -1,12 +1,35 @@ -# Table: scaleway_registry_namespace +--- +title: "Steampipe Table: scaleway_registry_image - Query Scaleway Registry Images using SQL" +description: "Allows users to query Scaleway Registry Images, providing details about the image tags, visibility, status, and more." +--- + +# Table: scaleway_registry_image - Query Scaleway Registry Images using SQL + +A Scaleway Registry Image is a resource in the Scaleway Container Registry, which is a fully-managed service to store and manage your Docker images. It allows you to store your images centrally for fast and reliable deployments in your applications. Each image in the registry includes a unique tag, status, visibility settings, and other metadata. + +## Table Usage Guide + +The `scaleway_registry_image` table provides insights into registry images within Scaleway's Container Registry. As a DevOps engineer, explore image-specific details through this table, including the image tags, visibility settings, status, and other metadata. Utilize it to manage and streamline your Docker image deployments and ensure the security and efficiency of your containerized applications. -Namespaces allow you to manage your Container Registry in a simple, clear and human-readable way. ## Examples ### Basic info +Explore which Scaleway registry images are active and when they were created to manage storage effectively. This helps in understanding the overall usage and aids in resource optimization. + +```sql+postgres +select + name, + id, + status, + created_at, + tags, + size +from + scaleway_registry_image; +``` -```sql +```sql+sqlite select name, id, @@ -19,8 +42,9 @@ from ``` ### List images updated in last 10 days for a repository +Determine the images in a repository that have been updated recently, allowing you to stay informed about the latest changes and developments within your project. -```sql +```sql+postgres select name, id, @@ -35,10 +59,26 @@ where updated_at >= now() - interval '10' day ``` +```sql+sqlite +select + name, + id, + status, + created_at, + updated_at, + tags, + size +from + scaleway_registry_image +where + updated_at >= datetime('now', '-10 days') +``` + ### List images with a public visibility +Discover the segments that have images with public visibility, allowing you to assess potential security risks and manage access controls more effectively. This is useful for maintaining data privacy and ensuring only appropriate images are publicly accessible. -```sql +```sql+postgres select name, id, @@ -52,3 +92,18 @@ from where visibility = 'public' ``` + +```sql+sqlite +select + name, + id, + status, + created_at, + updated_at, + tags, + visibility +from + scaleway_registry_image +where + visibility = 'public' +``` \ No newline at end of file diff --git a/docs/tables/scaleway_registry_namespace.md b/docs/tables/scaleway_registry_namespace.md index b105b90..d7b30aa 100644 --- a/docs/tables/scaleway_registry_namespace.md +++ b/docs/tables/scaleway_registry_namespace.md @@ -1,12 +1,35 @@ -# Table: scaleway_registry_namespace +--- +title: "Steampipe Table: scaleway_registry_namespace - Query Scaleway Registry Namespaces using SQL" +description: "Allows users to query Scaleway Registry Namespaces, providing insights into the details of each namespace, including its ID, name, endpoint, and creation date." +--- -Namespaces allow you to manage your Container Registry in a simple, clear and human-readable way. +# Table: scaleway_registry_namespace - Query Scaleway Registry Namespaces using SQL + +Scaleway Registry Namespace is a resource that belongs to Scaleway's Container Registry service. It allows users to create isolated spaces to host their container images. Each namespace provides a unique endpoint where users can push and pull images. + +## Table Usage Guide + +The `scaleway_registry_namespace` table provides insights into the registry namespaces within Scaleway's Container Registry service. As a DevOps engineer or system administrator, you can explore the details of each namespace through this table, including its unique identifier, name, endpoint, and the date it was created. This table is useful for managing and tracking your container images, and for ensuring the organization and security of your container registry. ## Examples ### Basic info +Explore the status and creation date of your Scaleway registry namespaces, which can help you track and manage your resources more effectively. This is particularly useful for maintaining organization and project information across multiple regions. + +```sql+postgres +select + name, + id, + status, + created_at, + region, + project, + organization +from + scaleway_registry_namespace; +``` -```sql +```sql+sqlite select name, id, @@ -20,8 +43,9 @@ from ``` ### List public registry namespaces +Explore which registry namespaces are publicly accessible. This can help in understanding the level of data exposure and potential security risks. -```sql +```sql+postgres select name, id, @@ -36,3 +60,17 @@ where is_public = true; ``` +```sql+sqlite +select + name, + id, + status, + created_at, + region, + project, + organization +from + scaleway_registry_namespace +where + is_public = 1; +``` \ No newline at end of file diff --git a/docs/tables/scaleway_vpc_private_network.md b/docs/tables/scaleway_vpc_private_network.md index eb6aac0..f90d153 100644 --- a/docs/tables/scaleway_vpc_private_network.md +++ b/docs/tables/scaleway_vpc_private_network.md @@ -1,12 +1,22 @@ -# Table: scaleway_vpc_private_network +--- +title: "Steampipe Table: scaleway_vpc_private_network - Query Scaleway VPC Private Networks using SQL" +description: "Allows users to query Scaleway VPC Private Networks, providing insights into the network's configuration and associated metadata." +--- -A VPC private network allows interconnecting your instances in an isolated and private network. +# Table: scaleway_vpc_private_network - Query Scaleway VPC Private Networks using SQL + +A Scaleway VPC Private Network is a resource within Scaleway that allows users to create isolated network environments. These networks are used to interconnect instances and other resources, providing a secure and efficient way to manage network traffic within a Scaleway environment. With this resource, users can control IP addressing, subnetting, and routing to provide secure, private communication between instances. + +## Table Usage Guide + +The `scaleway_vpc_private_network` table provides insights into private networks within Scaleway's Virtual Private Cloud (VPC). As a network engineer, you can explore network-specific details through this table, including network configuration, associated instances, and related metadata. Use it to uncover information about private networks, such as their IP range, default configuration, and associated instances. ## Examples ### Basic info +Explore which private networks have been created within your Scaleway VPC. This is useful for keeping track of your network configurations and identifying any potential issues or areas for improvement. -```sql +```sql+postgres select name, id, @@ -16,3 +26,14 @@ select from scaleway_vpc_private_network; ``` + +```sql+sqlite +select + name, + id, + created_at, + zone, + project +from + scaleway_vpc_private_network; +``` \ No newline at end of file