Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Infrastructure GitOps
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Shivering-Isles
Infrastructure GitOps
Commits
2f005581
Verified
Commit
2f005581
authored
3 years ago
by
Sheogorath
Browse files
Options
Downloads
Patches
Plain Diff
terrafrom: Make subnets optional for instances
parent
3c471d9d
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
terraform/modules/hcloud_instance/network.tf
+1
-1
1 addition, 1 deletion
terraform/modules/hcloud_instance/network.tf
terraform/modules/hcloud_instance/variables.tf
+1
-0
1 addition, 0 deletions
terraform/modules/hcloud_instance/variables.tf
with
2 additions
and
1 deletion
terraform/modules/hcloud_instance/network.tf
+
1
−
1
View file @
2f005581
resource
"hcloud_server_network"
"server_network"
{
server_id
=
element
(
hcloud_server
.
server
.*.
id
,
count
.
index
)
subnet_id
=
var
.
subnet
count
=
length
(
hcloud_server
.
server
.*.
id
)
count
=
var
.
subnet
!=
null
?
length
(
hcloud_server
.
server
.*.
id
)
:
0
}
This diff is collapsed.
Click to expand it.
terraform/modules/hcloud_instance/variables.tf
+
1
−
0
View file @
2f005581
...
...
@@ -92,4 +92,5 @@ variable "volume_size" {
variable
"subnet"
{
type
=
string
description
=
"Id of the additional internal network"
default
=
null
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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