Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
3a298fc
feat: Enable multiple display name
dkuji Oct 28, 2023
89f39e9
Merge branch 'master' into enable-multiple-display-name
bharathkkb Nov 30, 2023
c6522bc
Delete display_names in outputs.tf
dkuji Nov 30, 2023
7116f15
Merge branch 'enable-multiple-display-name' of https://github.com/dku…
dkuji Nov 30, 2023
20a90a5
Merge branch 'master' into enable-multiple-display-name
dkuji Dec 13, 2023
49d46ea
Merge branch 'master' into enable-multiple-display-name
dkuji Dec 25, 2023
3a9aee3
Merge branch 'master' into enable-multiple-display-name
dkuji Feb 4, 2024
ada878d
Merge branch 'master' into enable-multiple-display-name
dkuji Mar 15, 2024
036a07d
Merge branch 'master' into enable-multiple-display-name
dkuji Apr 28, 2024
af33427
Merge branch 'master' into enable-multiple-display-name
dkuji May 23, 2024
62bb06c
Merge branch 'master' into enable-multiple-display-name
apeabody Aug 5, 2024
c4d7cfc
fix readme
dkuji May 5, 2025
527ce42
chore(deps): Update go modules and/or dev-tools (#120)
renovate[bot] Aug 5, 2024
7821bda
fix(deps): update key-distrubutor to GO v1.20 (#124)
renovate[bot] Aug 5, 2024
0da0825
fix: Fix output "id" in "simple-sa" module (#125)
legal90 Aug 6, 2024
b9bbd8a
chore(master): release 4.3.0 (#119)
release-please[bot] Aug 12, 2024
1562597
chore(deps): Update go modules (#126)
renovate[bot] Aug 16, 2024
a9d2c99
chore(deps): Update Terraform terraform-google-modules/project-factor…
renovate[bot] Aug 23, 2024
b79553c
feat(deps): Update Terraform google to v6 (#129)
renovate[bot] Aug 29, 2024
6249aa4
chore(master): release 4.4.0 (#130)
release-please[bot] Sep 10, 2024
ca8dcb1
chore(deps): Update Terraform terraform-google-modules/project-factor…
renovate[bot] Oct 7, 2024
1e70b52
chore: update CODEOWNERS
cloud-foundation-bot Oct 10, 2024
0523873
chore: Add new output account_details, output type and metadata.displ…
q2w Oct 22, 2024
f1d9851
chore(master): release 4.4.1 (#135)
release-please[bot] Oct 25, 2024
7a66bf3
chore: update .github/workflows/lint.yaml
cloud-foundation-bot Oct 31, 2024
a470fbe
chore: update metadata to reflect original variable's order (#137)
q2w Nov 27, 2024
3c24635
chore(master): release 4.4.2 (#138)
release-please[bot] Nov 27, 2024
4b5fda5
fix: update display metadata for simple-sa module (#141)
q2w Dec 10, 2024
ff16de7
chore(deps): bump golang.org/x/crypto from 0.25.0 to 0.31.0 in /modul…
dependabot[bot] Dec 13, 2024
692adc1
chore(master): release 4.4.3 (#142)
release-please[bot] Dec 13, 2024
44e728a
chore(deps): bump golang.org/x/crypto from 0.21.0 to 0.31.0 in /test/…
dependabot[bot] Dec 20, 2024
e770486
chore: update .github/conventional-commit-lint.yaml
cloud-foundation-bot Jan 3, 2025
3a2bdc5
chore: update .github/renovate.json
cloud-foundation-bot Jan 3, 2025
a660f41
chore: update .github/workflows/stale.yml
cloud-foundation-bot Jan 3, 2025
2372511
chore: update .github/trusted-contribution.yml
cloud-foundation-bot Jan 3, 2025
3ca58b7
chore: update CODEOWNERS
cloud-foundation-bot Jan 3, 2025
affe18b
chore: update .github/workflows/lint.yaml
cloud-foundation-bot Jan 3, 2025
5833163
chore: update .github/trusted-contribution.yml
cloud-foundation-bot Jan 4, 2025
13bddb1
chore: update .github/workflows/lint.yaml
cloud-foundation-bot Jan 4, 2025
bea2be8
chore: update .github/workflows/stale.yml
cloud-foundation-bot Jan 4, 2025
280ea1a
chore: update CODEOWNERS
cloud-foundation-bot Jan 4, 2025
3447f5d
chore: update .github/conventional-commit-lint.yaml
cloud-foundation-bot Jan 4, 2025
4360e04
chore: add connection metadata for adding project_roles automatically…
q2w Jan 21, 2025
f30e400
chore(main): release 4.4.4 (#148)
release-please[bot] Jan 22, 2025
d7da93d
feat: support simple sa creation without any project level roles (#149)
q2w Jan 24, 2025
cee29fc
chore(main): release 4.5.0 (#150)
release-please[bot] Jan 24, 2025
050d567
chore(deps): Update Terraform terraform-google-modules/project-factor…
renovate[bot] Jan 24, 2025
ddce83d
chore: add pubsub connection metadata (#152)
ktinubu Mar 6, 2025
b5a8bf0
chore: update CODEOWNERS
cloud-foundation-bot Mar 14, 2025
1926a16
fix: udpate metadata to add role when connecting to bigquery (#154)
q2w Mar 18, 2025
56d6456
chore(main): release 4.5.1 (#155)
release-please[bot] Mar 18, 2025
9f0206f
fix: Add dataflow connection in service account for dataflow develope…
amrkk123 Mar 26, 2025
0cdb9eb
chore(main): release 4.5.2 (#157)
release-please[bot] Mar 27, 2025
8ae7c68
fix: Fix typo in objct admin role (#158)
amrkk123 Mar 27, 2025
e6291db
chore(main): release 4.5.3 (#159)
release-please[bot] Mar 27, 2025
092f7a6
Merge branch 'main' into enable-multiple-display-name
dkuji May 5, 2025
eb72e34
Merge branch 'main' into enable-multiple-display-name
apeabody Sep 10, 2025
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ Functional examples are included in the
| descriptions | List of descriptions for the created service accounts (elements default to the value of `description`) | `list(string)` | `[]` | no |
| disabled | A map of service account names to a boolean value indicating whether the service account should be disabled. Service accounts not in this map will be enabled by default. | `map(bool)` | `{}` | no |
| display\_name | Display names of the created service accounts (defaults to 'Terraform-managed service account') | `string` | `"Terraform-managed service account"` | no |
| display\_names | List of display\_names for the created service accounts (elements default to the value of `display_name`) | `list(string)` | `[]` | no |
| generate\_keys | Generate keys for service accounts. | `bool` | `false` | no |
| grant\_billing\_role | Grant billing user role. | `bool` | `false` | no |
| grant\_xpn\_roles | Grant roles for shared VPC management. | `bool` | `true` | no |
Expand Down
2 changes: 1 addition & 1 deletion examples/multiple_service_accounts/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module "service_accounts" {
prefix = ""
names = ["test-first", "test-second"]
generate_keys = true
display_name = "Test Service Accounts"
display_names = ["Test Service Accounts first", "Test Service Accounts second"]
description = "Test Service Accounts description"

project_roles = [
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ locals {
resource "google_service_account" "service_accounts" {
for_each = local.names
account_id = "${local.prefix}${lower(each.value)}"
display_name = var.display_name
display_name = index(var.names, each.value) >= length(var.display_names) ? var.display_name : element(var.display_names, index(var.names, each.value))
description = index(var.names, each.value) >= length(var.descriptions) ? var.description : element(var.descriptions, index(var.names, each.value))
project = var.project_id
disabled = lookup(var.disabled, each.value, false)
Expand Down
5 changes: 5 additions & 0 deletions test/integration/multiple_service_accounts/controls/gcp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,9 @@
end
end

attribute('display_names').each do |display_name|
describe google_service_accounts(project: "#{attribute('project_id')}") do
its('service_account_display_names'){ should include display_name }
end
end
end
3 changes: 3 additions & 0 deletions test/integration/multiple_service_accounts/inspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,6 @@ attributes:
- name: iam_emails
required: true
type: hash
- name: display_names
required: true
type: array
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@ variable "display_name" {
default = "Terraform-managed service account"
}

variable "display_names" {
type = list(string)
description = "List of display_names for the created service accounts (elements default to the value of `display_name`)"
default = []
}

variable "description" {
type = string
description = "Default description of the created service accounts (defaults to no description)"
Expand Down