-
Notifications
You must be signed in to change notification settings - Fork 87
resource_service_instance
ArthurHlt edited this page Aug 31, 2020
·
3 revisions
Provides a Cloud Foundry resource for managing Cloud Foundry Service Instances within spaces.
The following is a Service Instance created in the referenced space with the specified service plan.
data "cloudfoundry_service" "redis" {
name = "p-redis"
}
resource "cloudfoundry_service_instance" "redis1" {
name = "pricing-grid"
space = cloudfoundry_space.dev.id
service_plan = data.cloudfoundry_service.redis.service_plans["shared-vm"]
}
The following arguments are supported:
-
name
- (Required, String) The name of the Service Instance in Cloud Foundry -
service_plan
- (Required, String) The ID of the service plan -
space
- (Required, String) The ID of the space -
json_params
- (Optional, String) Json string of arbitrary parameters. Some services support providing additional configuration parameters within the provision request. By default, no params are provided. -
tags
- (Optional, List) List of instance tags. Some services provide a list of tags that Cloud Foundry delivers in VCAP_SERVICES Env variables. By default, no tags are assigned. -
recursive_delete
- (Optional, Bool) Default:false
. If settrue
, Cloud Foundry will delete any service bindings, service keys, and route mappings associated with the service instance. This flag should only be set when such dependent resources were provisioned outside of terraform, and need removal to enable deletion of the associated service instance.
The following attributes are exported:
-
id
- The GUID of the service instance
An existing Service Instance can be imported using its guid, e.g.
$ terraform import cloudfoundry_service.redis a-guid
-
create
- Default: 15 mins. Terraform will return an error if the resource was not deployed in the given timeframe. -
delete
- Default: 15 mins. Terraform will return an error if the resource was not deleted in the given timeframe. -
update
- Default: 15 mins. Terraform will return an error if the resource was not dupdated in the given timeframe.
- 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