{"id":20588718,"url":"https://github.com/ciscodevnet/terraform-provider-cml2","last_synced_at":"2025-04-14T21:54:03.150Z","repository":{"id":62126219,"uuid":"557952025","full_name":"CiscoDevNet/terraform-provider-cml2","owner":"CiscoDevNet","description":"Terraform provider repository for Cisco Modeling Labs","archived":false,"fork":false,"pushed_at":"2025-03-31T16:29:15.000Z","size":16491,"stargazers_count":17,"open_issues_count":7,"forks_count":1,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-14T21:53:44.013Z","etag":null,"topics":["automation","cisco","network-simulation","networking","simulation","terraform","terraform-provider","virl"],"latest_commit_sha":null,"homepage":"https://www.cisco.com/go/cml","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CiscoDevNet.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2022-10-26T15:59:41.000Z","updated_at":"2025-04-04T03:03:30.000Z","dependencies_parsed_at":"2024-06-20T08:19:42.748Z","dependency_job_id":"f36bce98-ef67-499f-975c-e6b2c83c9428","html_url":"https://github.com/CiscoDevNet/terraform-provider-cml2","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fterraform-provider-cml2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fterraform-provider-cml2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fterraform-provider-cml2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CiscoDevNet%2Fterraform-provider-cml2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CiscoDevNet","download_url":"https://codeload.github.com/CiscoDevNet/terraform-provider-cml2/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248968755,"owners_count":21191158,"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":["automation","cisco","network-simulation","networking","simulation","terraform","terraform-provider","virl"],"created_at":"2024-11-16T07:26:06.469Z","updated_at":"2025-04-14T21:54:03.144Z","avatar_url":"https://github.com/CiscoDevNet.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CodeQL](https://github.com/ciscodevnet/terraform-provider-cml2/actions/workflows/codeql-analysis.yml/badge.svg?branch=main)](https://github.com/ciscodevnet/terraform-provider-cml2/actions/workflows/codeql-analysis.yml) [![Go](https://github.com/ciscodevnet/terraform-provider-cml2/actions/workflows/test.yml/badge.svg)](https://github.com/ciscodevnet/terraform-provider-cml2/actions/workflows/test.yml) [![Coverage Status](https://coveralls.io/repos/github/CiscoDevNet/terraform-provider-cml2/badge.svg?branch=main)](https://coveralls.io/github/CiscoDevNet/terraform-provider-cml2?branch=main)\n\n# Terraform Provider for Cisco CML2\n\nThis repository implements a [Terraform](https://www.terraform.io) provider for\nCisco Modeling Labs version 2.6 and later. It's current state is \"beta\". Changes\ncan be expected, for example:\n\n- configuration (provider, resources, data-sources)\n- provider behavior\n- features (additional resources, ...)\n\n\u003e [!NOTE]\n\u003e The provider needs CML 2.4 or newer. This is due to some additional API\n\u003e capabilities which were introduced with 2.4.0. Older versions are blocked\n\u003e within by the `gocmlclient`.\n\nThe current implementation provides:\n\n- Resources and a data sources (`internal/provider/`),\n  - resource `cml2_lab` to create, update and destroy labs\n  - resource `cml2_node` to create, update and destroy nodes in a lab\n  - resource `cml2_link` to create, update and destroy links between nodes in a lab\n  - resource `cml2_lifecycle` to control the state of a lab (like `STARTED`,\n  `STOPPED`), including staged starting and configuration injection\n  - resource `cml2_group` to create, update and destroy groups\n  - resource `cml2_user` to create, update and destroy users\n  - data source `cml2_lab` to retrieve state of an existing lab\n  - data source `cml2_node` to retrieve state of an existing node in a lab\n  - data source `cml2_images` to retrieve the available node images from the controller\n  - data source `cml2_groups` to retrieve user groups from the controller\n  - data source `cml2_extconn` to retrieve external connector information from\n  the controller\n  - data source `cml2_system` to retrieve system state (ready state, version,\n  ...) from the controller\n  - data source `cml2_users` to retrieve users from the controller\n- Examples (`examples/`) and generated documentation (`docs/`),\n- Miscellaneous meta files.\n\n## Requirements\n\n- [Terraform](https://www.terraform.io/downloads.html) \u003e= 1.0\n- [Go](https://golang.org/doc/install) \u003e= 1.22\n- [CML2](https://cisco.com/go/cml) \u003e= 2.6.0\n\n## Building The Provider\n\n1. Clone the repository\n1. Enter the repository directory\n1. Build the provider using the Go `install` command:\n\n```shell\ngo install\n```\n\n## Using the provider\n\nPlease refer to the `examples` directory and look at the built-in documentation\nprovided via the registry.\n\n\u003e [!NOTE]\n\u003e\n\u003e It's recommended to use the UI token (from the User menu, top right \"Copy\n\u003e JWT\") instead of the user-name and password as that will provide better\n\u003e performance.  Using the token avoids repeated client authentication via the\n\u003e API which takes quite a bit of time.\n\n### HCL\n\nFor some basic examples look in the `examples` directory\n\n## Developing the Provider\n\nIf you wish to work on the provider, you'll first need\n[Go](http://www.golang.org) installed on your machine (see\n[Requirements](#requirements) above).\n\nTo compile the provider, run `go install`. This will build the provider and put\nthe provider binary in the `$GOPATH/bin` directory.\n\nTo generate or update documentation, run `go generate`.\n\nIn order to run the full suite of acceptance tests, run `make testacc`. For this\nto work, the provider needs to be configured via environment variables.  Here's\nan example:\n\n```shell\n# for testing purposes, suggest to use direnv\n\nTF_VAR_username=\"admin\"\nTF_VAR_password=\"secret\"\nTF_VAR_address=\"https://cml-controller.cml.lab\"\n# alternatively, this is faster:\n# TF_VAR_token=\"your-token-here\"\n\nexport TF_VAR_username TF_VAR_password TF_VAR_address\n```\n\nThose variables are referenced for acceptance testing in `internal/provider/testing`.\n\n```shell\nmake testacc\n```\n\nAcceptance testing with GitHub actions must properly set secrets which are used\nin the test workflow:\n\n- the NGROK_URL where where the CML API is reachable\n- the USERNAME and PASSWORD or alternatively, the CML API TOKEN\n\nThis can use Ngrok or other tunneling tools if the CML API isn't directly\nreachable from the internet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fterraform-provider-cml2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fciscodevnet%2Fterraform-provider-cml2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fciscodevnet%2Fterraform-provider-cml2/lists"}