Skip to content

Commit

Permalink
up doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ganievs committed Dec 13, 2023
1 parent 672c4ea commit 92ab0ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions internal/provider/namespace_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ func (d *NamespaceDataSource) Read(ctx context.Context, req datasource.ReadReque

tflog.Trace(ctx, "read a data source")

var data *NamespaceDataSourceModel
data = &NamespaceDataSourceModel{
data := &NamespaceDataSourceModel{
Name: types.StringValue(ns.NamespaceInfo.GetName()),
Id: types.StringValue(ns.NamespaceInfo.GetId()),
Description: types.StringValue(ns.NamespaceInfo.GetDescription()),
Expand Down
5 changes: 2 additions & 3 deletions internal/provider/namespace_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,9 @@ func (r *NamespaceResource) Create(ctx context.Context, req resource.CreateReque
if _, ok := err.(*serviceerror.NamespaceAlreadyExists); !ok {
resp.Diagnostics.AddError("Request error", "namespace registration failed: "+err.Error())
return
} else {
resp.Diagnostics.AddError(data.Name.ValueString(), "namespace is already registered: "+err.Error())
return
}
resp.Diagnostics.AddError(data.Name.ValueString(), "namespace is already registered: "+err.Error())
return
}

tflog.Info(ctx, fmt.Sprintf("The namespace: %s is successfully registered", data.Name))
Expand Down

0 comments on commit 92ab0ee

Please sign in to comment.