diff --git a/modules/infrastructure/main.tf b/modules/infrastructure/main.tf new file mode 100644 index 0000000..d40dc9b --- /dev/null +++ b/modules/infrastructure/main.tf @@ -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 +} diff --git a/modules/infrastructure/outputs.tf b/modules/infrastructure/outputs.tf new file mode 100644 index 0000000..de3920a --- /dev/null +++ b/modules/infrastructure/outputs.tf @@ -0,0 +1,3 @@ +output "this" { + value = opslevel_infrastructure.this +} diff --git a/modules/infrastructure/variables.tf b/modules/infrastructure/variables.tf new file mode 100644 index 0000000..b260e46 --- /dev/null +++ b/modules/infrastructure/variables.tf @@ -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." +} diff --git a/modules/infrastructure/versions.tf b/modules/infrastructure/versions.tf new file mode 120000 index 0000000..8bd0ff1 --- /dev/null +++ b/modules/infrastructure/versions.tf @@ -0,0 +1 @@ +../versions.tf \ No newline at end of file