@@ -41,15 +41,15 @@ type COPProviderModel struct {
4141}
4242
4343func (p * COPProvider ) Metadata (_ context.Context , _ provider.MetadataRequest , resp * provider.MetadataResponse ) {
44- resp .TypeName = "cop "
44+ resp .TypeName = "observability "
4545 resp .Version = p .version
4646}
4747
4848func (p * COPProvider ) Schema (_ context.Context , _ provider.SchemaRequest , resp * provider.SchemaResponse ) {
4949 resp .Schema = schema.Schema {
5050 Attributes : map [string ]schema.Attribute {
5151 "auth_method" : schema.StringAttribute {
52- MarkdownDescription : "Authentication type selected for COP API requests. Possible values(oauth, headless, service-principal)" ,
52+ MarkdownDescription : "Authentication type selected for observability API requests. Possible values(oauth, headless, service-principal)" ,
5353 Required : true ,
5454 },
5555 "tenant" : schema.StringAttribute {
@@ -92,47 +92,47 @@ func (p *COPProvider) Configure(ctx context.Context, req provider.ConfigureReque
9292 if data .AuthMethod .IsUnknown () {
9393 resp .Diagnostics .AddAttributeError (
9494 path .Root ("auth_method" ),
95- "Unknown cop API auth_method" ,
95+ "Unknown observability API auth_method" ,
9696 "Please make sure you configure the auth_method field" ,
9797 )
9898 }
9999
100100 if data .Tenant .IsUnknown () {
101101 resp .Diagnostics .AddAttributeError (
102102 path .Root ("tenant" ),
103- "Unknown cop API tenant" ,
103+ "Unknown observability API tenant" ,
104104 "Please make sure you configure the tenant field" ,
105105 )
106106 }
107107
108108 if data .Username .IsUnknown () {
109109 resp .Diagnostics .AddAttributeError (
110110 path .Root ("username" ),
111- "Unknown cop API username" ,
111+ "Unknown observability API username" ,
112112 "Please make sure you configure the username field" ,
113113 )
114114 }
115115
116116 if data .Password .IsUnknown () {
117117 resp .Diagnostics .AddAttributeError (
118118 path .Root ("password" ),
119- "Unknown cop API password" ,
119+ "Unknown observability API password" ,
120120 "Please make sure you configure the password field" ,
121121 )
122122 }
123123
124124 if data .URL .IsUnknown () {
125125 resp .Diagnostics .AddAttributeError (
126126 path .Root ("url" ),
127- "Unknown cop API url" ,
127+ "Unknown observability API url" ,
128128 "Please make sure you configure the url field" ,
129129 )
130130 }
131131
132132 if data .URL .IsUnknown () {
133133 resp .Diagnostics .AddAttributeError (
134134 path .Root ("secrets_file" ),
135- "Unknown cop API secrets_file" ,
135+ "Unknown observability API secrets_file" ,
136136 "Please make sure you configure the secrets_file field" ,
137137 )
138138 }
@@ -186,7 +186,7 @@ func (p *COPProvider) Configure(ctx context.Context, req provider.ConfigureReque
186186 if authMethod == "" {
187187 resp .Diagnostics .AddAttributeError (
188188 path .Root ("auth_method" ),
189- "Missing cop API auth_method" ,
189+ "Missing observability API auth_method" ,
190190 "SET the COP_AUTH_METHOD env var or the config" ,
191191 )
192192 tflog .Error (ctx , "Missing or empty value for auth_method attribute" )
@@ -197,39 +197,39 @@ func (p *COPProvider) Configure(ctx context.Context, req provider.ConfigureReque
197197 if url == "" {
198198 resp .Diagnostics .AddAttributeError (
199199 path .Root ("url" ),
200- "Missing cop API url" ,
200+ "Missing observability API url" ,
201201 "SET the COP_URL env var or the config" ,
202202 )
203203 }
204204
205205 if tenantID == "" {
206206 resp .Diagnostics .AddAttributeError (
207207 path .Root ("tenant" ),
208- "Missing cop API tenant" ,
208+ "Missing observability API tenant" ,
209209 "SET the COP_TENANT env var or the config" ,
210210 )
211211 }
212212 case "headless" :
213213 if username == "" {
214214 resp .Diagnostics .AddAttributeError (
215215 path .Root ("username" ),
216- "Missing cop API username" ,
216+ "Missing observability API username" ,
217217 "SET the COP_USERNAME env var or the config" ,
218218 )
219219 }
220220
221221 if password == "" {
222222 resp .Diagnostics .AddAttributeError (
223223 path .Root ("password" ),
224- "Missing cop API password" ,
224+ "Missing observability API password" ,
225225 "SET the COP_PASSWORD env var or the config" ,
226226 )
227227 }
228228 case "service-principal" :
229229 if secretsFile == "" {
230230 resp .Diagnostics .AddAttributeError (
231231 path .Root ("secrets_file" ),
232- "Missing cop API secrets_file" ,
232+ "Missing observability API secrets_file" ,
233233 "SET the SECRETS_FILE env var or the config" ,
234234 )
235235 }
@@ -253,10 +253,10 @@ func (p *COPProvider) Configure(ctx context.Context, req provider.ConfigureReque
253253
254254 err := appdClient .Login ()
255255 if err != nil {
256- tflog .Error (ctx , fmt .Sprintf ("Failed to authenticate to COP client: %s" , err .Error ()))
256+ tflog .Error (ctx , fmt .Sprintf ("Failed to authenticate to observability client: %s" , err .Error ()))
257257 }
258258
259- tflog .Debug (ctx , fmt .Sprintf ("Successful authentication to COP client using %s" , appdClient .AuthMethod ))
259+ tflog .Debug (ctx , fmt .Sprintf ("Successful authentication to observability client using %s" , appdClient .AuthMethod ))
260260
261261 // TODO change this to a real client
262262 resp .DataSourceData = appdClient
0 commit comments