generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 41
/
text_data_source.go
36 lines (31 loc) · 956 Bytes
/
text_data_source.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package secret
import (
"github.com/harness/terraform-provider-harness/helpers"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
)
func DataSourceSecretText() *schema.Resource {
resource := &schema.Resource{
Description: "DataSource for looking up secret of type secret text.",
ReadContext: resourceSecretTextRead,
Schema: map[string]*schema.Schema{
"secret_manager_identifier": {
Description: "Identifier of the Secret Manager used to manage the secret.",
Type: schema.TypeString,
Computed: true,
},
"value_type": {
Description: "This has details to specify if the secret value is Inline or Reference.",
Type: schema.TypeString,
Computed: true,
},
"value": {
Description: "Value of the Secret",
Type: schema.TypeString,
Sensitive: true,
Computed: true,
},
},
}
helpers.SetMultiLevelDatasourceSchema(resource.Schema)
return resource
}