The Rundeck Terraform Provider enables infrastructure automation teams to manage Rundeck resources using HashiCorp Terraform. This provider is maintained by the community in the spirit of open source collaboration, with oversight from Rundeck/PagerDuty staff who review and approve contributions.
This provider is community-supported. While Rundeck/PagerDuty staff review and approve pull requests, new feature development is driven by community contributions. We welcome and encourage community involvement through:
- Bug reports and feature requests via GitHub Issues
- Code contributions via Pull Requests
- Documentation improvements
- Usage questions and discussions
- Provider Usage Documentation: Terraform Registry
- Community Discussion: Google Groups
- Chat:
Note: Some features will require newer or Enterprise versions of Rundeck.
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
installcommand:
$ go installIf 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
To generate or update documentation, run go generate
To run the full suite of acceptance tests:
$ make testaccNote: Acceptance tests create real resources and require a running Rundeck instance.
For local development, you can use the provided Docker setup:
$ cd test/oss
$ docker-compose up -d
$ cd ../..
$ TF_ACC=1 go test -v ./rundeck -timeout 120mThis will start a Rundeck instance at http://localhost:4440 with default credentials (admin/admin).
Some tests require Rundeck Enterprise features and will fail on Rundeck Community Edition. These tests are automatically skipped by default to prevent CI/CD failures.
Enterprise-only features tested:
- Runner resources - System runners and project runners (5 tests)
- Runner data sources -
rundeck_runner,rundeck_runners,rundeck_runner_tags - Local roles -
rundeck_local_roleCRUD and membership (see the dedicated setup section below) - Project schedules - Job scheduling via project-level schedules (3 tests)
- Execution lifecycle plugins
To run Enterprise tests locally:
- Ensure you have Rundeck Enterprise running (locally or remote)
- Set the environment variable to enable Enterprise tests:
$ export RUNDECK_ENTERPRISE_TESTS=1
$ make testaccProject Schedule Tests (Additional Setup Required):
The project schedule tests require manual setup because Rundeck requires schedules to exist in the project configuration before jobs can reference them. This cannot be automated through the Terraform provider.
To run project schedule tests:
- Create a project named
terraform-schedules-testin your Rundeck Enterprise instance - Add the following schedules to the project configuration:
my-schedule- Used by basic project schedule testschedule-1andschedule-2- Used by multiple schedule testsimple-schedule- Used by schedule without options test
- Set both environment variables:
$ export RUNDECK_ENTERPRISE_TESTS=1
$ export RUNDECK_PROJECT_SCHEDULES_CONFIGURED=1
$ make testaccWithout RUNDECK_PROJECT_SCHEDULES_CONFIGURED=1, the project schedule tests will be skipped even when RUNDECK_ENTERPRISE_TESTS=1 is set.
Local Role Membership Tests (Additional Setup Required):
TestAccRundeckLocalRole_members exercises rundeck_local_role's member add/remove workflow, which requires a real, pre-existing local username on the target instance - Terraform can't provision one itself, since this provider doesn't implement rundeck_local_user (the vendored SDK has no request-body support at all for the create/edit user endpoints, a gap in Rundeck's own published OpenAPI spec).
To run it:
- Ensure your Rundeck Enterprise instance authenticates via the local user store realm (not LDAP/SSO/PAM) -
rundeck_local_roleonly works against that realm. - Create (or identify) a local user account on that instance.
- Set both environment variables:
$ export RUNDECK_ENTERPRISE_TESTS=1
$ export RUNDECK_LOCAL_ROLE_TEST_USERNAME="an-existing-local-username"
$ make testaccWithout RUNDECK_LOCAL_ROLE_TEST_USERNAME, this specific test is skipped even when RUNDECK_ENTERPRISE_TESTS=1 is set; TestAccRundeckLocalRole_basic/_update (role CRUD without membership) run under RUNDECK_ENTERPRISE_TESTS=1 alone.
In CI/CD pipelines:
By default, Enterprise tests are skipped unless RUNDECK_ENTERPRISE_TESTS=1 is set. To enable them in GitHub Actions or other CI:
env:
RUNDECK_ENTERPRISE_TESTS: 1
RUNDECK_PROJECT_SCHEDULES_CONFIGURED: 1 # Only if project schedule tests should run
RUNDECK_URL: https://your-enterprise-rundeck.example.com
RUNDECK_AUTH_TOKEN: ${{ secrets.RUNDECK_TOKEN }}- Go 1.25.8+ - Required by
terraform-plugin-sdk/v2 - Rundeck 5.0.0+ - Minimum supported version (API v46)
- Docker - For local testing environment (optional but recommended)
- Rundeck Enterprise - Only if running Enterprise feature tests
