-
Notifications
You must be signed in to change notification settings - Fork 87
resource_buildpack
ArthurHlt edited this page Aug 31, 2020
·
3 revisions
Provides a Cloud Foundry resource for managing Cloud Foundry admin buildpacks.
~> NOTE: This resource requires the provider to be authenticated with an account granted admin permissions.
The following example creates a Cloud Foundry buildpack .
resource "cloudfoundry_buildpack" "tomee" {
name = "tomcat-enterprise-edition"
path = "https://github.com/cloudfoundry-community/tomee-buildpack/releases/download/v3.17/tomee-buildpack-v3.17.zip"
position = "12"
enable = true
}
The following arguments are supported:
-
name
- (Required) The name of the Buildpack. -
position
- (Optional, Number) Specifies where to place the buildpack in the detection priority list. For more information, see the Buildpack Detection topic. When not provided, cloudfoundry assigns a default buildpack position. -
enabled
- (Optional, Boolean) Specifies whether to allow apps to be pushed with the buildpack, and defaults to true. -
locked
- (Optional, Boolean) Specifies whether buildpack is locked to prevent further updates, and defaults to false. -
labels
- (Optional, map string of string) Add labels as described here. Works only on cloud foundry with api >= v3.63. -
annotations
- (Optional, map string of string) Add annotations as described here. Works only on cloud foundry with api >= v3.63.
-
path
- (Required) An uri or path to target a zip file. this can be in the form of unix path (/my/path.zip
) or url path (http://zip.com/my.zip
) -
source_code_hash
- (Optional) Used to trigger updates. Must be set to a base64-encoded SHA256 hash of the path specified. The usual way to set this isbase64sha256(file("file.zip"))
, where "file.zip" is the local filename of the lambda function source archive.
~> NOTE: terraform-provider-zipper
can create zip file from tar.gz
, tar.bz2
, folder location
, git repo
locally or remotely and provide source_code_hash
.
Example Usage with zipper:
provider "zipper" {
skip_ssl_validation = false
}
resource "zipper_file" "fixture" {
source = "https://github.com/cloudfoundry-community/tomee-buildpack.git#v3.17"
output_path = "path/to/tomee-buildpack_v3.17.zip"
}
resource "cloudfoundry_buildpack" "tomee" {
name = "tomcat-enterprise-edition"
path = zipper_file.fixture.output_path
source_code_hash = zipper_file.fixture.output_sha
position = "12"
enable = true
}
The following attributes are exported:
-
id
- The GUID of the buildpack
The current buildpack can be imported using the buildpack
guid, e.g.
$ terraform import cloudfoundry_buildpack.tomee a-guid
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_domain
- cloudfoundry_info
- cloudfoundry_isolation_segment
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_route
- cloudfoundry_router_group
- cloudfoundry_service
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_stack
- cloudfoundry_user
- cloudfoundry_user_provided_service
- cloudfoundry_app
- cloudfoundry_asg
- cloudfoundry_buildpack
- cloudfoundry_default_asg
- cloudfoundry_domain
- cloudfoundry_evg
- cloudfoundry_feature_flag
- cloudfoundry_isolation_segment
- cloudfoundry_isolation_segment_entitlement
- cloudfoundry_network_policy
- cloudfoundry_org
- cloudfoundry_org_quota
- cloudfoundry_org_users
- cloudfoundry_private_domain_access
- cloudfoundry_route
- cloudfoundry_route_service_binding
- cloudfoundry_service_broker
- cloudfoundry_service_instance
- cloudfoundry_service_key
- cloudfoundry_service_plan_access
- cloudfoundry_space
- cloudfoundry_space_quota
- cloudfoundry_space_users
- cloudfoundry_user
- cloudfoundry_user_provided_service