Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GDB-10293] Added support for custom owner ID for the AMIs and added new default owner ID #48

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ Before you begin using this Terraform module, ensure you meet the following prer
| common\_tags | (Optional) Map of common tags for all taggable AWS resources. | `map(string)` | `{}` | no |
| resource\_name\_prefix | Resource name prefix used for tagging and naming AWS resources | `string` | n/a | yes |
| aws\_region | AWS region to deploy resources into | `string` | n/a | yes |
| override\_owner\_id | Override the default owner ID used for the AMI images | `string` | `null` | no |
| deploy\_backup | Deploy backup module | `bool` | `true` | no |
| backup\_schedule | Cron expression for the backup job. | `string` | `"0 0 * * *"` | no |
| backup\_retention\_count | Number of backups to keep. | `number` | `7` | no |
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,9 @@ module "graphdb" {

# VM Image

ami_id = var.ami_id
graphdb_version = var.graphdb_version
ami_id = var.ami_id
graphdb_version = var.graphdb_version
override_owner_id = var.override_owner_id

# Managed Disks

Expand Down
2 changes: 1 addition & 1 deletion modules/graphdb/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ data "aws_caller_identity" "current" {}
data "aws_ami" "graphdb" {
count = var.ami_id != null ? 0 : 1

owners = ["770034820396"] # Ontotext
owners = var.override_owner_id != null ? [var.override_owner_id] : ["679593333241"]
most_recent = true

filter {
Expand Down
5 changes: 5 additions & 0 deletions modules/graphdb/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ variable "aws_subscription_id" {
type = string
}

variable "override_owner_id" {
description = "Override the default owner ID used for the AMI images"
type = string
}

# GraphDB Parameters

variable "graphdb_admin_password" {
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ variable "aws_region" {
type = string
}

variable "override_owner_id" {
description = "Override the default owner ID used for the AMI images"
type = string
default = null
}

# Backup configurations
variable "deploy_backup" {
description = "Deploy backup module"
Expand Down