Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add desc to schema for google_endpoints_service #6630

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .changelog/3667.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
97 changes: 58 additions & 39 deletions google/resource_endpoints_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,70 +30,85 @@ func resourceEndpointsService() *schema.Resource {

Schema: map[string]*schema.Schema{
"service_name": {
Type: schema.TypeString,
Required: true,
ForceNew: true,
Type: schema.TypeString,
Required: true,
ForceNew: true,
Description: `The name of the service. Usually of the form $apiname.endpoints.$projectid.cloud.goog.`,
},
"openapi_config": {
Type: schema.TypeString,
Optional: true,
ConflictsWith: []string{"grpc_config", "protoc_output_base64"},
Description: `The full text of the OpenAPI YAML configuration as described here. Either this, or both of grpc_config and protoc_output_base64 must be specified.`,
},
"grpc_config": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: `The full text of the Service Config YAML file (Example located here). If provided, must also provide protoc_output_base64. open_api config must not be provided.`,
},
"protoc_output_base64": {
Type: schema.TypeString,
Optional: true,
Type: schema.TypeString,
Optional: true,
Description: `The full contents of the Service Descriptor File generated by protoc. This should be a compiled .pb file, base64-encoded.`,
},
"project": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
Description: `The project ID that the service belongs to. If not provided, provider project is used.`,
},
"config_id": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The autogenerated ID for the configuration that is rolled out as part of the creation of this resource. Must be provided to compute engine instances as a tag.`,
},
"apis": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Computed: true,
Description: `A list of API objects.`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The FQDN of the API as described in the provided config.`,
},
"syntax": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `SYNTAX_PROTO2 or SYNTAX_PROTO3.`,
},
"version": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `A version string for this api. If specified, will have the form major-version.minor-version, e.g. 1.10.`,
},
"methods": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Computed: true,
Description: `A list of Method objects.`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The simple name of this method as described in the provided config.`,
},
"syntax": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `SYNTAX_PROTO2 or SYNTAX_PROTO3.`,
},
"request_type": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The type URL for the request to this API.`,
},
"response_type": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The type URL for the response from this API.`,
},
},
},
Expand All @@ -102,21 +117,25 @@ func resourceEndpointsService() *schema.Resource {
},
},
"dns_address": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The address at which the service can be found - usually the same as the service name.`,
},
"endpoints": {
Type: schema.TypeList,
Computed: true,
Type: schema.TypeList,
Computed: true,
Description: `A list of Endpoint objects.`,
Elem: &schema.Resource{
Schema: map[string]*schema.Schema{
"name": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The simple name of the endpoint as described in the config.`,
},
"address": {
Type: schema.TypeString,
Computed: true,
Type: schema.TypeString,
Computed: true,
Description: `The FQDN of the endpoint as described in the config.`,
},
},
},
Expand Down