Skip to content

Commit

Permalink
🐛 fix discovery of terraform gitlab assets (missing path option) (#1784)
Browse files Browse the repository at this point in the history
  • Loading branch information
vjeffrey authored Sep 19, 2023
1 parent 66ce8f3 commit b415f2d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion motor/discovery/gitlab/gitlab.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,19 @@ func (r *Resolver) Resolve(ctx context.Context, root *asset.Asset, pCfg *provide
if err == nil && len(terraformFiles) > 0 {
terraformCfg := pCfg.Clone()
terraformCfg.Backend = providers.ProviderType_TERRAFORM
// git+https://gitlab.com/mondoolabs/example-gitlab.git
terraformCfg.Options["path"] = "git+" + project.HTTPURLToRepo
assets, err := (&terraform_resolver.Resolver{}).Resolve(ctx, projectAsset, terraformCfg, credsResolver, sfn)
if err == nil && len(assets) > 0 {
for i := range assets {
if len(assets[i].PlatformIds) > 0 {
assets[i].PlatformIds[0] = assets[i].PlatformIds[0] + "/" + project.Name
list = append(list, assets[i])
} else {
log.Debug().Msg("missing platform id for asset")
continue
}
}
list = append(list, assets...)
}
}
}
Expand Down

0 comments on commit b415f2d

Please sign in to comment.