Skip to content

Commit b88eddc

Browse files
authored
Merge pull request #4 from indentapis/66DA64F8B991686137E7F2FF04654B1C
sync(provider): pull from indent core
2 parents 491fd41 + 2625b58 commit b88eddc

File tree

10 files changed

+244
-26
lines changed

10 files changed

+244
-26
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
### terraform-provider-indent
22

3-
Auth is currently handled with the `indent` cli. To log in:
3+
Auth can be handled either with a Google Service Account JSON file, or with the `indent` cli.
44

5-
`$ indent auth login --space my-space-name`
5+
To use the `indent` cli:
6+
$ indent auth login --space my-space-name
67

78
To verify you have authenticated successfully, you can check `auth view`:
89

@@ -27,6 +28,7 @@ Once you've successfully authenticated, you can initialize the provider:
2728
```terraform
2829
provider "indent" {
2930
space = "my-space-name"
31+
// json_key_file = "/path/to/file.json"
3032
}
3133
```
3234

docs/data-sources/webhook.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
page_title: "indent_webhook Data Source - indent"
44
subcategory: ""
55
description: |-
6+
67
---
78

89
# indent_webhook (Data Source)
910

11+
12+
1013
## Example Usage
1114

1215
```terraform
@@ -16,7 +19,6 @@ data "indent_webhook" "provider_indent_webhook" {
1619
```
1720

1821
<!-- schema generated by tfplugindocs -->
19-
2022
## Schema
2123

