unfunco / terraform-aws-oidc-github

Terraform module to configure GitHub Actions as an IAM OIDC identity provider in AWS.
https://registry.terraform.io/modules/unfunco/oidc-github/aws/latest
Apache License 2.0
91 stars 51 forks source link

[Bug] 1.7.0 errors when create_oidc_provider = false #39

Closed morremeyer closed 8 months ago

morremeyer commented 8 months ago

When create_oidc_provider = false is set, 1.7.0 errors with

Error: Invalid index
on .terraform/modules/<module_name>/outputs.tf line 30, in output "oidc_provider_arn":
  value       = var.enabled ? aws_iam_openid_connect_provider.github[0].arn : ""
aws_iam_openid_connect_provider.github is empty tuple
The given key does not identify an element in this collection value: the collection has no elements.