This Terraform provider plugin allows you to configure a Cloud Foundry environment declaratively using HCL.
The documentation is available at https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry
See doc at https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry , if you are under terraform 0.13 you can follow installation doc at https://github.com/cloudfoundry-community/terraform-provider-cloudfoundry/wiki
Requirements:
Clone repository to: $GOPATH/src/github.com/terraform-providers/terraform-provider-cloudfoundry
$ mkdir -p $GOPATH/src/github.com/terraform-providers; cd $GOPATH/src/github.com/terraform-providers
$ git clone [email protected]:terraform-providers/terraform-provider-cloudfoundry
Enter the provider directory and build the provider
$ cd $GOPATH/src/github.com/terraform-providers/terraform-provider-cloudfoundry
$ make build
If you wish to work on the provider, you'll first need Go installed on your machine (version 1.12+ is required).
- git clone this repo
- simply run
go build .
for building the provider - add a file at
${HOME}/.terraformrc
and set this content
providers {
cloudfoundry = "path/where/you/have/clone/repo/terraform-provider-cloudfoundry"
}
That's override the path where to found provider binary to use your development version.
To test the provider you will need to run a local PCF Dev instance or launch it in AWS via the scripts/pcfdev-up.sh
. Once the instance is running you will need to export the following environment variables.
export CF_API_URL=https://api.local.pcfdev.io
export CF_USER=admin
export CF_PASSWORD=admin
export CF_UAA_CLIENT_ID=admin
export CF_UAA_CLIENT_SECRET=admin-client-secret
export CF_CA_CERT=""
export CF_SKIP_SSL_VALIDATION=true
You can export the following environment variables to enable detail debug logs.
export CF_DEBUG=true
export CF_TRACE=debug.log
In order to run the tests locally, run.
cd cloudfoundry
TF_ACC=1 go test -v -timeout 120m .
To run the tests in AWS first launch PCFDev in AWS via scripts/pcfdev-up.sh
, and then run.
make testacc
Acceptance tests are run against a PCF Dev instance in AWS before a release is created. Any other testing should be done using a local PCF Dev instance.
$ make testacc
You must update doc for resource and data sources in docs, this will appears in the next release at https://registry.terraform.io/providers/cloudfoundry-community/cloudfoundry.
You can reach us over Slack
- Website: https://www.terraform.io
- Mailing list: Google Groups