Merge branch 'main' into fix/orderingConsole
commit
5a23a1b1d8
|
@ -173,6 +173,15 @@
|
|||
"contributions": [
|
||||
"code"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "a-vorobiev",
|
||||
"name": "Anton Vorobiev",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/197565?v=4",
|
||||
"profile": "https://vorobiev.cloud",
|
||||
"contributions": [
|
||||
"bug"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ Thank you to all the people who have already contributed to driftctl.
|
|||
<td align="center"><a href="https://crvx.fr/"><img src="https://avatars.githubusercontent.com/u/16480203?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Raphaël</b></sub></a><br /><a href="https://github.com/cloudskiff/driftctl/commits?author=sundowndev" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://github.com/vainkop"><img src="https://avatars.githubusercontent.com/u/28118190?v=4?s=80" width="80px;" alt=""/><br /><sub><b>vainkop</b></sub></a><br /><a href="https://github.com/cloudskiff/driftctl/issues?q=author%3Avainkop" title="Bug reports">🐛</a></td>
|
||||
<td align="center"><a href="https://remidoreau.com"><img src="https://avatars.githubusercontent.com/u/32459935?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Rémi Doreau</b></sub></a><br /><a href="https://github.com/cloudskiff/driftctl/commits?author=ayshiff" title="Code">💻</a></td>
|
||||
<td align="center"><a href="https://vorobiev.cloud"><img src="https://avatars.githubusercontent.com/u/197565?v=4?s=80" width="80px;" alt=""/><br /><sub><b>Anton Vorobiev</b></sub></a><br /><a href="https://github.com/cloudskiff/driftctl/issues?q=author%3Aa-vorobiev" title="Bug reports">🐛</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ func HasMeta(path string) bool {
|
|||
|
||||
func splitDirPattern(p string) (base string, pattern string) {
|
||||
base = p
|
||||
sep := string(os.PathSeparator)
|
||||
sep := "/"
|
||||
|
||||
for {
|
||||
if !HasMeta(base) {
|
||||
|
|
|
@ -2,7 +2,6 @@ package enumerator
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/aws/aws-sdk-go/aws"
|
||||
|
@ -44,7 +43,10 @@ func (s *S3Enumerator) Enumerate() ([]string, error) {
|
|||
bucket := bucketPath[0]
|
||||
prefix, pattern := GlobS3(strings.Join(bucketPath[1:], "/"))
|
||||
|
||||
fullPattern := filepath.Join(prefix, pattern)
|
||||
fullPattern := prefix
|
||||
if pattern != "" {
|
||||
fullPattern = strings.Join([]string{prefix, pattern}, "/")
|
||||
}
|
||||
|
||||
files := make([]string, 0)
|
||||
input := &s3.ListObjectsV2Input{
|
||||
|
@ -56,7 +58,7 @@ func (s *S3Enumerator) Enumerate() ([]string, error) {
|
|||
if aws.Int64Value(metadata.Size) > 0 {
|
||||
key := *metadata.Key
|
||||
if match, _ := doublestar.Match(fullPattern, key); match {
|
||||
files = append(files, filepath.Join(bucket, key))
|
||||
files = append(files, strings.Join([]string{bucket, key}, "/"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,5 +15,6 @@ func initAwsS3BucketMetaData(resourceSchemaRepository resource.SchemaRepositoryI
|
|||
resourceSchemaRepository.SetNormalizeFunc(AwsS3BucketResourceType, func(res *resource.AbstractResource) {
|
||||
val := res.Attrs
|
||||
val.SafeDelete([]string{"force_destroy"})
|
||||
val.SafeDelete([]string{"bucket_prefix"})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue