Docs:Add gitlab_group_badge usage guide with placeholders
Summary
- GitLab has a badges and placeholders.
- But terraform provider does not have example usage.
- It would be more useful to show example usage of placeholders in the documentation.
Benefits
- Users will be able to easily start using badges
- Each projects will be able to use badges automatically.
Example
resource "gitlab_group" "foo" {
name = "foo-group"
}
resource "gitlab_group_badge" "gitlab_pipeline" {
group = gitlab_group.foo.id
link_url = "https://gitlab.com/%%{project_path}/-/jobs/artifacts/main/browse"
image_url = "https://gitlab.com/%%{project_path}/badges/%%{default_branch}/pipeline.svg"
}
resource "gitlab_group_badge" "gitlab_coverage" {
group = gitlab_group.foo.id
link_url = "https://gitlab.com/%%{project_path}/-/jobs"
image_url = "https://gitlab.com/%%{project_path}/badges/%%{default_branch}/coverage.svg"
}
resource "gitlab_group_badge" "gitlab_release" {
group = gitlab_group.foo.id
link_url = "https://gitlab.com/%%{project_path}/-/releases"
image_url = "https://gitlab.com/%%{project_path}/-/badges/release.svg"
}
Edited by arukiidou

