-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from Edgio/add_documentation
Add documentation
- Loading branch information
Showing
27 changed files
with
1,241 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
generate_index: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "edgio_environments Data Source - terraform-provider-edgio" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# edgio_environments (Data Source) | ||
|
||
Use the `edgio_environments` data source to retrieve a list of environments from the Edgio API. | ||
|
||
Learn more about the environments in the [Edgio API documentation](https://docs.edg.io/applications/v7/basics/environments). | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
edgio = { | ||
source = "Edgio/edgio" | ||
version = "0.1.0" | ||
} | ||
} | ||
} | ||
variable "client_id" { type = string } | ||
variable "client_secret" { type = string } | ||
variable "property_id" { type = string } | ||
provider "edgio" { | ||
client_id = var.client_id | ||
client_secret = var.client_secret | ||
} | ||
data "edgio_environments" "my_environments" { | ||
item_count = 100 | ||
property_id = var.property_id | ||
} | ||
output "environments" { | ||
value = data.edgio_environments.my_envirovments.environments | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `property_id` (String) The ID of the property to filter environments by. | ||
|
||
### Read-Only | ||
|
||
- `environments` (Attributes List) (see [below for nested schema](#nestedatt--environments)) | ||
- `item_count` (Number) The total number of environments. | ||
|
||
<a id="nestedatt--environments"></a> | ||
### Nested Schema for `environments` | ||
|
||
Read-Only: | ||
|
||
- `created_at` (String) The environment's creation date and time (UTC). | ||
- `default_domain_name` (String) The default domain name for the environment. | ||
- `dns_domain_name` (String) The DNS domain name for the environment. | ||
- `http_request_logging` (Boolean) Indicates if HTTP request logging is enabled for the environment. | ||
- `id` (String) The environment's system-defined ID. | ||
- `legacy_account_number` (String) The legacy account number for the environment. | ||
- `name` (String) The name of the environment. | ||
- `only_maintainers_can_deploy` (Boolean) Indicates if only maintainers can deploy to the environment. | ||
- `pci_compliance` (Boolean) Indicates if the environment is PCI compliant. | ||
- `property_id` (String) The ID of the property associated with the environment. | ||
- `updated_at` (String) The environment's last modification date and time (UTC). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "edgio_properties Data Source - terraform-provider-edgio" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# edgio_properties (Data Source) | ||
|
||
Use the `edgio_properties` data source to retrieve a list of properties from the Edgio API. | ||
|
||
Learn more about the properties in the [Edgio API documentation](https://docs.edg.io/applications/v7/basics/properties). | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
edgio = { | ||
source = "Edgio/edgio" | ||
version = "0.1.0" | ||
} | ||
} | ||
} | ||
variable "client_id" { type = string } | ||
variable "client_secret" { type = string } | ||
variable "property_id" { type = string } | ||
provider "edgio" { | ||
client_id = var.client_id | ||
client_secret = var.client_secret | ||
} | ||
data "edgio_properties" "my_properties" { | ||
item_count = 100 | ||
property_id = var.property_id | ||
} | ||
output "properties" { | ||
value = data.edgio_properties.my_properties.properties | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `item_count` (Number) The total number of items to load. | ||
- `organization_id` (String) An organization's system-defined ID (e.g., 12345678-1234-1234-1234-1234567890ab). | ||
From the Edgio Console, navigate to the desired organization and then click Settings. | ||
It is listed under Organization ID." | ||
|
||
### Read-Only | ||
|
||
- `properties` (Attributes List) (see [below for nested schema](#nestedatt--properties)) | ||
|
||
<a id="nestedatt--properties"></a> | ||
### Nested Schema for `properties` | ||
|
||
Read-Only: | ||
|
||
- `created_at` (String) The property's creation date and time (UTC). | ||
- `id` (String) The resource's system-defined ID. | ||
- `id_link` (String) The resource's relative path. | ||
- `organization_id` (String) An organization's system-defined ID (e.g., 12345678-1234-1234-1234-1234567890ab). | ||
From the Edgio Console, navigate to the desired organization and then click Settings. | ||
It is listed under Organization ID. | ||
- `slug` (String) The property's name. | ||
- `updated_at` (String) The property's last modification date and time (UTC). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
# generated by https://github.com/hashicorp/terraform-plugin-docs | ||
page_title: "edgio_tls_certs Data Source - terraform-provider-edgio" | ||
subcategory: "" | ||
description: |- | ||
--- | ||
|
||
# edgio_tls_certs (Data Source) | ||
|
||
Use the `edgio_tls_certs` data source to retrieve a list of TLS certificates from the Edgio API. | ||
|
||
Learn more about the TLS certificates in the [Edgio API documentation](https://docs.edg.io/applications/v7/basics/tls-certificates). | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
terraform { | ||
required_providers { | ||
edgio = { | ||
source = "Edgio/edgio" | ||
version = "0.1.0" | ||
} | ||
} | ||
} | ||
variable "client_id" { type = string } | ||
variable "client_secret" { type = string } | ||
provider "edgio" { | ||
client_id = var.client_id | ||
client_secret = var.client_secret | ||
} | ||
data "edgio_tls_certs" "my_certs" { | ||
environment_id = "enter environment id" | ||
item_count = 100 | ||
} | ||
output "all_my_certs" { | ||
value = data.edgio_tls_certs.my_certs | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `environment_id` (String) The environment ID to filter the TLS certificates. | ||
- `item_count` (Number) The total number of TLS certificates to load. | ||
|
||
### Read-Only | ||
|
||
- `certificates` (Attributes List) (see [below for nested schema](#nestedatt--certificates)) | ||
|
||
<a id="nestedatt--certificates"></a> | ||
### Nested Schema for `certificates` | ||
|
||
Required: | ||
|
||
- `environment_id` (String) An environment's system-defined ID (e.g., 12345678-1234-1234-1234-1234567890ab). | ||
|
||
Read-Only: | ||
|
||
- `activation_error` (String) Contains an error message if the TLS certificate could not be activated. | ||
- `alternative_names` (List of String) The TLS certificate's Subject Alternative Names (SAN). | ||
- `common_name` (String) The TLS certificate's common name (CN). | ||
- `created_at` (String) The TLS certificate's creation date and time (UTC). | ||
- `expiration` (String) The TLS certificate's expiration date and time (UTC). | ||
- `generated` (Boolean) Returns `true` for TLS certificates generated by Edgio, or `false` for uploaded certificates. | ||
- `id` (String) The resource's system-defined ID. | ||
- `intermediate_cert` (String) The intermediate certificates (IC) used by the CA, including the CA’s signing certificate. | ||
- `primary_cert` (String) Your TLS certificate. We require this certificate to be issued by a Certificate Authority | ||
- `private_key` (String) The private key that was generated with the CSR. | ||
- `serial` (String) The TLS certificate's serial number. | ||
- `status` (String) The TLS certificate's status. Possible values: `created`, `activating`, `activated`, `failed`, `expired`. | ||
- `updated_at` (String) The TLS certificate's last modification date and time (UTC). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
page_title: "Authentication" | ||
--- | ||
|
||
# Authentication | ||
The Edgio Terraform provider supports authentication via the Edgio REST API using OAuth 2.0 client credentials. To use the Edgio Terraform provider, you need to define a client ID and client secret in the Edgio Platform. For more information, see the [Edgio API documentation](https://docs.edg.io/applications/v7/rest_api/authentication#~(q~'API*20Clients)). | ||
|
||
After creating an API client, you can use the client ID and client secret to initialize the Edgio provider. The provider will automatically handle the OAuth 2.0 flow to obtain an access token and use it for authenticating requests to the Edgio API. | ||
|
||
|
||
### Requirements | ||
For the Edgio provider to work correctly, the following scopes must be enabled: | ||
|
||
- `app.accounts` | ||
- `app.config` | ||
|
||
|
||
### Resources | ||
The Edgio provider supports the following resources: | ||
* edgio_property | ||
* edgio_environment | ||
* edgio_cdn_configuration | ||
* edgio_tls_cert | ||
|
||
|
||
### Example | ||
|
||
``` | ||
terraform { | ||
required_providers { | ||
edgio = { | ||
source = "Edgio/edgio" | ||
version = "1.0.0" | ||
} | ||
} | ||
} | ||
variable "client_id" { type = string } | ||
variable "client_secret" { type = string } | ||
variable "organization_id" { type = string } | ||
provider "edgio" { | ||
client_id = var.client_id | ||
client_secret = var.client_secret | ||
} | ||
resource "edgio_property" "my_property" { | ||
organization_id = var.organization_id | ||
slug = "edgio-property-example" | ||
} | ||
``` | ||
|
||
#### Note | ||
In the example above, the `client_id`, `client_secret` amd `organizaiton_id` are passed as variables. You can also set these values in the provider block directly. However, it is recommended to use variables to avoid exposing sensitive information in your Terraform configuration files. See more on how to pass sensitive data to Terraform in the [input variables](https://developer.hashicorp.com/terraform/language/values/variables) document. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
--- | ||
layout: "Edgio" | ||
page_title: "Provider: Edgio" | ||
description: |- | ||
Learn about the Edgio Terraform provider. | ||
--- | ||
# Edgecast Terraform Provider | ||
|
||
Edgio allows you to securely deliver content to your customers. Use the Edgio Terraform provider to manage and provision your Property, Envirovment and CDN configuration. | ||
|
||
## Prerequisites | ||
Use of the Edgio Terraform provider requires: | ||
* An Edgio customer account in good standing. | ||
* An Edgio API client with the following scopes enabled: | ||
* `app.accounts` | ||
* `app.config` | ||
|
||
[Learn more.](guides/authentication.md) | ||
|
||
## Basic Setup | ||
We will now cover how to set up the Edgio Terraform provider using the [Terraform CLI](https://learn.hashicorp.com/tutorials/terraform/install-cli) version 0.14 or later. Perform the following steps: | ||
1. Create and define a **.tf** configuration file for the Edgio Terraform provider. | ||
1. Click `Use Provider` to display a template for the Edgio Terraform provider. | ||
1. Copy and paste the above template into your **.tf** configuration file. | ||
1. Define each desired variable within a variable block. | ||
|
||
!> Do not define sensitive information (e.g., API credentials) within a variable block. One method for securely defining variables is to set variable values from within a **.tfvars** file (e.g., terraform.tfvars) that is excluded from source control. | ||
|
||
For example, you can define the `client_secret` variable within a variable block. | ||
|
||
variable "client_secret" { | ||
description = "Client secret for the Edgio API client." | ||
type = string | ||
sensitive = true | ||
} | ||
1. From within the `edgio` provider block, define `client_id` and `client_secret`. | ||
|
||
For example, you can set the **client_secret** argument to the variable defined in the previous step: | ||
|
||
provider "edgio" { | ||
client_secret = var.client_secret | ||
client_id = var.client_id | ||
} | ||
1. Save your changes. | ||
1. Create a **terraform.tfvars** file and set your variables within it. | ||
|
||
!> Exclude this file from source control, since it contains sensitive information. | ||
|
||
1. Set each desired variable. | ||
|
||
For example, you can set the `client_secret` variable for . | ||
|
||
client_secret = "AjWhnhjMUjasNywG8rrfANJ3tAxt1POk" | ||
1. Save your changes. | ||
1. Configure your repository to prevent this file from being included in source control by adding it to your **.gitignore** file. | ||
1. Create and define a **.tf** configuration file for the desired resource(s). | ||
1. Create a **.tf** configuration file. You may add all of the desired resources to this configuration file or create resource-specific configuration files. | ||
1. From the documentation for the desired resource, copy and paste the desired example resource into your **.tf** configuration file. | ||
1. Modify the resource block as needed. | ||
1. Save your changes. | ||
1. Initialize Terraform and install the latest version of the Edgio provider by running the following command from Terminal: | ||
|
||
$ terraform init | ||
1. Create a plan for your resources by running the following command: | ||
|
||
$ terraform plan | ||
1. Apply your plan by running the following command: | ||
|
||
$ terraform apply | ||
Review the plan and then type **yes** to apply it. | ||
Terraform will use the Edgio provider to update your configuration to match the configuration defined within your plan. | ||
|
||
## Resources | ||
Learn how to get started with Terraform: | ||
* [Use the Command Line Interface](https://learn.hashicorp.com/collections/terraform/cli) | ||
* [Reuse Configuration with Modules](https://learn.hashicorp.com/collections/terraform/modules) | ||
* [Write Terraform Configuration](https://learn.hashicorp.com/collections/terraform/configuration-language) | ||
* [Glossary](https://www.terraform.io/docs/glossary) | ||
|
||
Learn about basic Edgio concepts: | ||
* [Getting Started (Create Edgio Account)](https://docs.edg.io/applications/v7/getting_started#create-account) | ||
* [Getting Started (Create Edgio Property)](https://docs.edg.io/applications/v7/getting_started#create-property) | ||
* [Security](https://docs.edg.io/applications/v7/security) | ||
* [Sites](https://docs.edg.io/applications/v7/sites_frameworks) | ||
* [Edge Functions](https://docs.edg.io/applications/v7/edge_functions) |
Oops, something went wrong.