From 5246d712112fccaa6e5cf406796acc1ac3310e10 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Sat, 16 Nov 2024 08:48:27 +1100 Subject: [PATCH] digitalocean, google, googleadmin updates --- .../databases/database_clusters/index.md | 53 +++++- .../digitalocean/databases/logsinks/index.md | 45 ++++- .../digitalocean/databases/replicas/index.md | 47 ++++- .../digitalocean/databases/topics/index.md | 73 +++++++- .../digitalocean/databases/users/index.md | 42 ++++- .../digitalocean/firewalls/firewalls/index.md | 73 ++++++-- .../digitalocean/firewalls/rules/index.md | 44 ++++- .../digitalocean/projects/projects/index.md | 20 ++- .../digitalocean/uptime/checks/index.md | 24 ++- .../uptime/checks_alerts/index.md | 48 ++++- .../vpc_peerings/vpc_peerings/index.md | 10 +- .../digitalocean/vpcs/peerings/index.md | 2 +- .../providers/digitalocean/vpcs/vpcs/index.md | 14 +- docs/google-docs/index.md | 168 +++++++++--------- docs/googleadmin-docs/index.md | 2 +- 15 files changed, 521 insertions(+), 144 deletions(-) diff --git a/docs/digitalocean-docs/providers/digitalocean/databases/database_clusters/index.md b/docs/digitalocean-docs/providers/digitalocean/databases/database_clusters/index.md index 85ff1dee99..092d2b59f5 100644 --- a/docs/digitalocean-docs/providers/digitalocean/databases/database_clusters/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/databases/database_clusters/index.md @@ -123,20 +123,30 @@ Use the following StackQL query and manifest file to create a new database ```sql /*+ create */ INSERT INTO digitalocean.databases.database_clusters ( -data__backup_restore, -data__engine, data__name, +data__engine, +data__version, data__num_nodes, +data__size, data__region, -data__size +data__private_network_uuid, +data__tags, +data__project_id, +data__rules, +data__storage_size_mib ) SELECT -'{{ backup_restore }}', -'{{ engine }}', '{{ name }}', +'{{ engine }}', +'{{ version }}', '{{ num_nodes }}', +'{{ size }}', '{{ region }}', -'{{ size }}' +'{{ private_network_uuid }}', +'{{ tags }}', +'{{ project_id }}', +'{{ rules }}', +'{{ storage_size_mib }}' ; ``` @@ -177,12 +187,37 @@ SELECT value: string - name: data__size value: string - - name: backup_restore + - name: name + value: string + - name: engine + value: string + - name: version + value: string + - name: num_nodes + value: integer + - name: size + value: string + - name: region + value: string + - name: private_network_uuid + value: string + - name: tags + value: array + - name: project_id + value: string + - name: rules + value: array props: - - name: database_name + - name: uuid + value: string + - name: cluster_uuid + value: string + - name: type value: string - - name: backup_created_at + - name: value value: string + - name: storage_size_mib + value: integer ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/databases/logsinks/index.md b/docs/digitalocean-docs/providers/digitalocean/databases/logsinks/index.md index e17c842483..1296193883 100644 --- a/docs/digitalocean-docs/providers/digitalocean/databases/logsinks/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/databases/logsinks/index.md @@ -59,13 +59,32 @@ Use the following StackQL query and manifest file to create a new logsinks +```sql +/*+ create */ +INSERT INTO digitalocean.databases.logsinks ( +data__sink_name, +data__sink_type, +data__config, +database_cluster_uuid +) +SELECT +'{{ sink_name }}', +'{{ sink_type }}', +'{{ config }}', +'{{ database_cluster_uuid }}' +; +``` + + + + ```sql /*+ create */ INSERT INTO digitalocean.databases.logsinks ( @@ -84,6 +103,30 @@ SELECT props: - name: database_cluster_uuid value: string + - name: sink_name + value: string + - name: sink_type + value: string + - name: config + props: + - name: server + value: string + - name: port + value: integer + - name: tls + value: boolean + - name: format + value: string + - name: logline + value: string + - name: sd + value: string + - name: ca + value: string + - name: key + value: string + - name: cert + value: string ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/databases/replicas/index.md b/docs/digitalocean-docs/providers/digitalocean/databases/replicas/index.md index fb33d0c4e4..a4c689747a 100644 --- a/docs/digitalocean-docs/providers/digitalocean/databases/replicas/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/databases/replicas/index.md @@ -79,7 +79,7 @@ Use the following StackQL query and manifest file to create a new replicas replicas ```sql /*+ create */ INSERT INTO digitalocean.databases.replicas ( -database_cluster_uuid, -data__name +data__name, +data__region, +data__size, +data__tags, +data__private_network_uuid, +data__storage_size_mib, +database_cluster_uuid ) SELECT -'{{ database_cluster_uuid }}', -'{{ name }}' +'{{ name }}', +'{{ region }}', +'{{ size }}', +'{{ tags }}', +'{{ private_network_uuid }}', +'{{ storage_size_mib }}', +'{{ database_cluster_uuid }}' +; +``` + + + + +```sql +/*+ create */ +INSERT INTO digitalocean.databases.replicas ( +data__name, +database_cluster_uuid +) +SELECT +'{{ name }}', +'{{ database_cluster_uuid }}' ; ``` @@ -108,6 +133,18 @@ SELECT value: string - name: data__name value: string + - name: name + value: string + - name: region + value: string + - name: size + value: string + - name: tags + value: array + - name: private_network_uuid + value: string + - name: storage_size_mib + value: integer ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/databases/topics/index.md b/docs/digitalocean-docs/providers/digitalocean/databases/topics/index.md index 3de8fc36d1..a4af8f6947 100644 --- a/docs/digitalocean-docs/providers/digitalocean/databases/topics/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/databases/topics/index.md @@ -59,13 +59,34 @@ Use the following StackQL query and manifest file to create a new topics +```sql +/*+ create */ +INSERT INTO digitalocean.databases.topics ( +data__name, +data__replication_factor, +data__partition_count, +data__config, +database_cluster_uuid +) +SELECT +'{{ name }}', +'{{ replication_factor }}', +'{{ partition_count }}', +'{{ config }}', +'{{ database_cluster_uuid }}' +; +``` + + + + ```sql /*+ create */ INSERT INTO digitalocean.databases.topics ( @@ -84,6 +105,56 @@ SELECT props: - name: database_cluster_uuid value: string + - name: name + value: string + - name: replication_factor + value: integer + - name: partition_count + value: integer + - name: config + props: + - name: cleanup_policy + value: string + - name: compression_type + value: string + - name: delete_retention_ms + value: integer + - name: file_delete_delay_ms + value: integer + - name: flush_messages + value: integer + - name: flush_ms + value: integer + - name: index_interval_bytes + value: integer + - name: max_compaction_lag_ms + value: integer + - name: max_message_bytes + value: integer + - name: message_down_conversion_enable + value: boolean + - name: message_format_version + value: string + - name: message_timestamp_type + value: string + - name: min_cleanable_dirty_ratio + value: number + - name: min_compaction_lag_ms + value: integer + - name: min_insync_replicas + value: integer + - name: preallocate + value: boolean + - name: retention_bytes + value: integer + - name: retention_ms + value: integer + - name: segment_bytes + value: integer + - name: segment_jitter_ms + value: integer + - name: segment_ms + value: integer ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/databases/users/index.md b/docs/digitalocean-docs/providers/digitalocean/databases/users/index.md index f650174538..23103432bf 100644 --- a/docs/digitalocean-docs/providers/digitalocean/databases/users/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/databases/users/index.md @@ -82,14 +82,16 @@ Use the following StackQL query and manifest file to create a new users @@ -118,8 +120,32 @@ SELECT value: string - name: data__name value: string - - name: readonly - value: boolean + - name: name + value: string + - name: mysql_settings + props: + - name: auth_plugin + value: string + - name: settings + props: + - name: pg_allow_replication + value: boolean + - name: opensearch_acl + value: array + props: + - name: index + value: string + - name: permission + value: string + - name: acl + value: array + props: + - name: id + value: string + - name: topic + value: string + - name: permission + value: string ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/firewalls/firewalls/index.md b/docs/digitalocean-docs/providers/digitalocean/firewalls/firewalls/index.md index 50e64e78f7..aad0ba7926 100644 --- a/docs/digitalocean-docs/providers/digitalocean/firewalls/firewalls/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/firewalls/firewalls/index.md @@ -59,7 +59,7 @@ Use the following StackQL query and manifest file to create a new firewall firewall ```sql /*+ create */ INSERT INTO digitalocean.firewalls.firewalls ( - -) -SELECT - -; -``` - - - - -```sql -/*+ create */ -INSERT INTO digitalocean.firewalls.firewalls ( -data__inbound_rules +data__name, +data__droplet_ids, +data__tags, +data__inbound_rules, +data__outbound_rules ) SELECT -'{{ inbound_rules }}' +'{{ name }}', +'{{ droplet_ids }}', +'{{ tags }}', +'{{ inbound_rules }}', +'{{ outbound_rules }}' ; ``` @@ -94,7 +89,51 @@ SELECT ```yaml - name: firewalls - props: [] + props: + - name: name + value: string + - name: droplet_ids + value: array + - name: tags + value: array + - name: inbound_rules + value: array + props: + - name: protocol + value: string + - name: ports + value: string + - name: sources + props: + - name: addresses + value: array + - name: droplet_ids + value: array + - name: load_balancer_uids + value: array + - name: kubernetes_ids + value: array + - name: tags + value: array + - name: outbound_rules + value: array + props: + - name: protocol + value: string + - name: ports + value: string + - name: destinations + props: + - name: addresses + value: array + - name: droplet_ids + value: array + - name: load_balancer_uids + value: array + - name: kubernetes_ids + value: array + - name: tags + value: array ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/firewalls/rules/index.md b/docs/digitalocean-docs/providers/digitalocean/firewalls/rules/index.md index dffaa3cc80..9910bd83e4 100644 --- a/docs/digitalocean-docs/providers/digitalocean/firewalls/rules/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/firewalls/rules/index.md @@ -54,9 +54,13 @@ Use the following StackQL query and manifest file to create a new rules diff --git a/docs/digitalocean-docs/providers/digitalocean/projects/projects/index.md b/docs/digitalocean-docs/providers/digitalocean/projects/projects/index.md index 97a6e18ef3..df63f6fd97 100644 --- a/docs/digitalocean-docs/providers/digitalocean/projects/projects/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/projects/projects/index.md @@ -70,10 +70,16 @@ Use the following StackQL query and manifest file to create a new projects ```sql /*+ create */ INSERT INTO digitalocean.projects.projects ( - +data__name, +data__description, +data__purpose, +data__environment ) SELECT - +'{{ name }}', +'{{ description }}', +'{{ purpose }}', +'{{ environment }}' ; ``` @@ -82,7 +88,15 @@ SELECT ```yaml - name: projects - props: [] + props: + - name: name + value: string + - name: description + value: string + - name: purpose + value: string + - name: environment + value: string ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/uptime/checks/index.md b/docs/digitalocean-docs/providers/digitalocean/uptime/checks/index.md index 785d247204..958e67d591 100644 --- a/docs/digitalocean-docs/providers/digitalocean/uptime/checks/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/uptime/checks/index.md @@ -79,10 +79,18 @@ Use the following StackQL query and manifest file to create a new checks @@ -91,7 +99,17 @@ SELECT ```yaml - name: checks - props: [] + props: + - name: name + value: string + - name: type + value: string + - name: target + value: string + - name: regions + value: array + - name: enabled + value: boolean ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/uptime/checks_alerts/index.md b/docs/digitalocean-docs/providers/digitalocean/uptime/checks_alerts/index.md index bb80b59172..865d25eab4 100644 --- a/docs/digitalocean-docs/providers/digitalocean/uptime/checks_alerts/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/uptime/checks_alerts/index.md @@ -71,13 +71,38 @@ Use the following StackQL query and manifest file to create a new checks_a +```sql +/*+ create */ +INSERT INTO digitalocean.uptime.checks_alerts ( +data__name, +data__type, +data__threshold, +data__comparison, +data__notifications, +data__period, +check_id +) +SELECT +'{{ name }}', +'{{ type }}', +'{{ threshold }}', +'{{ comparison }}', +'{{ notifications }}', +'{{ period }}', +'{{ check_id }}' +; +``` + + + + ```sql /*+ create */ INSERT INTO digitalocean.uptime.checks_alerts ( @@ -96,6 +121,27 @@ SELECT props: - name: check_id value: string + - name: name + value: string + - name: type + value: string + - name: threshold + value: integer + - name: comparison + value: string + - name: notifications + props: + - name: email + value: array + - name: slack + value: array + props: + - name: channel + value: string + - name: url + value: string + - name: period + value: string ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/vpc_peerings/vpc_peerings/index.md b/docs/digitalocean-docs/providers/digitalocean/vpc_peerings/vpc_peerings/index.md index 1d3f171e1a..c14a11d010 100644 --- a/docs/digitalocean-docs/providers/digitalocean/vpc_peerings/vpc_peerings/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/vpc_peerings/vpc_peerings/index.md @@ -77,10 +77,10 @@ Use the following StackQL query and manifest file to create a new vpc_peer ```sql /*+ create */ INSERT INTO digitalocean.vpc_peerings.vpc_peerings ( - +data__vpc_ids ) SELECT - +'{{ vpc_ids }}' ; ``` @@ -89,7 +89,9 @@ SELECT ```yaml - name: vpc_peerings - props: [] + props: + - name: vpc_ids + value: array ``` @@ -103,7 +105,7 @@ Updates a vpc_peerings resource. /*+ update */ UPDATE digitalocean.vpc_peerings.vpc_peerings SET - +name = '{{ name }}' WHERE vpc_peering_id = '{{ vpc_peering_id }}'; ``` diff --git a/docs/digitalocean-docs/providers/digitalocean/vpcs/peerings/index.md b/docs/digitalocean-docs/providers/digitalocean/vpcs/peerings/index.md index c59d4a3305..7809592fed 100644 --- a/docs/digitalocean-docs/providers/digitalocean/vpcs/peerings/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/vpcs/peerings/index.md @@ -114,7 +114,7 @@ Updates a peerings resource. /*+ update */ UPDATE digitalocean.vpcs.peerings SET - +name = '{{ name }}' WHERE vpc_id = '{{ vpc_id }}' AND vpc_peering_id = '{{ vpc_peering_id }}'; diff --git a/docs/digitalocean-docs/providers/digitalocean/vpcs/vpcs/index.md b/docs/digitalocean-docs/providers/digitalocean/vpcs/vpcs/index.md index a837ffc8a7..49474afbc8 100644 --- a/docs/digitalocean-docs/providers/digitalocean/vpcs/vpcs/index.md +++ b/docs/digitalocean-docs/providers/digitalocean/vpcs/vpcs/index.md @@ -84,10 +84,12 @@ Use the following StackQL query and manifest file to create a new vpcs @@ -96,7 +98,11 @@ SELECT ```yaml - name: vpcs - props: [] + props: + - name: region + value: string + - name: ip_range + value: string ``` @@ -110,7 +116,7 @@ Updates a vpcs resource. /*+ update */ UPDATE digitalocean.vpcs.vpcs SET - +default = true|false WHERE vpc_id = '{{ vpc_id }}'; ``` diff --git a/docs/google-docs/index.md b/docs/google-docs/index.md index 67fdeee534..1d6838deec 100644 --- a/docs/google-docs/index.md +++ b/docs/google-docs/index.md @@ -1,24 +1,24 @@ ---- -title: google -hide_title: false -hide_table_of_contents: false -keywords: - - google - - google cloud platform - - stackql - - infrastructure-as-code - - configuration-as-data - - cloud inventory -description: Query, deploy and manage Google Cloud Platform resources using SQL -custom_edit_url: null -image: /img/providers/google/stackql-google-provider-featured-image.png -id: google-doc -slug: /providers/google - ---- - -import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; - +--- +title: google +hide_title: false +hide_table_of_contents: false +keywords: + - google + - google cloud platform + - stackql + - infrastructure-as-code + - configuration-as-data + - cloud inventory +description: Query, deploy and manage Google Cloud Platform resources using SQL +custom_edit_url: null +image: /img/providers/google/stackql-google-provider-featured-image.png +id: google-doc +slug: /providers/google + +--- + +import CopyableCode from '@site/src/components/CopyableCode/CopyableCode'; + Cloud services from Google. :::info Provider Summary (v24.09.00254) @@ -32,69 +32,69 @@ Cloud services from Google. ::: -See also: -[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry) -* * * - -## Installation - -To pull the latest version of the `google` provider, run the following command: - -```bash -REGISTRY PULL google; -``` -> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry). - -## Authentication - - -The following authentication methods are supported: -- -- for running interactive queries from Cloud Shell or other machines where the user is authenticated using - -> for more information on creating service accounts and key files, see [Service accounts overview](https://cloud.google.com/iam/docs/service-account-overview). - -### Service Account Environment Variable (default) - -The following system environment variable is used by default: - -- - contents of the google service account key json file. This variable is sourced at runtime (from the local machine using export GOOGLE_CREDENTIALS=cat creds/my-sa-key.json for example or as a CI variable/secret). - -This variable is sourced at runtime (from the local machine using `export GOOGLE_CREDENTIALS=$(cat creds/my-sa-key.json)` for example or as a CI variable/secret). - -
- -Specifying the service account key file location directly - -You can specify the path to the service account key file without using the default environment variable by using the flag of the stackql program. For example: - -```bash -AUTH='{ "google": { "type": "service_account", "credentialsfilepath": "creds/sa-key.json" }}' -stackql shell --auth="${AUTH}" -``` - -or using PowerShell: - -```powershell -$Auth = "{ 'google': { 'type': 'service_account', 'credentialsfilepath': 'creds/sa-key.json' }}" -stackql.exe shell --auth=$Auth -``` - -
- -### Interactive Authentication -When you are using Google Cloud Shell or on a machine where you have authenticated using , you can then use the following authentication method: - -```bash -AUTH='{ "google": { "type": "interactive" }}' -stackql shell --auth="${AUTH}" -``` - -or using PowerShell: - -```powershell -$Auth = "{ 'google': { 'type': 'interactive' }}" -stackql.exe shell --auth=$Auth +See also: +[[` SHOW `]](https://stackql.io/docs/language-spec/show) [[` DESCRIBE `]](https://stackql.io/docs/language-spec/describe) [[` REGISTRY `]](https://stackql.io/docs/language-spec/registry) +* * * + +## Installation + +To pull the latest version of the `google` provider, run the following command: + +```bash +REGISTRY PULL google; +``` +> To view previous provider versions or to pull a specific provider version, see [here](https://stackql.io/docs/language-spec/registry). + +## Authentication + + +The following authentication methods are supported: +- +- for running interactive queries from Cloud Shell or other machines where the user is authenticated using + +> for more information on creating service accounts and key files, see [Service accounts overview](https://cloud.google.com/iam/docs/service-account-overview). + +### Service Account Environment Variable (default) + +The following system environment variable is used by default: + +- - contents of the google service account key json file. This variable is sourced at runtime (from the local machine using export GOOGLE_CREDENTIALS=$(cat creds/my-sa-key.json) for example or as a CI variable/secret). + +This variable is sourced at runtime (from the local machine using `export GOOGLE_CREDENTIALS=$(cat creds/my-sa-key.json)` for example or as a CI variable/secret). + +
+ +Specifying the service account key file location directly + +You can specify the path to the service account key file without using the default environment variable by using the flag of the stackql program. For example: + +```bash +AUTH='{ "google": { "type": "service_account", "credentialsfilepath": "creds/sa-key.json" }}' +stackql shell --auth="${AUTH}" +``` + +or using PowerShell: + +```powershell +$Auth = "{ 'google': { 'type': 'service_account', 'credentialsfilepath': 'creds/sa-key.json' }}" +stackql.exe shell --auth=$Auth +``` + +
+ +### Interactive Authentication +When you are using Google Cloud Shell or on a machine where you have authenticated using , you can then use the following authentication method: + +```bash +AUTH='{ "google": { "type": "interactive" }}' +stackql shell --auth="${AUTH}" +``` + +or using PowerShell: + +```powershell +$Auth = "{ 'google': { 'type': 'interactive' }}" +stackql.exe shell --auth=$Auth ``` ## Services diff --git a/docs/googleadmin-docs/index.md b/docs/googleadmin-docs/index.md index c5b1d13c03..e2dd8d797f 100644 --- a/docs/googleadmin-docs/index.md +++ b/docs/googleadmin-docs/index.md @@ -107,7 +107,7 @@ The following system environment variable is used by default: - - contents of the google service account key json file -This variable is sourced at runtime (from the local machine using `export GOOGLE_CREDENTIALS=cat creds/my-sa-key.json` for example or as a CI variable/secret). +This variable is sourced at runtime (from the local machine using `export GOOGLE_CREDENTIALS=$(cat creds/my-sa-key.json)` for example or as a CI variable/secret).