Skip to content

Commit b65daf7

Browse files
committed
build provider_meta feturea into provider
1 parent fc4ba46 commit b65daf7

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

internal/provider/provider.go

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,38 @@ func (p *AwsCloudControlApiProvider) GetDataSources(ctx context.Context) (map[st
462462
return dataSources, diags
463463
}
464464

465+
func (p *AwsCloudControlApiProvider) GetMetaSchema(ctx context.Context) (tfsdk.Schema, diag.Diagnostics) {
466+
return tfsdk.Schema{
467+
Version: 1,
468+
Attributes: map[string]tfsdk.Attribute{
469+
"user_agent": {
470+
Attributes: tfsdk.ListNestedAttributes(
471+
map[string]tfsdk.Attribute{
472+
"product_name": {
473+
Type: types.StringType,
474+
Description: "Product name. At least one of `product_name` or `comment` must be set.",
475+
Required: true,
476+
},
477+
"product_version": {
478+
Type: types.StringType,
479+
Description: "Product version. Optional, and should only be set when `product_name` is set.",
480+
Optional: true,
481+
},
482+
"comment": {
483+
Type: types.StringType,
484+
Description: "User-Agent comment. At least one of `comment` or `product_name` must be set.",
485+
Optional: true,
486+
},
487+
},
488+
tfsdk.ListNestedAttributesOptions{},
489+
),
490+
Description: "Product details to append to User-Agent string in all AWS API calls.",
491+
Optional: true,
492+
},
493+
},
494+
}, nil
495+
}
496+
465497
func (p *AwsCloudControlApiProvider) CloudControlApiClient(_ context.Context) *cloudcontrol.Client {
466498
return p.ccClient
467499
}

0 commit comments

Comments
 (0)