Skip to content

Commit

Permalink
feat(terragrunt): add support for gitlab-tags datasource (#27903)
Browse files Browse the repository at this point in the history
  • Loading branch information
lstoeferle committed Mar 18, 2024
1 parent b37086f commit 5c14579
Show file tree
Hide file tree
Showing 6 changed files with 193 additions and 58 deletions.
27 changes: 21 additions & 6 deletions lib/modules/manager/terragrunt/__fixtures__/2.hcl
Expand Up @@ -127,32 +127,32 @@ terraform {

# foobar
terraform {
source = "https://bitbucket.com/hashicorp/example?ref=v1.0.0"
source = "https://mygit.com/hashicorp/example?ref=v1.0.0"
}

# gittags
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=v1.0.0"
source = "git::https://mygit.com/hashicorp/example?ref=v1.0.0"
}

# gittags_badversion
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=next"
source = "git::https://mygit.com/hashicorp/example?ref=next"
}

# gittags_subdir
terraform {
source = "git::https://bitbucket.com/hashicorp/example//subdir/test?ref=v1.0.1"
source = "git::https://mygit.com/hashicorp/example//subdir/test?ref=v1.0.1"
}

# gittags_http
terraform {
source = "git::http://bitbucket.com/hashicorp/example?ref=v1.0.2"
source = "git::http://mygit.com/hashicorp/example?ref=v1.0.2"
}

# gittags_ssh
terraform {
source = "git::ssh://git@bitbucket.com/hashicorp/example?ref=v1.0.3"
source = "git::ssh://git@mygit.com/hashicorp/example?ref=v1.0.3"
}

# invalid, ignored by test since it does not have source on the next line
Expand All @@ -164,3 +164,18 @@ terraform {
name = "foo"
dummy = "true"
}

# bitbucket-tags
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=v1.0.0"
}

# gitlab-tags
terraform {
source = "git::https://gitlab.com/hashicorp/example?ref=v1.0.0"
}

# gitea-tags
terraform {
source = "git::https://gitea.com/hashicorp/example?ref=v1.0.0"
}
28 changes: 22 additions & 6 deletions lib/modules/manager/terragrunt/__fixtures__/3.hcl
Expand Up @@ -127,32 +127,32 @@ terraform {

# foobar
terraform {
source = "https://bitbucket.com/hashicorp/example?ref=v1.0.0&depth=1"
source = "https://mygit.com/hashicorp/example?ref=v1.0.0&depth=1"
}

# gittags
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=v1.0.0&depth=1"
source = "git::https://mygit.com/hashicorp/example?ref=v1.0.0&depth=1"
}

# gittags_badversion
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=next&depth=1"
source = "git::https://mygit.com/hashicorp/example?ref=next&depth=1"
}

# gittags_subdir
terraform {
source = "git::https://bitbucket.com/hashicorp/example//subdir/test?ref=v1.0.1&depth=1"
source = "git::https://mygit.com/hashicorp/example//subdir/test?ref=v1.0.1&depth=1"
}

# gittags_http
terraform {
source = "git::http://bitbucket.com/hashicorp/example?ref=v1.0.2&depth=1"
source = "git::http://mygit.com/hashicorp/example?ref=v1.0.2&depth=1"
}

# gittags_ssh
terraform {
source = "git::ssh://git@bitbucket.com/hashicorp/example?ref=v1.0.3&depth=1"
source = "git::ssh://git@mygit.com/hashicorp/example?ref=v1.0.3&depth=1"
}

# invalid, ignored by test since it does not have source on the next line
Expand All @@ -164,3 +164,19 @@ terraform {
name = "foo"
dummy = "true"
}

# bitbucket-tags
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=v1.0.0"
}

# gitlab-tags
terraform {
source = "git::https://gitlab.com/hashicorp/example?ref=v1.0.0"
}

# gitea-tags
terraform {
source = "git::https://gitea.com/hashicorp/example?ref=v1.0.0"
}

29 changes: 23 additions & 6 deletions lib/modules/manager/terragrunt/__fixtures__/4.hcl
Expand Up @@ -127,32 +127,32 @@ terraform {

# foobar
terraform {
source = "https://bitbucket.com/hashicorp/example?depth=1&ref=v1.0.0"
source = "https://mygit.com/hashicorp/example?depth=1&ref=v1.0.0"
}

# gittags
terraform {
source = "git::https://bitbucket.com/hashicorp/example?depth=1&ref=v1.0.0"
source = "git::https://mygit.com/hashicorp/example?depth=1&ref=v1.0.0"
}

# gittags_badversion
terraform {
source = "git::https://bitbucket.com/hashicorp/example?depth=1&ref=next"
source = "git::https://mygit.com/hashicorp/example?depth=1&ref=next"
}

# gittags_subdir
terraform {
source = "git::https://bitbucket.com/hashicorp/example//subdir/test?depth=1&ref=v1.0.1"
source = "git::https://mygit.com/hashicorp/example//subdir/test?depth=1&ref=v1.0.1"
}

# gittags_http
terraform {
source = "git::http://bitbucket.com/hashicorp/example?depth=1&ref=v1.0.2"
source = "git::http://mygit.com/hashicorp/example?depth=1&ref=v1.0.2"
}

# gittags_ssh
terraform {
source = "git::ssh://git@bitbucket.com/hashicorp/example?depth=1&ref=v1.0.3"
source = "git::ssh://git@mygit.com/hashicorp/example?depth=1&ref=v1.0.3"
}

# invalid, ignored by test since it does not have source on the next line
Expand All @@ -164,3 +164,20 @@ terraform {
name = "foo"
dummy = "true"
}


# bitbucket-tags
terraform {
source = "git::https://bitbucket.com/hashicorp/example?ref=v1.0.0"
}

# gitlab-tags
terraform {
source = "git::https://gitlab.com/hashicorp/example?ref=v1.0.0"
}

# gitea-tags
terraform {
source = "git::https://gitea.com/hashicorp/example?ref=v1.0.0"
}

0 comments on commit 5c14579

Please sign in to comment.