Skip to content

Commit

Permalink
chore(all): Delete logs that print password (#509)
Browse files Browse the repository at this point in the history
  • Loading branch information
youngmn authored Jan 7, 2025
1 parent 58d3fcf commit 44bbb87
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 24 deletions.
1 change: 0 additions & 1 deletion internal/service/cdss/cdss_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,6 @@ func resourceNcloudCDSSClusterCreate(ctx context.Context, d *schema.ResourceData
ConfigGroupNo: *GetInt32FromString(d.GetOk("config_group_no")),
}

LogCommonRequest("resourceNcloudCDSSClusterCreate", reqParams)
resp, _, err := config.Client.Vcdss.V1Api.ClusterCreateCDSSClusterReturnServiceGroupInstanceNoPost(ctx, reqParams)
if err != nil {
LogErrorResponse("resourceNcloudCDSSClusterCreate", err, reqParams)
Expand Down
2 changes: 0 additions & 2 deletions internal/service/hadoop/hadoop.go
Original file line number Diff line number Diff line change
Expand Up @@ -551,8 +551,6 @@ func (r *hadoopResource) Create(ctx context.Context, req resource.CreateRequest,
reqParams.UseDataCatalog = plan.UseDataCatalog.ValueBoolPointer()
}

tflog.Info(ctx, "CreateHadoop reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vhadoop.V2Api.CreateCloudHadoopInstance(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down
2 changes: 0 additions & 2 deletions internal/service/mongodb/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,8 +568,6 @@ func (m *mongodbResource) Create(ctx context.Context, req resource.CreateRequest
reqParams.DataStorageTypeCode = plan.DataStorageType.ValueStringPointer()
}

tflog.Info(ctx, "CreateMongoDb reqParams="+common.MarshalUncheckedString(reqParams))

response, err := m.config.Client.Vmongodb.V2Api.CreateCloudMongoDbInstance(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down
2 changes: 0 additions & 2 deletions internal/service/mssql/mssql.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,6 @@ func (r *mssqlResource) Create(ctx context.Context, req resource.CreateRequest,
reqParams.BackupTime = plan.BackupTime.ValueStringPointer()
}

tflog.Info(ctx, "CreateMssql reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vmssql.V2Api.CreateCloudMssqlInstance(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down
2 changes: 0 additions & 2 deletions internal/service/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,6 @@ func (r *mysqlResource) Create(ctx context.Context, req resource.CreateRequest,
}
}

tflog.Info(ctx, "CreateMysql reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vmysql.V2Api.CreateCloudMysqlInstance(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down
3 changes: 0 additions & 3 deletions internal/service/mysql/mysql_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ func (r *mysqlUsersResource) Create(ctx context.Context, req resource.CreateRequ
CloudMysqlUserList: convertToCloudMysqlUserParameter(plan.MysqlUserList),
}

tflog.Info(ctx, "CreateMysqlUserList reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vmysql.V2Api.AddCloudMysqlUserList(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down Expand Up @@ -271,7 +269,6 @@ func (r *mysqlUsersResource) Update(ctx context.Context, req resource.UpdateRequ
CloudMysqlInstanceNo: state.ID.ValueStringPointer(),
CloudMysqlUserList: convertToCloudMysqlUserParameter(plan.MysqlUserList),
}
tflog.Info(ctx, "ChangecloudMysqlUserList reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vmysql.V2Api.ChangeCloudMysqlUserList(reqParams)
if err != nil {
Expand Down
4 changes: 0 additions & 4 deletions internal/service/nasvolume/nas_volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ func createClassicNasVolume(d *schema.ResourceData, config *conn.ProviderConfig)
IsReturnProtection: BoolPtrOrNil(d.GetOk("is_return_protection")),
}

LogCommonRequest("createClassicNasVolume", reqParams)

resp, err := config.Client.Server.V2Api.CreateNasVolumeInstance(reqParams)
if err != nil {
LogErrorResponse("createClassicNasVolume", err, reqParams)
Expand All @@ -364,8 +362,6 @@ func createVpcNasVolume(d *schema.ResourceData, config *conn.ProviderConfig) (*s
IsReturnProtection: BoolPtrOrNil(d.GetOk("is_return_protection")),
}

LogCommonRequest("createVpcNasVolume", reqParams)

resp, err := config.Client.Vnas.V2Api.CreateNasVolumeInstance(reqParams)
if err != nil {
LogErrorResponse("createVpcNasVolume", err, reqParams)
Expand Down
2 changes: 0 additions & 2 deletions internal/service/postgresql/postgresql.go
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,6 @@ func (r *postgresqlResource) Create(ctx context.Context, req resource.CreateRequ
}
}

tflog.Info(ctx, "CreatePostgresql reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vpostgresql.V2Api.CreateCloudPostgresqlInstance(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down
3 changes: 0 additions & 3 deletions internal/service/postgresql/postgresql_users.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,6 @@ func (r *postgresqlUsersResource) Create(ctx context.Context, req resource.Creat
CloudPostgresqlUserList: convertToCloudPostgresqlUserParameter(plan.PostgresqlUserList),
}

tflog.Info(ctx, "CreatePostgresqlUserList reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vpostgresql.V2Api.AddCloudPostgresqlUserList(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down Expand Up @@ -260,7 +258,6 @@ func (r *postgresqlUsersResource) Update(ctx context.Context, req resource.Updat
CloudPostgresqlInstanceNo: state.ID.ValueStringPointer(),
CloudPostgresqlUserList: convertToCloudPostgresqlUserParameter(plan.PostgresqlUserList),
}
tflog.Info(ctx, "ChangeCloudPostgresqlUserList reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vpostgresql.V2Api.ChangeCloudPostgresqlUserList(reqParams)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions internal/service/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,6 @@ func (r *redisResource) Create(ctx context.Context, req resource.CreateRequest,
reqParams.CloudRedisUserPassword = plan.UserPassword.ValueStringPointer()
}

tflog.Info(ctx, "CreateCloudRedisInstance reqParams="+common.MarshalUncheckedString(reqParams))

response, err := r.config.Client.Vredis.V2Api.CreateCloudRedisInstance(reqParams)
if err != nil {
resp.Diagnostics.AddError("CREATING ERROR", err.Error())
Expand Down
2 changes: 1 addition & 1 deletion internal/service/ses/ses_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ func resourceNcloudSESClusterCreate(ctx context.Context, d *schema.ResourceData,
MasterNodeCount: masterNodeCount,
LoginKeyName: StringPtrOrNil(d.GetOk("login_key_name")),
}
LogCommonRequest("resourceNcloudSESClusterCreate", reqParams)

resp, _, err := config.Client.Vses.V2Api.CreateClusterUsingPOST(ctx, *reqParams)
if err != nil {
LogErrorResponse("resourceNcloudSESClusterCreate", err, reqParams)
Expand Down

0 comments on commit 44bbb87

Please sign in to comment.