Skip to content

ilijamt/terraform-provider-awx

Repository files navigation

AWX Terraform Provider

Go Report Card Codecov GitHub go.mod Go version (subdirectory of monorepo) GitHub Release

An autogenerated terraform provider based on the API specifications as provided by the /api/v2/ endpoint.

AWX Versions

Currently, built provider versions for AWX. To see which ones are active check versions.yaml

  • 23.5.1
  • 23.6.0
  • 23.7.0
  • 23.8.1
  • 23.9.0
  • 24.0.0
  • 24.1.0
  • 24.2.0

TODO:

  • Unit tests
  • Integration tests

Download a new version of the API

You need to spin up a version of AWX you want to download the API spec from. Older version of AWX report incorrect API spec. So manual changes may be required to fix them.

export AWX_VERSION=24.2.0
mkdir -p resources/api/$AWX_VERSION/config resources/api/$AWX_VERSION/gen-data
cat <<EOF > resources/api/$AWX_VERSION/config/default.json
{
  "api_version": "$AWX_VERSION"
}
EOF
make generate-config VERSION=$AWX_VERSION
make download-api VERSION=$AWX_VERSION
make generate-config VERSION=$AWX_VERSION

Check the previous version of the APIs inside the config/types folder to see about customization.

Build the version of the current API

make generate

If you want to build an API for the 23.7.0 version just run

make generate VERSION=23.7.0

Setup AWX for local testing

Make sure you checkout the AWX project locally, and have basic requirements setup, like docker, docker-compose, python, ansible, ansible-builder.

export AWX_VERSION=24.1.0
git checkout $AWX_VERSION
make clean
make ui-devel
make docker-compose-build
make docker-compose