v0.10.0
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
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:
- (Optional) Migrate to terraform >= 0.12.x and follow migration step: https://www.terraform.io/upgrade-guides/0-12.html
- Download
cf-hcl-migration
tool in the release 0.10.0.
this tool only change your tf files for preparing migration made by the provider. - Run
cf-hcl-migration ./
tool on the root folder of your terraform files. - Run
cf-hcl-migration <module path>
tool on the root folder of your terraform files.
This tool migrate your terraform file config for onlycloudfoundry_app
andcloudfoundry_buildpack
resource to change to new upload style
if yourtf
files doesn't use those resources no need to run this tool - Run
terraform apply
in the root folder of your terraform.
Changelog
resource behavior change: only manage cloudfoundry elements provisionned by TF
- Default sec group behaviour change: resource will not override all sec group set anymore but rather only manage ASGs defined in the resource
- Env var group behaviour change: resource will only modify env var group managed by itself (will not destroy or affect previous env vars set outside of terraform)
- Isolation segment entitlement behaviour change: resource will only modify entitlement managed by itself (do not destroy or affect previous entitlement set outside of terraform)
target
inroute
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
andcloudfoundry_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 thecloudfoundry_route
resource without having unexpected behaviors (that's also close #97)allow_ssh
attribute incloudfoundry_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 totrue
during creation phase if not set.enable_ssh
attribute incloudfoundry_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 totrue
during creation phase if not set.- removed from info
user
,password
, andapi endpoint
because the first 2 will be in plain text in tfstate and the last one is unnecessary as user write it inprovider
configuration. - When an isolation segment
name
changes, force creating a new one. - isolation segment entitlement has
default
attribute in cloudfoundry in order to set isolation segment as default segment to all specified orgs. Relates to #8. - Remove
route
attribute oncloudfoundry_app
(was deprecated) - Force new route when domain id change in the resource ( close #206 )
enhancements and new features
- Support terraform 0.12.0 and higher (this also support terraform 0.11.14)
- Add
tags
parameter to user provided service - Add
params_json
toservice_key
resource - Add
service_instance
data source (close PR #99) - Add
service_key
data source (close PR #94) - Add
purge_when_delete
param to provider, when it's true purge when deleting a resource (e.g.: service instance, service broker). (fix #173) - Fix #197 by looking for
TF_LOG
equals toinfo
ortrace
. If found request trace will be given in tf logs. - Fix #167 by
- deprecating
users
attribute oncloudfoundry_space
andcloudfoundry_org
resources. - Add
cloudfoundry_space_users
andcloudfoundry_org_users
resources which now manage users. An extra specificforce
attribute, enables to delete existing other users provisioned outside of the resource.
- deprecating
- Add
cloudfoundry_app
data source (and close #91) - Add
cloudfoundry_route
data source - allow to specify service binding params as raw json string (close #199 and associated PRS #200 and #202)
- When updating
cloudfoundry_app
resource, it will only deploy or restage or simply restart app if needed by changes. (Restage and restart was not implemented) - Add Blue green support (\o/) on
cloudfoundry_app
resource, complete rewriting has been made to do this. To activate blue-green, you must set attributestrategy
toblue-green
. (see doc) - Add computed attribute
services
to resourcecloudfoundry_service_broker
: a Map of service service GUIDs keyed by service name. - Add support for metadata which is available only on cloud foundry with api >= v3.63
- Support automatic refresh of the service_broker resource when catalog change. By default if catalog is not reachable auto-refresh will be silently deactivate, use new attribute
fail_when_catalog_not_accessible
and set it to true to know when catalog is not reachable. (this close #170 ) - Add resource to support network policy (this close #33 )
bug fixes
username
andpassword
are now optional ifclient_id
andclient_secret
are set and have sufficient permissions (authorities) to manipulate cloudfoundry instance- Fix #184
- Mark as sensitive credentials in user provided service (this close #96)
- fix #107
- fix #172 which close PR #188
- only update a route if it needs updating (close #105 ). Mainly fixed with complete refactoring
- Removed
conflict
keyword betweenpath
andport/random_port
in resourceroute
(it seems it was conflicting because of mishandled route endpoint creation which has been fixed) - Fix
service_binding
attribute oncloudfoundry_app
resource to make orders not matters. - Fix
routes
attribute signature oncloudfoundry_app
resource, only one pair of route/port was allowed. By fixing this it allows tcp route declaration.
internal refactorings and improvements
- Full stream upload for buildpack (no temporary files/folder created, direct upload from http url if found by piping)
Thanks for contributions and help
Thanks to: