Terraform Cloud Foundry Provider
This include changes:
This include changes:
Bug fixes:
Enhancement:
sso_passcode
(see: https://github.com/cloudfoundry-community/terraform-provider-cf/pull/227 )store_tokens_path
to make use it for login process. This is useful for sso passcode, user will not be required to set passcode each time.Thanks to:
THIS RELEASE CONTAINS BREAKING CHANGES PLEASE FOLLOW MIGRATIONS
This release only works for terraform 0.11.14 and higher versions (including 0.12.x versions)
This release also contains most waited feature: blue-green deployment. See documentation about it: https://github.com/cloudfoundry-community/terraform-provider-cf/wiki/resource_app#application-deployment-strategy-blue-green-deploy
Migration to 0.10.0 require you to change cloudfoundry_app
and cloudfoundry_buildpack
resource.
You must remove url
, git
, and github_release
attributes from your resource and change to path
according to
the doc you can found here: https://github.com/cloudfoundry-community/terraform-provider-cf/wiki/resource_app#application-source--binary
Provider will migrate itself your tfstate and will download any non zip http(s) url in a folder bits
in your current working directory.
For easier migration here the steps to follow with a tool which will do the change in your tf files directly without do anything:
cf-hcl-migration
tool in the release 0.10.0.
this tool only change your tf files for preparing migration made by the provider.cf-hcl-migration ./
tool on the root folder of your terraform files.cf-hcl-migration <module path>
tool on the root folder of your terraform files.
This tool migrate your terraform file config for only cloudfoundry_app
and cloudfoundry_buildpack
resource to change to new upload style
if your tf
files doesn't use those resources no need to run this tool
terraform apply
in the root folder of your terraform.target
in route
resource only handles target previously created by resource (i.e. it does not destroy nor modifies target set by other resources like cloudfoundry_application). This also removes the need to not mix setting route binding in app and route resources.cloudfoundry_space
and cloudfoundry_organization
will only modify users managed in the resource, and ignore any existing other users provisioned elsewhere.cloudfoundry_app
resource now only manages service binding and route mapping previously set by resource. This allows to provision new routes through the cloudfoundry_route
resource without having unexpected behaviors (that's also close #97)allow_ssh
attribute in cloudfoundry_space
resource must be explicitly set by user to be diff during update phase. There is no impact for users, it only allow disable and enable ssh without impact by external resource. This is defaulting to true
during creation phase if not set.enable_ssh
attribute in cloudfoundry_app
resource must be explicitly set by user to be diff during update phase. There is no impact for users, it only allow disable and enable ssh without impact by external resource. This is defaulting to true
during creation phase if not set.user
, password
, and api endpoint
because the first 2 will be in plain text in tfstate and the last one is unnecessary as user write it in provider
configuration.name
changes, force creating a new one.default
attribute in cloudfoundry in order to set isolation segment as default segment to all specified orgs. Relates to #8.route
attribute on cloudfoundry_app
(was deprecated)tags
parameter to user provided serviceparams_json
to service_key
resourceservice_instance
data source (close PR #99)service_key
data source (close PR #94)purge_when_delete
param to provider, when it's true purge when deleting a resource (e.g.: service instance, service broker). (fix #173)TF_LOG
equals to info
or trace
. If found request trace will be given in tf logs.users
attribute on cloudfoundry_space
and cloudfoundry_org
resources.cloudfoundry_space_users
and cloudfoundry_org_users
resources which now manage users. An extra specific force
attribute, enables to delete existing other users provisioned outside of the resource.cloudfoundry_app
data source (and close #91)cloudfoundry_route
data sourcecloudfoundry_app
resource, it will only deploy or restage or simply restart app if needed by changes. (Restage and restart was not implemented)cloudfoundry_app
resource, complete rewriting has been made to do this. To activate blue-green, you must set attribute strategy
to blue-green
. (see doc)services
to resource cloudfoundry_service_broker
: a Map of service service GUIDs keyed by service name.fail_when_catalog_not_accessible
and set it to true to know when catalog is not reachable. (this close #170 )username
and password
are now optional if client_id
and client_secret
are set and have sufficient permissions (authorities) to manipulate cloudfoundry instanceconflict
keyword between path
and port/random_port
in resource route
(it seems it was conflicting because of mishandled route endpoint creation which has been fixed)service_binding
attribute on cloudfoundry_app
resource to make orders not matters.routes
attribute signature on cloudfoundry_app
resource, only one pair of route/port was allowed. By fixing this it allows tcp route declaration.Thanks to:
Breaking changes:
terraform-provider-cloudfoundry
when installing it. Refer to Using the provider readme for further details. Upgrading to this version requires the following procedure:
terraform.tfstate
filesed 's#resource \"cf_#resource \"cloudfoundry_#g' old.tf | sed 's#data \"cf_#data \"cloudfoundry_#g'
terraform.tfstate
file replace the types. For example "type": "cf_service_instance"
should be replaced with "type": "cloudfoundry_service_instance"
terraform.tfstate
file check the depends_on nodes
and make the adjustments.
"depends_on": [
"data.cf_service.abc"
"cf_service_instance.xyz"
"cf_route.example"
],
will become:
"depends_on": [
"data.cloudfoundry_service.abc"
"cloudfoundry_service_instance.xyz"
"cloudfoundry_route.example"
],
if there are no errors after calling terraform plan, and no changes are planned to be applied then the migration was successful.
cloudfoundry_app.github_release
and cloudfoundry_buildpack.github_release
now accept user
and password
attribute instead of Oauth access token
attribute (#119 thanks @janosbinder and @SzucsAti)cloudfoundry_config
was renamed into cloudfoundry_feature_flags
(#66 thanks @mevansam )cloudfoundry_quota
was split into cloudfoundry_org_quota
and cloudfoundry_space_quota
(thanks @psycofdj)New features:
cloudfoundry_route_service_binding
support (#16 thanks @psycofdj )cloudfoundry_app
docker support (#43 #84 thanks @samedguener @doktorgibson and @janosbinder )Bug fixes:
cloudfoundry_app
temp file leaks (#57 thanks @ArthurHlt and @SzucsAti)cloudfoundry_app
async app downloading (#88 thanks @jcarrothers-sap and @janosbinder) and app restage waitChores:
goimports
on the code + prune unused vendor libs (#48 thanks @ArthurHlt)Bug fixes:
New features:
#6 through #14 : This also permits to perform migration from orange-cloudfoundry/terraform-provider-cloudfoundry to terraform-providers/terraform-provider-cf described in Migration steps
#20
#24
#26
Internals: