couchbasecloud / terraform-provider-couchbase-capella

Terraform Couchbase Capella Provider: Deploy, update, and manage Couchbase Capella infrastructure as code through HashiCorp Terraform
Apache License 2.0
32 stars 4 forks source link

[AV-79411] Add a Custom User-Agent HTTP header for Terraform Provider Client #200

Closed l0n3star closed 5 months ago

l0n3star commented 5 months ago

Jira

Description

Use custom user agent in HTTP header so we can identify requests from terraform.

Type of Change

Manual Testing Approach

How was this change tested and do you have evidence? (REQUIRED: Select at least 1)

Testing

Tested by retrieving org details from terraform. This uses ExecuteWithRetry.

Validated with tcpdump we get custom user agent:

Transmission Control Protocol, Src Port: 60791, Dst Port: 8084, Seq: 1, Ack: 1, Len: 328
Hypertext Transfer Protocol
    GET /v4/organizations/ffffffff-aaaa-1414-eeee-000000000000 HTTP/1.1\r\n
    Host: localhost:8084\r\n
    User-Agent: terraform-provider-couchbase-capella/1.2.0\r\n
    Authorization: Bearer <token>\r\n
    Accept-Encoding: gzip\r\n

Required Checklist:

Further comments