Skip to content

Commit

Permalink
Add user-agent string
Browse files Browse the repository at this point in the history
  • Loading branch information
henrybell committed Aug 30, 2023
1 parent 0aa1f14 commit 299c219
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions poller/poller-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ function getSpannerMetadata(projectId, spannerInstanceId, units) {

const spanner = new Spanner({
projectId: projectId,
userAgent: "cloud-solutions/spanner-autoscaler-poller-usage-v1.0"
});
const spannerInstance = spanner.instance(spannerInstanceId);

Expand Down
1 change: 1 addition & 0 deletions scaler/scaler-core/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ async function scaleSpannerInstance(spanner, suggestedSize) {

const spannerClient = new Spanner({
projectId: spanner.projectId,
userAgent: "cloud-solutions/spanner-autoscaler-scaler-usage-v1.0"
});

return spannerClient.instance(spanner.instanceId)
Expand Down
6 changes: 6 additions & 0 deletions terraform/modules/autoscaler-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
* limitations under the License.
*/

terraform {
provider_meta "google" {
module_name = "cloud-solutions/spanner-autoscaler-deploy-gke-v1.0"
}
}

resource "google_service_account" "service_account" {
project = var.project_id
account_id = "cluster-sa"
Expand Down
6 changes: 6 additions & 0 deletions terraform/modules/autoscaler-functions/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
* limitations under the License.
*/

terraform {
provider_meta "google" {
module_name = "cloud-solutions/spanner-autoscaler-deploy-cf-v1.0"
}
}

// PubSub

resource "google_pubsub_topic" "poller_topic" {
Expand Down

0 comments on commit 299c219

Please sign in to comment.