Skip to content

CiscoDevNet/terraform-provider-nxos

Tests

Terraform Provider NX-OS

The NXOS provider provides resources to interact with one or more Cisco NX-OS devices.

All resources and data sources have been tested with the following releases.

Platform Version
Nexus 9Kv 10.3(1)

Documentation: https://registry.terraform.io/providers/CiscoDevNet/nxos/latest

Requirements

Device Configuration

The provider communicates with NX-OS devices via the NX-API REST, which requires the following device configuration.

feature nxapi

Support

If you encounter issues or have questions, please use the following resources:

  • GitHub Issues: Report bugs or request features on our GitHub Issues page.
  • Discussion Forums: Engage with other users and contributors on GitHub Discussions.

Contributing

We welcome contributions from the community! If you'd like to contribute, please follow our contribution guidelines. Whether it's reporting bugs, suggesting features, or submitting pull requests, your involvement helps improve the project for everyone.

Security

Reporting Vulnerabilities

Please see our security policy for reporting vulnerabilities.

Software Bill of Materials (SBOM)

This project provides machine-readable SBOMs (Software Bill of Materials) in SPDX and CycloneDX formats for dependency transparency and vulnerability tracking. Find the latest SBOM in the sbom/latest/ directory or attached to GitHub Releases. See SBOM.md for usage instructions and examples.

Building The Provider

  1. Clone the repository
  2. Enter the repository directory
  3. Build the provider using the Go install command:
go install

Adding Dependencies

This provider uses Go modules. Please see the Go documentation for the most up to date information about using Go modules.

To add a new dependency github.com/author/dependency to your Terraform provider:

go get github.com/author/dependency
go mod tidy

Then commit the changes to go.mod and go.sum.

Using the Provider

This Terraform Provider is available to install automatically via terraform init. If you're building the provider, follow the instructions to install it as a plugin. After placing it into your plugins directory, run terraform init to initialize it.

Additional documentation, including available resources and their arguments/attributes can be found on the Terraform documentation website.

Developing the Provider

If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).

To compile the provider, run go install. This will build the provider and put the provider binary in the $GOPATH/bin directory.

More information about how the code generation works can be found in the contribution guide.

Acceptance Tests

In order to run the full suite of acceptance tests, set up a .env file with the appropriate environment variables. Copy the sample file at .env.sample to .env, then edit the file to set the appropriate environment variables.

cp .env.sample .env

Then, run make test to execute all acceptance tests.

Note: Acceptance tests create real resources.

More information about how the acceptance tests work can be found in the contribution guide.

Packages

No packages published

Contributors 11