Skip to content

Commit 79a25a3

Browse files
committed
Provider conditional
1 parent c358550 commit 79a25a3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

main.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
resource "aws_iam_openid_connect_provider" "this" {
2+
count = var.create_identity_provider ? 1 : 0
3+
24
url = var.url
35

46
client_id_list = var.client_id_list

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,9 @@ variable "tags" {
4848
default = {}
4949
description = "Tags"
5050
}
51+
52+
variable "create_identity_provider" {
53+
type = bool
54+
default = true
55+
description = "This switch allows you to create or not create the identity provider. Only one can exist. If you are creating multiple Github OIDC Federations, only one of the instantiations should create this or the Terraform run will fail."
56+
}

0 commit comments

Comments
 (0)