@@ -33,11 +33,12 @@ type GoogleClientConfigDataSource struct {
33
33
type GoogleClientConfigModel struct {
34
34
// Id could/should be removed in future as it's not necessary in the plugin framework
35
35
// https://github.com/hashicorp/terraform-plugin-testing/issues/84
36
- Id types.String `tfsdk:"id"`
37
- Project types.String `tfsdk:"project"`
38
- Region types.String `tfsdk:"region"`
39
- Zone types.String `tfsdk:"zone"`
40
- AccessToken types.String `tfsdk:"access_token"`
36
+ Id types.String `tfsdk:"id"`
37
+ Project types.String `tfsdk:"project"`
38
+ Region types.String `tfsdk:"region"`
39
+ Zone types.String `tfsdk:"zone"`
40
+ AccessToken types.String `tfsdk:"access_token"`
41
+ DefaultLabels types.Map `tfsdk:"default_labels"`
41
42
}
42
43
43
44
func (m * GoogleClientConfigModel ) GetLocationDescription (providerConfig * fwtransport.FrameworkProviderConfig ) fwresource.LocationDescription {
@@ -88,6 +89,12 @@ func (d *GoogleClientConfigDataSource) Schema(ctx context.Context, req datasourc
88
89
Computed : true ,
89
90
Sensitive : true ,
90
91
},
92
+ "default_labels" : schema.MapAttribute {
93
+ Description : "The default labels configured on the provider." ,
94
+ MarkdownDescription : "The default labels configured on the provider." ,
95
+ Computed : true ,
96
+ ElementType : types .StringType ,
97
+ },
91
98
},
92
99
}
93
100
}
@@ -136,6 +143,7 @@ func (d *GoogleClientConfigDataSource) Read(ctx context.Context, req datasource.
136
143
data .Project = d .providerConfig .Project
137
144
data .Region = region
138
145
data .Zone = zone
146
+ data .DefaultLabels = d .providerConfig .DefaultLabels
139
147
140
148
token , err := d .providerConfig .TokenSource .Token ()
141
149
if err != nil {
0 commit comments