Skip to content

Commit

Permalink
use head sha1 from git_repository
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Hoß authored and sebhoss committed Aug 20, 2022
1 parent 5e9abdf commit 0f16826
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tests/data_source_git_branch.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# SPDX-License-Identifier: 0BSD

data "git_branch" "current" {
count = data.git_repository.repository.branch == null ? 0 : 1
directory = data.git_repository.repository.directory
name = data.git_repository.repository.branch
}
Expand All @@ -13,7 +14,7 @@ data "git_branch" "every" {
}

output "data_source_git_branch_current" {
value = data.git_branch.current
value = data.git_branch.current[*]
}

output "data_source_git_branch_every" {
Expand Down
2 changes: 1 addition & 1 deletion tests/data_source_git_comit.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

data "git_commit" "current_head" {
directory = data.git_repository.repository.directory
sha1 = data.git_branch.current.sha1
sha1 = data.git_repository.repository.sha1
}

output "data_source_git_commit_current_head" {
Expand Down

0 comments on commit 0f16826

Please sign in to comment.