2224
### Optional
@@ -32,16 +34,15 @@ data "indent_webhook" "provider_indent_webhook" {
3234
- `url` (String) URL of deployed Webhook; requested when a permission is granted or revoked
3335

3436
<a id="nestedblock--handler"></a>
35-
3637
### Nested Schema for `handler`
3738

3839
Optional:
3940

4041
- `resource_kinds` (List of String) Resource kinds webhook supports
4142
- `type` (String) Type of webhook (pullUpdate/applyUpdate/decision)
4243

43-
<a id="nestedblock--header"></a>
4444

45+
<a id="nestedblock--header"></a>
4546
### Nested Schema for `header`
4647

4748
Required:
@@ -52,3 +53,5 @@ Optional:
5253

5354
- `credential` (String) Name of Credential to use as header value (instead of string value)
5455
- `value` (String) String to use as header value (instead of Credential)
56+
57+

docs/index.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ description: |-
1515
```terraform
1616
/**
1717
18-
Auth is currently handled with the `indent` cli.
18+
Auth can be handled either with a Google Service Account JSON file, or with the `indent` cli.
19+
20+
To use the `indent` cli:
1921
$ indent auth login --space my-space-name
2022
2123
To verify you have authenticated successfully, you can check `auth view`:
@@ -32,11 +34,20 @@ $ indent auth view --space my-space-name 2>&1 | jq
3234
...
3335
}
3436
}
37+
38+
To use a Service Account JSON file, simply reference it in the provider config.
3539
**/
3640
3741
provider "indent" {
42+
// use cli auth
3843
space = "my-space-name"
3944
}
45+
46+
provider "indent" {
47+
// use static service account auth
48+
space = "my-space-name"
49+
json_key_file = "/config/service-account-281938728bdd.json"
50+
}
4051
```
4152

4253
<!-- schema generated by tfplugindocs -->
@@ -45,3 +56,8 @@ provider "indent" {
4556
### Required
4657

4758
- `space` (String) The Indent space name to work in
59+
60+
### Optional
61+
62+
- `json_key_file` (String) Path to Google Developers service account JSON key file
63+
- `staging` (Boolean) Use Indent staging environment

docs/resources/webhook.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,13 @@
33
page_title: "indent_webhook Resource - indent"
44
subcategory: ""
55
description: |-
6+
67
---
78

89
# indent_webhook (Resource)
910

11+
12+
1013
## Example Usage
1114

1215
```terraform
@@ -31,14 +34,19 @@ resource "indent_webhook" "integration-okta-webhook" {
3134
}
3235
}
3336
34-
output "new_webhook_id" {
35-
description = "block ID of our new webhook"
36-
value = indent_webhook.new_webhook.id
37+
output "okta_webhook_id" {
38+
description = "block ID of the new webhook"
39+
value = indent_webhook.integration-okta-webhook.id
40+
}
41+
42+
output "okta_webhook_secret" {
43+
description = "signing secret of the new webhook"
44+
value = indent_webhook.integration-okta-webhook.secret
45+
sensitive = true
3746
}
3847
```
3948

4049
<!-- schema generated by tfplugindocs -->
41-
4250
## Schema
4351

4452
### Required
@@ -60,16 +68,15 @@ output "new_webhook_id" {
6068
- `space_name` (String) Name of the Space the webhook is in
6169

6270
<a id="nestedblock--handler"></a>
63-
6471
### Nested Schema for `handler`
6572

6673
Optional:
6774

6875
- `resource_kinds` (List of String) Resource kinds webhook supports
6976
- `type` (String) Type of webhook (pullUpdate/applyUpdate/decision)
7077

71-
<a id="nestedblock--header"></a>
7278

79+
<a id="nestedblock--header"></a>
7380
### Nested Schema for `header`
7481

7582
Required:
@@ -80,3 +87,5 @@ Optional:
8087

8188
- `credential` (String) Name of Credential to use as header value (instead of string value)
8289
- `value` (String) String to use as header value (instead of Credential)
90+
91+

examples/provider/provider.tf

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/**
22
3-
Auth is currently handled with the `indent` cli.
3+
Auth can be handled either with a Google Service Account JSON file, or with the `indent` cli.
4+
5+
To use the `indent` cli:
46
$ indent auth login --space my-space-name
57
68
To verify you have authenticated successfully, you can check `auth view`:
@@ -17,8 +19,17 @@ $ indent auth view --space my-space-name 2>&1 | jq
1719
...
1820
}
1921
}
22+
23+
To use a Service Account JSON file, simply reference it in the provider config.
2024
**/
2125

2226
provider "indent" {
27+
// use cli auth
2328
space = "my-space-name"
2429
}
30+
31+
provider "indent" {
32+
// use static service account auth
33+
space = "my-space-name"
34+
json_key_file = "/config/service-account-281938728bdd.json"
35+
}

go.mod

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,7 @@ module go.indent.com/terraform-provider-indent
22

33
go 1.18
44

5-
require (
6-
github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
7-
go.indent.com/indent-go v0.0.9-0.20230119081731-51229bc93f9b
8-
)
5+
require github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1
96

107
require (
118
cloud.google.com/go v0.34.0 // indirect
@@ -42,19 +39,20 @@ require (
4239
github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect
4340
github.com/vmihailenco/tagparser v0.1.1 // indirect
4441
github.com/zclconf/go-cty v1.12.1 // indirect
42+
go.indent.com/indent-go v0.0.9-0.20230130182250-ded99026d98d // indirect
4543
go.uber.org/atomic v1.5.0 // indirect
4644
go.uber.org/multierr v1.3.0 // indirect
4745
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee // indirect
4846
go.uber.org/zap v1.14.0 // indirect
4947
golang.org/x/lint v0.0.0-20190930215403-16217165b5de // indirect
50-
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
48+
golang.org/x/mod v0.6.0 // indirect
5149
golang.org/x/net v0.3.1-0.20221206200815-1e63c2f08a10 // indirect
5250
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
5351
golang.org/x/sys v0.3.0 // indirect
5452
golang.org/x/text v0.5.0 // indirect
55-
golang.org/x/tools v0.1.12 // indirect
53+
golang.org/x/tools v0.2.0 // indirect
5654
google.golang.org/appengine v1.6.6 // indirect
57-
google.golang.org/genproto v0.0.0-20200711021454-869866162049 // indirect
55+
google.golang.org/genproto v0.0.0-20201019141844-1ed22bb0c154 // indirect
5856
google.golang.org/grpc v1.50.1 // indirect
5957
google.golang.org/protobuf v1.28.1 // indirect
6058
honnef.co/go/tools v0.0.1-2019.2.3 // indirect

0 commit comments

Comments
 (0)