Commit 8b0414eb authored by Adam Robinson's avatar Adam Robinson
Browse files

initial import

parents
resource "satellite_location" "loc" {
name = var.location_name
description = var.description
parent_id = var.parent_id
}
resource "satellite_role" "location_admin" {
name = "${satellite_location.loc.name} - Location Admins"
organization_ids = [ ]
location_ids = [ satellite_location.loc.id ]
description = "Role granting all permissions to a location"
}
resource "satellite_filter" "location" {
role_id = satellite_role.location_admin.id
resource_type = "Location"
permission_names = [
"view_locations",
"create_locations",
"assign_locations",
"edit_locations",
"destroy_locations",
]
location_ids = [ satellite_location.loc.id ]
}
output "admin_role_id" {
value = satellite_role.location_admin.id
}
output "location_id" {
value = satellite_location.loc.id
}
variable "location_name" {
type = string
description = "The name of the location to create"
}
variable "description" {
type = string
description = "An optional description for the location"
default = ""
}
variable "parent_id" {
type = number
description = "The parent ID to make this location a sublocation"
default = ""
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment