Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
terraform generalization
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Kubernetes Cluster
terraform
terraform generalization
Commits
8c441430
Commit
8c441430
authored
1 month ago
by
Andri Joos
Browse files
Options
Downloads
Patches
Plain Diff
add generalization file
parent
e31c6e08
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
main.tf
+35
-0
35 additions, 0 deletions
main.tf
variables.tf
+80
-0
80 additions, 0 deletions
variables.tf
with
115 additions
and
0 deletions
main.tf
+
35
−
0
View file @
8c441430
terraform
{
required_providers
{
helm
=
{
source
=
"hashicorp/helm"
version
=
"~> 2.17"
}
}
}
resource
"helm_release"
"this"
{
name
=
var
.
release_name
repository
=
var
.
chart_repo
chart
=
var
.
chart_name
version
=
var
.
chart_version
namespace
=
var
.
namespace
create_namespace
=
var
.
create_namespace
wait
=
var
.
wait
values
=
local
.
values_content
dynamic
"set"
{
for_each
=
local
.
set_values
content
{
name
=
set
.
key
value
=
set
.
value
}
}
dynamic
"set_sensitive"
{
for_each
=
local
.
set_sensitive_values
content
{
name
=
set_sensitive
.
key
value
=
set_sensitive
.
value
}
}
}
This diff is collapsed.
Click to expand it.
variables.tf
0 → 100644
+
80
−
0
View file @
8c441430
variable
"chart_name"
{
description
=
"Name of the Helm chart"
type
=
string
}
variable
"chart_repo"
{
description
=
"URL of the Helm chart repository"
type
=
string
}
variable
"chart_version"
{
description
=
"Version of the Helm chart"
type
=
string
}
variable
"release_name"
{
description
=
"Name of the Helm release"
type
=
string
}
variable
"namespace"
{
description
=
"Kubernetes namespace for the release"
type
=
string
}
variable
"create_namespace"
{
description
=
"Create Kubernetes namespace if it doesn't exist"
type
=
bool
default
=
true
}
variable
"wait"
{
description
=
"Wait for the Helm chart to be applied"
type
=
bool
default
=
true
}
variable
"default_values_files"
{
description
=
"Custom values files for the Helm chart"
type
=
list
(
string
)
default
=
[]
}
variable
"extra_values_files"
{
description
=
"Custom values files for the Helm chart"
type
=
list
(
string
)
default
=
[]
}
variable
"default_set_values"
{
description
=
"Map of values to set"
type
=
map
(
string
)
default
=
{}
}
variable
"extra_set_values"
{
description
=
"Map of values to set"
type
=
map
(
string
)
default
=
{}
}
variable
"default_set_sensitive_values"
{
description
=
"Map of sensitive values to set"
type
=
map
(
string
)
default
=
{}
}
variable
"extra_set_sensitive_values"
{
description
=
"Map of sensitive values to set"
type
=
map
(
string
)
default
=
{}
}
locals
{
values_files
=
concat
(
var
.
default_values_files
,
var
.
extra_values_files
)
values_content
=
[
for
file_path
in
local
.
values_files
:
file
(
file_path
)]
set_values
=
merge
(
var
.
default_set_values
,
var
.
extra_set_values
)
set_sensitive_values
=
merge
(
var
.
default_set_sensitive_values
,
var
.
extra_set_sensitive_values
)
}
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment