### Basic API Client Credentials Source: https://github.com/akamai/terraform-provider-akamai/blob/master/docs/guides/get-started.md Example of a downloaded API client credential file. Ensure you add `[default]` as a header before saving it as `.edgerc`. ```bash [default] client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN= host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj ``` -------------------------------- ### Perform a GET request with retries Source: https://github.com/akamai/terraform-provider-akamai/blob/master/pkg/retryablehttp/README.md This is the most basic example of using retryablehttp. It performs a GET request and automatically retries on connection errors or 5xx server responses. The response object is compatible with Go's standard net/http. ```go resp, err := retryablehttp.Get("/foo") if err != nil { panic(err) } ``` -------------------------------- ### Convert retryablehttp.Client to stdlib http.Client Source: https://github.com/akamai/terraform-provider-akamai/blob/master/pkg/retryablehttp/README.md This snippet shows how to configure a retryablehttp.Client and then convert it to a standard Go http.Client. This allows you to leverage retryablehttp's features with existing code that expects a standard http.Client. Configure retryablehttp.Client settings before calling StandardClient(). ```go retryClient := retryablehttp.NewClient() retryClient.RetryMax = 10 standardClient := retryClient.StandardClient() // *http.Client ``` -------------------------------- ### Specify .edgerc File in Provider Configuration Source: https://github.com/akamai/terraform-provider-akamai/blob/master/docs/guides/get-started.md Configure the Akamai provider to use your `.edgerc` file for authentication. This points to the location and section of your credentials. ```hcl provider "akamai" { edgerc = "~/.edgerc" config_section = "default" } ``` -------------------------------- ### Configure Akamai Provider in Terraform Source: https://github.com/akamai/terraform-provider-akamai/blob/master/docs/guides/get-started.md Add the Akamai provider to your Terraform configuration file (`akamai.tf`). Specify the source and version of the provider. ```hcl terraform { required_providers { akamai = { source = "akamai/akamai" version = "10.2.0" } } } provider "akamai" { # Configuration options } ``` -------------------------------- ### Retrieve Contract and Group IDs Source: https://github.com/akamai/terraform-provider-akamai/blob/master/docs/guides/get-started.md Use the `akamai_groups` data source to fetch your account's contract and group IDs. The output can be used directly or as variables in your Terraform configuration. ```terraform data "akamai_groups" "my-ids" { } output "groups" { value = data.akamai_groups.my-ids } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.