Skip to content

Commit

Permalink
One password module
Browse files Browse the repository at this point in the history
  • Loading branch information
jorge-cr-13 committed Feb 16, 2024
1 parent 32f467a commit 7720094
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 0 deletions.
9 changes: 9 additions & 0 deletions otc/op/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
data "onepassword_item" "ak" {
vault = var.vault_id
uuid = var.access_key_uid
}

data "onepassword_item" "sk" {
vault = var.vault_id
uuid = var.secret_key_uid
}
11 changes: 11 additions & 0 deletions otc/op/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
output "access_key" {
description = "The value of the access key for the user"
value = data.onepassword_item.ak.password
sensitive = true
}

output "secret_key" {
description = "The value of the access key for the user"
value = data.onepassword_item.ak.password
sensitive = true
}
21 changes: 21 additions & 0 deletions otc/op/terraform.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
terraform {
required_version = "v1.3.7"
required_providers {
opentelekomcloud = {
source = "opentelekomcloud/opentelekomcloud"
version = "1.29.0"
}
onepassword = {
source = "1Password/onepassword"
version = "1.4.1"
}
random = {
source = "hashicorp/random"
version = "3.6.0"
}
}
}

provider "onepassword" {
account = "https://xaynag.1password.com/"
}
14 changes: 14 additions & 0 deletions otc/op/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
variable "vault_id" {
type = string
description = "ID of the vault where the keys are stored"
}

variable "access_key_uid" {
type = string
description = "ID of the item for the Access Key"
}

variable "secret_key_uid" {
type = string
description = "ID of the item for the Secret Key"
}

0 comments on commit 7720094

Please sign in to comment.