Releases: cloudfoundry-community/terraform-provider-cloudfoundry
v0.12.2
This include changes:
Fixes
- V3 metadata are better supported in the provider
- Case insensitivity on UAA (as uaa do actually)
- Route binding resource update/delete/read on user provided service was failling #251
- Fix null value on map normalizer #254
Features
- Add metadata on service broker
Internal change
- use go 1.14
- install script with versionning
thanks to
v0.12.0
This include changes:
Fixes
- app_resource:
Features
- Added datasource for user provided service - #235
- datasource service broker
- filter also by Service broker guid - https://github.com/cloudfoundry-community/terraform-provider-cf/pull/234/files
thanks to
v0.11.0
Bug fixes:
- fix #225 (see related commit on cli fork: cloudfoundry-community/cloudfoundry-cli@d31423c )
- Fix application state from stopped flag computation (see: #230 )
Enhancement:
- Login through sso passcode with param
sso_passcode
(see: #227 ) - Store tokens to a file with param
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:
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:
0.9.9
Breaking changes:
- the provider and all its resources have been renamed from "cf" to "cloudfoundry" (#44 thanks @mevansam ). Rename the provider distribution binary into
terraform-provider-cloudfoundry
when installing it. Refer to Using the provider readme for further details. Upgrading to this version requires the following procedure:- back up the tf files and the
terraform.tfstate
file - in all tf files replace resource/data "cf_..." with "cloudfoundry_...". For example
sed 's#resource \"cf_#resource \"cloudfoundry_#g' old.tf | sed 's#data \"cf_#data \"cloudfoundry_#g'
- in the
terraform.tfstate
file replace the types. For example"type": "cf_service_instance"
should be replaced with"type": "cloudfoundry_service_instance"
- in the
terraform.tfstate
file check thedepends_on nodes
and make the adjustments.- For example:
- back up the tf files and the
"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
andcloudfoundry_buildpack.github_release
now acceptuser
andpassword
attribute instead of Oauth accesstoken
attribute (#119 thanks @janosbinder and @SzucsAti)cloudfoundry_config
was renamed intocloudfoundry_feature_flags
(#66 thanks @mevansam )cloudfoundry_quota
was split intocloudfoundry_org_quota
andcloudfoundry_space_quota
(thanks @psycofdj)
New features:
cloudfoundry_route_service_binding
support (#16 thanks @psycofdj )- All resources can now be imported (#6 thanks @ArthurHlt )
- Asynchronous provisioning/deprovisioning and update of cf_service_instance (#51 thanks @samedguener)
cloudfoundry_app
docker support (#43 #84 thanks @samedguener @doktorgibson and @janosbinder )
Bug fixes:
- Documentation spell check and fixes (#55 #66 thanks @psycofdj @gberche-orange and #112 @lixilin2301)
- Optional resource attributes now have a documented default (#59 thanks @psycofdj)
- Fixed
cloudfoundry_app
temp file leaks (#57 thanks @ArthurHlt and @SzucsAti) - Crash during
cloudfoundry_app
async app downloading (#88 thanks @jcarrothers-sap and @janosbinder) and app restage wait - Many reliability w.r.t. missing resources on routes, service_instances, service_key (#131 #138 #137 #133 #135 #134 #132 thanks @jcarrothers-sap)
Chores:
- CI improvements,
- including cleanups of leaked resource (thanks @janosbinder)
- linter automation (#53 thanks @psycofdj)
- Acceptance test environment maintenance and upgrades (thanks @mevansam)
- improvements following #38
- Idomatic go style: Naked return (#47 thanks @psycofdj)
- run
goimports
on the code + prune unused vendor libs (#48 thanks @ArthurHlt) - Missing error checks (#49 thanks @ArthurHlt)
- Clean ups: #45, #46