File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -416,8 +416,12 @@ func toRegistryBasic(d *schema.ResourceData) *models.V1BasicOciRegistry {
416416 endpointSuffix := d .Get ("endpoint_suffix" ).(string )
417417 baseContentPath := d .Get ("base_content_path" ).(string )
418418 authConfig := d .Get ("credentials" ).([]interface {})[0 ].(map [string ]interface {})
419- tlsCertificate := authConfig ["tls_config" ].([]interface {})[0 ].(map [string ]interface {})["certificate" ].(string )
420- tlsSkipVerify := authConfig ["tls_config" ].([]interface {})[0 ].(map [string ]interface {})["insecure_skip_verify" ].(bool )
419+ var tlsCertificate string
420+ var tlsSkipVerify bool
421+ if len (authConfig ["tls_config" ].([]interface {})) > 0 {
422+ tlsCertificate = authConfig ["tls_config" ].([]interface {})[0 ].(map [string ]interface {})["certificate" ].(string )
423+ tlsSkipVerify = authConfig ["tls_config" ].([]interface {})[0 ].(map [string ]interface {})["insecure_skip_verify" ].(bool )
424+ }
421425 var username , password string
422426
423427 username = authConfig ["username" ].(string )
You can’t perform that action at this time.
0 commit comments