### Example of SECURE Log Output Source: https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/index This example demonstrates the output format when the SECURE log level is enabled. It shows an HTTP GET request with the Authorization header obfuscated, revealing only the last four characters of the API key. ```text ---[ REQUEST ]--------------------------------------- GET /teams/DER8RFS HTTP/1.1 Accept: application/vnd.pagerduty+json;version=2 Authorization: kCjQ Content-Type: application/json User-Agent: (darwin arm64) Terraform/1.5.1 ``` -------------------------------- ### Configure PagerDuty Provider with App OAuth Scoped Token Source: https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/index This snippet demonstrates configuring the PagerDuty Terraform provider using an App OAuth scoped token. It includes the necessary provider configuration and examples for creating a PagerDuty team, user, and team membership. Note the required provider version. ```Terraform # Configure the PagerDuty provider terraform { required_providers { pagerduty = { source = "pagerduty/pagerduty" version = ">= 3.0.0" # Mind the supported Provider version } } } provider "pagerduty" { # Configure use of App Oauth scoped token use_app_oauth_scoped_token { pd_client_id = var.pd_client_id pd_client_secret = var.pd_client_secret pd_subdomain = var.pd_subdomain } } # Create a PagerDuty team resource "pagerduty_team" "engineering" { name = "Engineering" description = "All engineering" } # Create a PagerDuty user resource "pagerduty_user" "earline" { name = "Earline Greenholt" email = "125.greenholt.earline@graham.name" } # Create a team membership resource "pagerduty_team_membership" "earline_engineering" { user_id = pagerduty_user.earline.id team_id = pagerduty_team.engineering.id } ``` -------------------------------- ### Configure PagerDuty Provider with Token Source: https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/index This snippet shows how to configure the PagerDuty Terraform provider using an authorization token. It sets up the provider block and demonstrates creating a PagerDuty team, user, and team membership. ```Terraform # Configure the PagerDuty provider terraform { required_providers { pagerduty = { source = "pagerduty/pagerduty" version = ">= 2.2.1" } } } provider "pagerduty" { token = var.pagerduty_token } # Create a PagerDuty team resource "pagerduty_team" "engineering" { name = "Engineering" description = "All engineering" } # Create a PagerDuty user resource "pagerduty_user" "earline" { name = "Earline Greenholt" email = "125.greenholt.earline@graham.name" } # Create a team membership resource "pagerduty_team_membership" "earline_engineering" { user_id = pagerduty_user.earline.id team_id = pagerduty_team.engineering.id } ``` -------------------------------- ### Enabling SECURE Log Level for PagerDuty Provider Source: https://registry.terraform.io/providers/PagerDuty/pagerduty/latest/docs/index Instructions on how to enable the SECURE log level for the PagerDuty Terraform Provider by setting specific environment variables. This requires setting the general Terraform log level and the provider-specific log level. ```bash export TF_LOG=INFO export TF_LOG_PROVIDER_PAGERDUTY=SECURE ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.