A a Terraform provider for Smile CDR. Focus on security module configurations:
- OpenID Identity Providers
- OIDC Clients
- Authorization and Permissions.
- User Accounts
- SMART Outbound Security Modules
- SMART Inbound Security Module
- Terraform >=10.0
- Go >= 1.19
- Clone the repository
- Enter the repository directory
- Build the provider using the GO install command:
make install
- Clone the repository
- Enter the repository directory
- Build the provider using the GO install command:
make install
Run the following command to build the provider
make build
Documentation for this Terraform provider can be found here.
- Have Smile CDR installed, possibly locally. See the smilecdr-product/docker-compose.yml, if you have a docker image for a release of Smile CDR and you wish to run locally.
- Install the provider
- Have Smile CDR installed, possibly locally. See the smilecdr-product/docker-compose.yml, if you have a docker image for a release of Smile CDR and you wish to run locally.
- Install the provider
make install
- Change directory to the example folder
- Set three environment variables:
- SMILECDR_USERNAME
- SMILECDR_PASSWORD
- SMILECDR_BASE_URL
-
- Change directory to the example folder
- Set three environment variables:
- SMILECDR_USERNAME
- SMILECDR_PASSWORD
- SMILECDR_BASE_URL
- Then, run the following command to initialize the workspace and apply the example configuration.
terraform init && terraform apply
To run acceptance tests you will need the following environment variables set so that the acceptance tests can connect to a dev/test instance of Smile CDR:
-
SMILECDR_USERNAME
, which is an admin user, that has full access to Admin APIs. -
SMILECDR_PASSWORD
, the password for the admin user. -
SMILECDR_BASE_URL
, which is the base URL of the Smile CDR Admin APIs
Note: Acceptance tests create real resources, and often cost money to run. That said, my recommendation is to run your acceptance tests on a local desktop Docker image. See the smilecdr-product folder for a starting-point docker compose YAML file.
make testacc
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.
To generate or update documentation, run go generate
.
In order to run the full suite of Acceptance tests, run make testacc
.
This project uses goreleaser to manage publishing signed release binaries to Git. From there they are published to the Terraform Registry (terraform.io)
See goreleaser.com/quick-start
- Merge from working branch to main.
- Tag a new release in form "vx.y.z" e.g. v1.0.1. OPtionally add a message with -m
git tag -a v1.0.5 -m "Release 1.0.5"
git push origin v1.0.5
- This triggers the GitAction to run a deployment.
- Monitor the GitAction progress at Github.com