Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lajos88 committed Oct 13, 2020
1 parent 4cd7e47 commit 63ec0a2
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 20 deletions.
6 changes: 3 additions & 3 deletions configcat/resource_setting_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,14 @@ func resourceSettingValueCreateOrUpdate(ctx context.Context, d *schema.ResourceD

d.SetId(fmt.Sprintf("%s.%d", environmentID, settingID))

readErr2 := resourceSettingValueReadInternal(ctx, d, m, true)
if readErr2 != nil {
readErr := resourceSettingValueReadInternal(ctx, d, m, true)
if readErr != nil {
if _, ok := err.(NotFoundError); ok {
d.SetId("")
return diags
}

return diag.FromErr(readErr2)
return diag.FromErr(readErr)
}

return diags
Expand Down
7 changes: 5 additions & 2 deletions docs/data-sources/configs.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# configcat_configs Resource

Use this data source to access information about an existing Config. [Used API](https://api.configcat.com/docs/index.html#operation/get-configs)
Use this data source to access information about an existing Config.

## Example Usage

Expand Down Expand Up @@ -32,4 +32,7 @@ output "config_id" {
### The `configs` [list](https://www.terraform.io/docs/configuration/types.html#list-) block

* `config_id` - The unique Config ID.
* `name` - The name of the Config.
* `name` - The name of the Config.

## User APIs
[Read](https://api.configcat.com/docs/index.html#operation/get-configs)
8 changes: 5 additions & 3 deletions docs/data-sources/environments.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# configcat_environments Resource

Use this data source to access information about an existing Environment. [Used API](https://api.configcat.com/docs/index.html#operation/get-environments)

Use this data source to access information about an existing Environment.
## Example Usage

```hcl
Expand Down Expand Up @@ -32,4 +31,7 @@ output "environment_id" {
### The `environments` [list](https://www.terraform.io/docs/configuration/types.html#list-) block

* `environment_id` - The unique Environment ID.
* `name` - The name of the Environment.
* `name` - The name of the Environment.

## Used APIs
- [Read](https://api.configcat.com/docs/index.html#operation/get-environments)
7 changes: 5 additions & 2 deletions docs/data-sources/products.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# configcat_products Resource

Use this data source to access information about an existing Product. [Used API](https://api.configcat.com/docs/index.html#operation/get-products)
Use this data source to access information about an existing Product.

## Example Usage

Expand All @@ -26,4 +26,7 @@ output "product_id" {
### The `products` [list](https://www.terraform.io/docs/configuration/types.html#list-) block

* `product_id` - The unique Product ID.
* `name` - The name of the Product.
* `name` - The name of the Product.

## Used APIs
- [Read](https://api.configcat.com/docs/index.html#operation/get-products)
7 changes: 5 additions & 2 deletions docs/data-sources/settings.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# configcat_settings Resource

Use this data source to access information about an existing Feature Flag/Setting. [Used API](https://api.configcat.com/docs/index.html#operation/get-settings)
Use this data source to access information about an existing Feature Flag/Setting.

## Example Usage

Expand Down Expand Up @@ -40,4 +40,7 @@ output "setting_id" {
* `key` - The key of the Feature Flag/Setting.
* `name` - The name of the Setting.
* `hint` - The hint of the Setting.
* `setting_type` - The Setting's type. Available values: `boolean`|`string`|`int`|`double`.
* `setting_type` - The Setting's type. Available values: `boolean`|`string`|`int`|`double`.

## Used APIs:
- [Read](https://api.configcat.com/docs/index.html#operation/get-settings)
11 changes: 6 additions & 5 deletions docs/resources/setting.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
# configcat_setting Resource

Creates and manages a Feature Flag/Setting.
Used APIs:
* [Read](https://api.configcat.com/docs/index.html#operation/get-setting)
* [Create](https://api.configcat.com/docs/index.html#operation/create-setting)
* [Update](https://api.configcat.com/docs/index.html#operation/update-setting)
* [Delete](https://api.configcat.com/docs/index.html#operation/delete-setting)

## Example Usage

Expand Down Expand Up @@ -44,3 +39,9 @@ output "setting_id" {
## Attribute Reference

* `id` - The unique Setting ID.

## Used APIs:
* [Read](https://api.configcat.com/docs/index.html#operation/get-setting)
* [Create](https://api.configcat.com/docs/index.html#operation/create-setting)
* [Update](https://api.configcat.com/docs/index.html#operation/update-setting)
* [Delete](https://api.configcat.com/docs/index.html#operation/delete-setting)
7 changes: 4 additions & 3 deletions docs/resources/setting_value.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# configcat_setting_value Resource

Initializes/updates a Feature Flag/Setting's value.
Used APIs:
* [Read](https://api.configcat.com/docs/#operation/get-setting-value)
* [Update](https://api.configcat.com/docs/#operation/replace-setting-value)

## Example Usage

Expand Down Expand Up @@ -95,3 +92,7 @@ The `init_only` argument's default value is `true` which means that this resourc
This prevents overriding the Feature Flag/Setting's modified values on the [ConfigCat Dashboard](https://app.configcat.com).

If you want to fully manage the Feature Flag/Setting's value from Terraform, set `init_only` argument to `false`. After setting the`init_only` argument to `false` each terraform run will update the Feature Flag/Setting's value to the state provided in Terraform.

## Used APIs:
* [Read](https://api.configcat.com/docs/#operation/get-setting-value)
* [Update](https://api.configcat.com/docs/#operation/replace-setting-value)

0 comments on commit 63ec0a2

Please sign in to comment.