Skip to content

Commit

Permalink
Merge branch 'feat-app-subscription' of https://github.com/SAP/terraf…
Browse files Browse the repository at this point in the history
…orm-provider-btp into feat-app-subscription
  • Loading branch information
lechnerc77 committed Jul 11, 2023
2 parents ba6f037 + 7767292 commit f12eb04
Show file tree
Hide file tree
Showing 47 changed files with 21,580 additions and 194 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/cleanup-action-caches.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: cleanup gh actions caches
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3

- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH="refs/pull/${{ github.event.pull_request.number }}/merge"
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53 changes: 53 additions & 0 deletions docs/data-sources/subaccount_service_instance.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
page_title: "btp_subaccount_service_instance Data Source - terraform-provider-btp"
subcategory: ""
description: |-
Gets details about a specific provisioned service instance such as its name, id, platform to which it belongs, the last operation performed, and more.
---

# btp_subaccount_service_instance (Data Source)

Gets details about a specific provisioned service instance such as its name, id, platform to which it belongs, the last operation performed, and more.

## Example Usage

```terraform
# look up a service instance by its ID and subaccount ID
data "btp_subaccount_service_instance" "by_id" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
id = "bc8a216f-1184-49dc-b4b4-17cfe2828965"
}
# look up a service instance by its name and subaccount ID
data "btp_subaccount_service_instance" "by_name" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
name = "my-xsuaa-application"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `subaccount_id` (String) The ID of the subaccount.

### Optional

- `id` (String) The ID of the service instance.
- `name` (String) The name of the service instance.

### Read-Only

- `context` (Map of String) Contextual data for the resource.
- `created_date` (String) The date and time when the resource was created in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `labels` (Map of Set of String) Set of words or phrases assigned to the service instance.
- `last_modified` (String) The date and time when the resource was last modified in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `parameters` (String) The configuration parameters for the service instance.
- `platform_id` (String) The platform ID.
- `ready` (Boolean)
- `referenced_instance_id` (String) The ID of the instance to which the service instance refers.
- `serviceplan_id` (String) The ID of the service plan.
- `shared` (Boolean) Shows whether the service instance is shared.
- `state` (String) The current state of the service instance.
- `usable` (Boolean) Shows whether the resource can be used.
64 changes: 64 additions & 0 deletions docs/data-sources/subaccount_service_instances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
page_title: "btp_subaccount_service_instances Data Source - terraform-provider-btp"
subcategory: ""
description: |-
Gets all service instances in a subaccount.
---

# btp_subaccount_service_instances (Data Source)

Gets all service instances in a subaccount.

## Example Usage

```terraform
# look up all available service instances for a given subaccount
data "btp_subaccount_service_instances" "all" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
}
# look up all available service instances in a subaccount which are ready to be used
data "btp_subaccount_service_instances" "ready" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
fields_filter = "ready eq 'true'"
}
# look up all available service instance in a subaccount which have a certain label assigned
data "btp_subaccount_service_instances" "by_label" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
labels_filter = "labelname eq 'labelvalue'"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `subaccount_id` (String) The ID of the subaccount.

### Optional

- `fields_filter` (String) Filters the instances based on their fields. For example, to list all instances that are usable, use "usable eq 'true'".
- `labels_filter` (String) Filters the instances based on the label query. For example, to list all instances that are available in a production landscape, use "landscape eq 'production'".

### Read-Only

- `id` (String, Deprecated) The ID of the subaccount.
- `values` (Attributes List) (see [below for nested schema](#nestedatt--values))

<a id="nestedatt--values"></a>
### Nested Schema for `values`

Read-Only:

- `context` (Map of String) Contextual data for the resource.
- `created_date` (String) The date and time when the resource was created in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `id` (String) The ID of the service instance.
- `labels` (Map of Set of String) The set of words or phrases assigned to the service instance.
- `last_modified` (String) The date and time when the resource was last modified in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `name` (String) The name of the service instance.
- `platform_id` (String) The platform ID.
- `ready` (Boolean)
- `serviceplan_id` (String) The ID of the service plan.
- `usable` (Boolean) Shows whether the resource can be used.
54 changes: 54 additions & 0 deletions docs/data-sources/subaccount_service_offering.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
---
page_title: "btp_subaccount_service_offering Data Source - terraform-provider-btp"
subcategory: ""
description: |-
Gets details about a specific service offering such as its ID, name, description, metadata, the associated service brokers, and more.
---

# btp_subaccount_service_offering (Data Source)

Gets details about a specific service offering such as its ID, name, description, metadata, the associated service brokers, and more.

## Example Usage

```terraform
# look up offering by ID and subaccount ID
data "btp_subaccount_service_offering" "by_id" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
id = "4e953cf1-7eda-4ebb-a58c-02c6ebfe45fb"
}
# look up offering by offering name and subaccount ID
data "btp_subaccount_service_offering" "by_name" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
name = "auditlog-management"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `subaccount_id` (String) The ID of the subaccount.

### Optional

- `id` (String) The ID of the service offering.
- `name` (String) The name of the service offering.

### Read-Only

- `allow_context_updates` (Boolean) Shows whether the context for the service offering can be updated.
- `bindable` (Boolean) Shows whether the service offering is bindable.
- `bindings_retrievable` (Boolean) Shows whether the bindings associated with the service offering can be retrieved.
- `broker_id` (String) The ID of the broker that provides the service plan.
- `catalog_id` (String) The ID of the service offering as provided by the catalog.
- `catalog_name` (String) The catalog name of the service offering.
- `created_date` (String) The date and time when the resource was created in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `description` (String) The description of the service offering.
- `instances_retrievable` (Boolean) Shows whether the service instances associated with the service offering can be retrieved.
- `last_modified` (String) The date and time when the resource was last modified in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `plan_updateable` (Boolean) Shows whether the offered plan can be updated.
- `ready` (Boolean) Shows whether the service offering is ready to be advertised.
- `tags` (Set of String) The list of tags for the service offering.
81 changes: 81 additions & 0 deletions docs/data-sources/subaccount_service_offerings.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
---
page_title: "btp_subaccount_service_offerings Data Source - terraform-provider-btp"
subcategory: ""
description: |-
Lists the services your subaccount is entitled to use in your runtime environment.
---

# btp_subaccount_service_offerings (Data Source)

Lists the services your subaccount is entitled to use in your runtime environment.

## Example Usage

```terraform
# look up all service offerings in a given subaccount
data "btp_subaccount_service_offerings" "all" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
}
# look up services offerings available on sapbtp environment in a given subaccount
data "btp_subaccount_service_offerings" "sapbtp" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
environment = "sapbtp"
}
# look up services offerings available on kubernetes environment in a given subaccount
data "btp_subaccount_service_offerings" "k8s" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
environment = "kubernetes"
}
# look up services offerings wich have a specifc label assigned in a given subaccount
data "btp_subaccount_service_offerings" "labeled" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
labels_filter = "a_label eq 'label-value'"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `subaccount_id` (String) The ID of the subaccount.

