Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add infrastructure module #43

Merged
merged 2 commits into from
Nov 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions modules/infrastructure/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "opslevel_infrastructure" "this" {
aliases = var.aliases
data = var.data
owner = var.owner
provider_data = var.provider_data
schema = var.schema
}
3 changes: 3 additions & 0 deletions modules/infrastructure/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
output "this" {
value = opslevel_infrastructure.this
}
31 changes: 31 additions & 0 deletions modules/infrastructure/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
variable "aliases" {
type = set(string)
description = "The aliases for the infrastructure resource."
default = null
}

variable "data" {
type = string
description = "The data of the infrastructure resource in JSON format."
}

variable "owner" {
type = string
description = "The id of the team that owns the infrastructure resource. Does not support aliases!"
}

variable "provider_data" {
type = object({
account = string
name = optional(string)
type = optional(string)
url = optional(string)
})
description = "The provider specific data for the infrastructure resource."
default = null
}

variable "schema" {
type = string
description = "The schema of the infrastructure resource that determines its data specification."
}
1 change: 1 addition & 0 deletions modules/infrastructure/versions.tf