Skip to content

Commit

Permalink
fix: update outputs and fix cluster IAM role reference (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstrates authored Dec 14, 2024
1 parent 1bacd50 commit 7029e2e
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ concurrency:

jobs:
terraform-ci:
name: Terraform CI
permissions:
pull-requests: write
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ resource "aws_neptune_cluster" "this" {
neptune_subnet_group_name = try(aws_neptune_subnet_group.this[0].name, null)
kms_key_arn = try(var.kms_key_arn, null)
iam_database_authentication_enabled = var.iam_database_authentication_enabled
iam_roles = try([module.iam_role_neptune.iam_role_arn], var.iam_roles)
iam_roles = try([aws_iam_role.this[0].arn], var.iam_roles)
availability_zones = try(var.availability_zones, null)
copy_tags_to_snapshot = try(var.copy_tags_to_snapshot, null)
final_snapshot_identifier = try(var.final_snapshot_identifier, null)
Expand Down
17 changes: 11 additions & 6 deletions outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,24 @@ output "neptune_cluster_resource_id" {
value = try(aws_neptune_cluster.this[0].cluster_resource_id, null)
}

output "neptune_cluster_snapshot_arn" {
description = "The Amazon Resource Name (ARN) for the DB Cluster Snapshot"
value = try(aws_neptune_cluster_snapshot.this[0].arn, null)
output "neptune_cluster_snapshot_identifier" {
description = "The Identifier for the DB Cluster Snapshot"
value = try(aws_neptune_cluster_snapshot.this[0].db_cluster_snapshot_identifier, null)
}

output "neptune_iam_role_arn" {
description = "ARN of the IAM role for Neptune"
value = try(aws_iam_role.this[0].arn, null)
}

output "neptune_instance_id" {
description = "ID of the Neptune cluster instance"
value = try(aws_neptune_cluster_instance.this[0].id, null)
output "neptune_primary_instance_id" {
description = "ID of the primary Neptune cluster instance"
value = try(aws_neptune_cluster_instance.primary[0].id, null)
}

output "neptune_read_replica_ids" {
description = "IDs of the Neptune read replica instances"
value = try(aws_neptune_cluster_instance.read_replicas[*].id, [])
}

output "neptune_parameter_group_id" {
Expand Down

0 comments on commit 7029e2e

Please sign in to comment.