Skip to content

Commit 8185668

Browse files
umairidriszeleena
authored andcommitted
Add workforce identity federation config to secure source manager ins… (GoogleCloudPlatform#11951)
1 parent f28996f commit 8185668

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

mmv1/products/securesourcemanager/Instance.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,16 @@ examples:
133133
oics_vars_overrides:
134134
'prevent_destroy': 'false'
135135
external_providers: ["time"]
136+
- name: 'secure_source_manager_instance_workforce_identity_federation'
137+
primary_resource_id: 'default'
138+
primary_resource_name: 'fmt.Sprintf("tf-test-my-instance%s", context["random_suffix"])'
139+
vars:
140+
instance_id: 'my-instance'
141+
prevent_destroy: 'true'
142+
test_vars_overrides:
143+
'prevent_destroy': 'false'
144+
oics_vars_overrides:
145+
'prevent_destroy': 'false'
136146
parameters:
137147
- name: 'location'
138148
type: String
@@ -244,3 +254,16 @@ properties:
244254
description: |
245255
Service Attachment for SSH, resource is in the format of `projects/{project}/regions/{region}/serviceAttachments/{service_attachment}`.
246256
output: true
257+
- name: 'workforceIdentityFederationConfig'
258+
type: NestedObject
259+
description: |
260+
Configuration for Workforce Identity Federation to support third party identity provider.
261+
If unset, defaults to the Google OIDC IdP.
262+
immutable: true
263+
properties:
264+
- name: 'enabled'
265+
type: Boolean
266+
description: |
267+
'Whether Workforce Identity Federation is enabled.'
268+
required: true
269+
immutable: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
resource "google_secure_source_manager_instance" "{{$.PrimaryResourceId}}" {
2+
location = "us-central1"
3+
instance_id = "{{index $.Vars "instance_id"}}"
4+
5+
workforce_identity_federation_config {
6+
enabled = true
7+
}
8+
9+
# Prevent accidental deletions.
10+
lifecycle {
11+
prevent_destroy = "{{index $.Vars "prevent_destroy"}}"
12+
}
13+
}

0 commit comments

Comments
 (0)