### Optional

- `environment` (String) Lists services to be consumed in a Cloud Foundry or Kubernetes-native way. Valid values are:

| value | description |
| --- | --- |
| cloudfoundry | Cloud Foundry |
| kubernetes | Kubernetes |
- `fields_filter` (String) Filters the response based on the field query. For example, use "name eq 'my service offering name'".
- `labels_filter` (String) Filters the response based on the label query. For example, to list all the service offerings associated with the testing environment, use "environment eq 'test'".

### Read-Only

- `id` (String, Deprecated) The ID of the subaccount.
- `values` (Attributes List) (see [below for nested schema](#nestedatt--values))

<a id="nestedatt--values"></a>
### Nested Schema for `values`

Read-Only:

- `allow_context_updates` (Boolean) Shows whether the context for the service offering can be updated.
- `bindable` (Boolean) Shows whether the service offering is bindable.
- `bindings_retrievable` (Boolean) Shows whether the bindings associated with the service offering can be retrieved.
- `broker_id` (String) The ID of the broker that provides the service plan.
- `catalog_id` (String) The ID of the service offering as provided by the catalog.
- `catalog_name` (String) The catalog name of the service offering.
- `created_date` (String) The date and time when the resource was created in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `description` (String) The description of the service offering.
- `id` (String) The ID of the service offering.
- `instances_retrievable` (Boolean) Shows whether the service instances associated with the service offering can be retrieved.
- `last_modified` (String) The date and time when the resource was last modified in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `name` (String) The name of the service offering.
- `plan_updateable` (Boolean) Shows whether the offered plan can be updated.
- `ready` (Boolean) Shows whether the service offering is ready to be advertised.
- `tags` (Set of String) The list of tags for the service offering.
52 changes: 52 additions & 0 deletions docs/data-sources/subaccount_service_plan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
page_title: "btp_subaccount_service_plan Data Source - terraform-provider-btp"
subcategory: ""
description: |-
Gets details about a specific service plan such as its name, description, metadata, and more.
---

# btp_subaccount_service_plan (Data Source)

Gets details about a specific service plan such as its name, description, metadata, and more.

## Example Usage

```terraform
# look up a sercvice plan by ID and subaccount ID
data "btp_subaccount_service_plan" "by_id" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
id = "b50d1b0b-2059-4f21-a014-2ea87752eb48"
}
# look up a sercvice plan by plan name and offering name and subaccount ID
data "btp_subaccount_service_plan" "by_name" {
subaccount_id = "6aa64c2f-38c1-49a9-b2e8-cf9fea769b7f"
name = "free"
offering_name = "alert-notification"
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `subaccount_id` (String) The ID of the subaccount.

### Optional

- `id` (String) The ID of the service plan.
- `name` (String) The name of the service plan.
- `offering_name` (String) The name of the service offering of the plan.

### Read-Only

- `bindable` (Boolean) Shows whether the service plan is bindable.
- `catalog_id` (String) The ID of the service plan in the service broker catalog.
- `catalog_name` (String) The name of the associated service broker catalog.
- `created_date` (String) The date and time when the resource was created in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `description` (String) The description of the service plan.
- `free` (Boolean) Shows whether the service plan is free.
- `last_modified` (String) The date and time when the resource was last modified in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) format.
- `ready` (Boolean) Shows whether the service plan is ready.
- `serviceoffering_id` (String) The ID of the service offering.
Loading

0 comments on commit f12eb04

Please sign in to comment.