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

Creating module for the swr #192

Merged
merged 1 commit into from
Apr 10, 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
12 changes: 12 additions & 0 deletions otc/swr/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
resource "opentelekomcloud_swr_organization_v2" "org" {
name = var.name
}

resource "opentelekomcloud_swr_repository_v2" "repo_1" {
count = length(var.repository)
organization = opentelekomcloud_swr_organization_v2.org.name
name = var.repository[count.index].repository_name
description = var.repository[count.index].repository_description
category = var.repository[count.index].repository_category
is_public = var.repository[count.index].repository_public
}
9 changes: 9 additions & 0 deletions otc/swr/terraform.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
terraform {
required_version = "v1.3.7"
required_providers {
opentelekomcloud = {
source = "opentelekomcloud/opentelekomcloud"
version = "1.36.1"
}
}
}
14 changes: 14 additions & 0 deletions otc/swr/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
variable "name" {
type = string
description = "Project name."
}

variable "repository" {
description = "Configuration of the repository settings"
type = list(object({
repository_name = string
repository_category = string
repository_description = string
repository_public = bool
}))
}
Loading