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

chore(contributors.jenkins.io): add SAS token output #529

Merged
merged 1 commit into from
Nov 28, 2023
Merged
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
45 changes: 45 additions & 0 deletions contributors.jenkins.io.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,48 @@ resource "azurerm_storage_share" "contributors_jenkins_io" {
storage_account_name = azurerm_storage_account.contributors_jenkins_io.name
quota = 5
}

data "azurerm_storage_account_sas" "contributors_jenkins_io" {
connection_string = azurerm_storage_account.contributors_jenkins_io.primary_connection_string
signed_version = "2022-11-02"

resource_types {
service = true # Ex: list Share
container = true # Ex: list Files and Directories
object = true # Ex: create File
}

services {
blob = false
queue = false
table = false
file = true
}

start = "2023-11-28T00:00:00Z"
expiry = "2024-01-28T00:00:00Z"

# https://learn.microsoft.com/en-us/rest/api/storageservices/create-account-sas#file-service
permissions {
read = true
write = true
delete = true
list = true
add = false
create = true
update = false
process = false
tag = false
filter = false
}
}

output "contributors_jenkins_io_share_url" {
sensitive = true
value = azurerm_storage_share.contributors_jenkins_io.url
}

output "contributors_jenkins_io_sas_query_string" {
sensitive = true
value = data.azurerm_storage_account_sas.contributors_jenkins_io.sas
}