{"id":26063215,"url":"https://github.com/edgio/terraform-provider-edgecast","last_synced_at":"2025-06-14T18:37:04.302Z","repository":{"id":38040000,"uuid":"306166262","full_name":"Edgio/terraform-provider-edgecast","owner":"Edgio","description":"Terraform Provider for Edgecast Platform","archived":false,"fork":false,"pushed_at":"2024-10-02T17:46:27.000Z","size":11323,"stargazers_count":11,"open_issues_count":1,"forks_count":7,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-04-10T08:16:47.916Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Edgio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":"Code-of-Conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-10-21T22:52:36.000Z","updated_at":"2024-10-02T17:35:55.000Z","dependencies_parsed_at":"2023-10-10T20:04:52.631Z","dependency_job_id":null,"html_url":"https://github.com/Edgio/terraform-provider-edgecast","commit_stats":null,"previous_names":["edgecast/terraform-provider-edgecast"],"tags_count":48,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Fterraform-provider-edgecast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Fterraform-provider-edgecast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Fterraform-provider-edgecast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Edgio%2Fterraform-provider-edgecast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Edgio","download_url":"https://codeload.github.com/Edgio/terraform-provider-edgecast/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248389794,"owners_count":21095662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-08T16:34:01.914Z","updated_at":"2025-04-11T11:50:29.310Z","avatar_url":"https://github.com/Edgio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Edgecast Terraform Provider\r\nA Terraform provider for the Edgecast Platform.\r\n\r\n## Table of Contents\r\n\r\n- [Background](#background)\r\n- [Install](#install)\r\n- [Development](#development)\r\n- [Usage](#usage)\r\n- [Security](#security)\r\n- [Structure](#structure)\r\n- [Contribute](#contribute)\r\n- [License](#license)\r\n\r\n## Background\r\n\r\nTerraform is a tool for developing, changing and versioning infrastructure \r\nsafely and efficiently. It allows the management of infrastructure as code. \r\nWith Terraform, you can store and version your configuration in GitHub (or your \r\nsource code control system of choice). Thanks to Terraform's configuration \r\nsyntax, there is no need to write custom code to use APIs. Simply describe your\r\ninfrastructure in a file and Terraform will figure out the rest.\r\n\r\n## Install\r\nThis provider is automatically installed when you run `terraform init` in a \r\ndirectory that contains a Terraform configuration file that references the \r\nEdgecast provider.\r\n\r\n## Using the Provider\r\nReference this provider in a Terraform Configuration file (e.g. `main.tf`):\r\n\r\n```\r\nterraform {\r\n  required_providers {\r\n    edgecast = {\r\n     version = \"1.3.5\"\r\n      source  = \"Edgio/edgecast\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nThen, use it in a provider block, passing in any credentials provided to you:\r\n```\r\nprovider \"edgecast\" {\r\n  api_token          = \"YOUR_API_TOKEN\"\r\n  ids_client_secret  = \"IDS_SECRET\"\r\n  ids_client_id      = \"IDS_CLIENT_ID\"\r\n  ids_scope          = \"IDS_SCOPE\"\r\n}\r\n```\r\n\r\nBelow this, you can start defining resources. For example:\r\n```\r\nresource \"edgecast_origin\" \"origin_images\" {\r\n    account_number = \"A1234\"\r\n    directory_name = \"images\"\r\n    media_type = \"httplarge\"\r\n    host_header = \"images.mysite.com\"\r\n    http {\r\n        load_balancing = \"RR\"\r\n        hostnames = [\"images-origin-1.mysite.com\",\"images-origin-2.mysite.com\"]\r\n    }\r\n}\r\n```\r\nThen follow the usual flow for Terraform:\r\n1. Run `terraform init` in a command line or terminal window.\r\n2. Run `terraform plan out=\"tf.plan\"` and inspect the detected changes.\r\n3. Run `terraform apply tf.plan`\r\n\r\n### Potential issue with CPS Data Sources\r\nThere is a potential issue where setting `wait_until_available=true` for `edgecast_cps_dns_txt_token` and `edgecast_cps_target_cname` causes the provider to wait for the data source on terraform plan. This wait time is valid, but it may not be desired behavior at plan time.\r\n\r\nTo work around this, you will need to define a variable that can be set to `false` at plan time and then `true` at apply time. Then, you can use it like so:\r\n\r\n```bash\r\nterraform apply -var 'wait_for_ec_cps_data_sources=true'\r\n```\r\n\r\nAn exampe of this workaround can be found in the examples for [edgecast_cps_dns_txt_token](examples/data-sources/edgecast_cps_dns_txt_token/) and [edgecast_cps_target_cname](examples/data-sources/edgecast_cps_target_cname/).\r\n\r\n## Development\r\n### Requirements\r\n-    [Terraform](https://www.terraform.io/downloads.html) 0.13.x\r\n-    [Terraform] on Mac, move it to /usr/local/bin; Windows add it to your path\r\n-    [Go](https://golang.org/) 1.15\r\nIt is strongly recommended to create a GOPATH environment variable that points\r\nto the directory containing your Go installation, then add $GOPATH/bin to your \r\n$PATH.\r\n\r\n### Testing Your Local Code\r\nIf you wish to modify the source code and test it with a configuration file,\r\nthere are special steps involved.\r\n\r\nTo simply build the code on any machine, run `go build`.\r\n\r\nActually using your local version provider with Terraform is more complicated.\r\nYou must:\r\n\r\n1. Install the provider to your machine's Terraform plugin directory.\r\n\r\nOn a Mac, open a terminal window and change directory to the root folder of\r\nthe source code. Run `make install`. The binary will be built and moved to your\r\nlocal Terraform plugin directory (`~/.terraform.d/plugins`).\r\n\r\nOn a Windows machine, do the same from a command line or powershell window. \r\nHowever, instead of the makefile, run the `install_win.bat` script. The provider\r\nexe will be moved to `%APPDATA%\\terraform.d\\plugins`.\r\n\r\n2. Reference the correct version of the provider in your `.tf` test file.\r\nIf you do not do this, Terraform will download the provider from the remote\r\nTerraform Registry instead of using your locally installed provider. \r\n\r\nMake note of the version that is used from within the the `Makefile` or \r\n`install_win.bat`. You must use the same version within your Terraform \r\nconfiguration file. Also, use `\"github.com/terraform-providers/edgecast\"` as the\r\nsource.\r\n\r\nExample:\r\n```\r\nterraform {\r\n  required_providers {\r\n    edgecast = {\r\n     version = \"1.3.5\"\r\n      source  = \"Edgio/edgecast\"\r\n    }\r\n  }\r\n}\r\n```\r\n\r\n## Logging\r\nYou can set the `TF_LOG` and `TF_LOG_PATH` environment variables to enable \r\nlogging for Terraform. \r\nSee the [official documentation](https://www.terraform.io/internals/debugging) \r\nfor details.\r\n\r\nFor example, on MAC OS, running the following two commands will enable logging \r\n**for your current terminal session**:\r\n```\r\nexport TF_LOG=TRACE\r\nexport TF_LOG_PATH=/somewhere/on/your/hard_drive/convenient/terraform.log\r\n```\r\n\r\n## Usage\r\nThe detailed documentation for the provider and specific resources can be found \r\non the [Terraform provider registry](https://registry.terraform.io/providers/Edgio/edgecast/latest/docs).\r\n\r\n## Security\r\n\r\nFor those users who have been granted specific permission(s) by an account \r\nadministrator to use the Edgecast Platform, each usage requires the inclusion of \r\na user specific token. Tokens can be created or revoked by the user via the \r\nPortal to ensure token security.\r\nSee [Authentication and Authorization](https://developer.edgecast.com/cdn/api/index.html#Introduction/Authentication.htm) \r\nfor more details on the type of token required, and how to acquire a token.\r\n\r\n\r\n## Structure\r\n\r\n```\r\n.\r\n├── edgecast\r\n    package containing edgecast terraform provider resources and functionality \r\n    to manage and provision edgecast configurations in terraform\r\n│   ├── api\r\n        base client and service specific client files needed for the provider \r\n        to interact with EdgeCast APIs\r\n        please add new service specific client files here\r\n│   ├── helper\r\n        package containing helper methods\r\n        please add new helper methods here\r\n│   ├── resources\r\n        resource files for individual services\r\n        please add new service specific resource files here\r\n│   └── provider\r\n        edgecast terraform provider\r\n├── examples\r\n    example files to get started managing and provisioning edgecast \r\n    configurations in terraform\r\n├── docs\r\n    holds detailed documentation for resources and steps \r\n    to manage and provision edgecast configurations in terraform\r\n├── templates\r\n    holds terraform templates\r\n│   ├── data-sources\r\n│   └── resources\r\n├── tools\r\n    package containing build, terraform-docs and other plug in tools\r\n└── unit-tests\r\n    package containing unit test files\r\n```\r\n\r\n## Contribute\r\n\r\nPlease refer to [the contributing.md file](Contributing.md) for information \r\nabout how to get involved. We welcome issues, questions, and pull requests.\r\n\r\n## License\r\nThis project is licensed under the terms of the [Apache 2.0](LICENSE) open \r\nsource license.\r\n\r\n## Resources\r\n[CDN Reference Documentation](https://docs.edgecast.com/cdn/index.html) - This \r\nis a useful resource for learning about the EdgeCast CDN. It is a good starting \r\npoint before using this provider.\r\n\r\n[API Documentation](https://docs.edgecast.com/cdn/index.html#REST-API.htm%3FTocPath%3D_____8) - For developers that want to interact directly with the EdgeCast CDN API, refer \r\nto this documentation. It contains all of the available operations as well as \r\ntheir inputs and outputs.\r\n\r\n[Examples](https://github.com/EdgeCast/terraform-provider-edgecast/tree/Master/examples) - Examples to get started can be found here.\r\n\r\nFound a bug? Want to request a feature? Please [contact us](https://www.edg.io/contact-support/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgio%2Fterraform-provider-edgecast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedgio%2Fterraform-provider-edgecast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedgio%2Fterraform-provider-edgecast/lists"}