Skip to content

Latest commit

 

History

History
89 lines (66 loc) · 2.8 KB

README.md

File metadata and controls

89 lines (66 loc) · 2.8 KB

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.

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

Review Creating a minikube cluster for testing on how to setup your environment.

Username: admin Password: admin

After that you can use the predefined manifests to quickly spin up your environment. Make sure you have a fully clean environment, delete the namespace and any lingering pv.

❯ kubectl config current-context
minikube
❯ kustomize build tools/awx-k8s-manifests/overlays/24.3.1 | kubectl apply -f -
❯ minikube ip
10.211.55.6

Make sure that awx.local is points to 10.211.55.6 in your /etc/hosts file on your system.

To cleanup just run:

❯ kustomize build tools/awx-k8s-manifests/overlays/24.3.1 | kubectl delete -f -