This module allows to create a Secure Source Manager instance and repositories in it. Additionally it allows creating instance IAM bindings and repository IAM bindings.
module "ssm_instance" {
source = " ./fabric/modules/secure-source-manager-instance"
project_id = var. project_id
instance_id = " my-instance"
location = var. region
repositories = {
my-repository = {
location = var.region
}
}
}
# tftest modules=1 resources=2 inventory=public-instance.yaml
Public instance with CMEK
module "ssm_instance" {
source = " ./fabric/modules/secure-source-manager-instance"
project_id = var. project_id
instance_id = " my-instance"
location = var. region
kms_key = " projects/another-project-id/locations/${ var . region } /keyRings/my-key-ring/cryptoKeys/my-key"
repositories = {
my-repository = {
location = var.region
}
}
}
# tftest modules=1 resources=2 inventory=public-instance-with-cmek.yaml
module "ssm_instance" {
source = " ./fabric/modules/secure-source-manager-instance"
project_id = var. project_id
instance_id = " my-instance"
location = var. region
ca_pool = " projects/another-project/locations/${ var . region } /caPools/my-ca-pool"
repositories = {
my-repository = {
location = var.region
}
}
}
# tftest modules=1 resources=2 inventory=private-instance.yaml
module "ssm_instance" {
source = " ./fabric/modules/secure-source-manager-instance"
project_id = var. project_id
instance_id = " my-instance"
location = var. region
iam = {
" roles/securesourcemanager.instanceOwner" = [
" group:[email protected] "
]
}
repositories = {
my-repository = {
location = var.region
iam = {
" roles/securesourcemanager.repoAdmin" = [
" group:[email protected] "
]
}
}
}
}
# tftest modules=1 resources=4 inventory=iam.yaml
module "ssm_instance" {
source = " ./fabric/modules/secure-source-manager-instance"
project_id = var. project_id
instance_id = " my-instance"
location = var. region
iam_bindings_additive = {
my-instance-admin = {
role = " roles/securesourcemanager.instanceOwner"
member = " group:[email protected] "
}
}
repositories = {
my-repository = {
location = var.region
iam_bindings_additive = {
my-repository-admin = {
role = " roles/securesourcemanager.repoAdmin"
member = " group:[email protected] "
}
}
}
}
}
# tftest modules=1 resources=4 inventory=iam-bindings.yaml
module "ssm_instance" {
source = " ./fabric/modules/secure-source-manager-instance"
project_id = var. project_id
instance_id = " my-instance"
location = var. region
iam_bindings = {
my-instance-admin = {
role = " roles/securesourcemanager.instanceOwner"
members = [
" group:[email protected] "
]
}
}
repositories = {
my-repository = {
location = var.region
iam_bindings = {
my-repository-admin = {
role = " roles/securesourcemanager.repoAdmin"
members = [
" group:[email protected] "
]
}
}
}
}
}
# tftest modules=1 resources=4 inventory=iam-bindings-additive.yaml