This is a Terraform provider for AWX (Ansible Tower) that allows you to manage resources like organizations, projects, inventories, job templates, and more.
The AWX Terraform provider relies on the goawx SDK.
This repository is a fork from denouche/terraform-provider-awx to extend functionality and support.
This repository is built on Terraform scaffolding for providers and contains the following:
- A resource and a data source (
internal/provider/
), - Examples (
examples/
) and generated documentation (docs/
), - Miscellaneous meta files.
- Clone the repository
- Enter the repository directory
- Build the provider using the Go
install
command or the Makefilebuild
target.
make build
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 -u github.com/author/dependency
go mod tidy && go mod vendor
Then commit the changes to go.mod
and go.sum
.
terraform {
required_version = ">= 1.5.3"
required_providers {
awx = {
source = "josh-silvas/awx"
version = "0.24.3"
}
}
}
// Configure the AWX provider. This example relies on AWX_HOSTNAME and AWX_TOKEN to exist
// in the environment. If not, you will need to specify them here.
provider "awx" {
hostname = "https://awx.example.com"
token = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
insecure = true
}
If you wish to work on the provider, you'll first need Go installed on your machine (see Requirements above).
See the DEVELOPMENT documentation for more information.