Skip to content

Commit

Permalink
feat: add variable for availability domain (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
robinlieb authored Jul 1, 2024
1 parent 80b3833 commit 0e974a0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ To help get started quickly with this Terraform module, I have included an examp

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_availability_domain"></a> [availability\_domain](#input\_availability\_domain) | The availability domain in which the instance should be created, e.g Uocm:PHX-AD-1. | `string` | n/a | yes |
| <a name="input_fingerprint"></a> [fingerprint](#input\_fingerprint) | The fingerprint of the private\_key, e.g. 8c:bf:17:7b:5f:e0:7d:13:75:11:d6:39:0d:e2:84:74. | `string` | n/a | yes |
| <a name="input_private_key"></a> [private\_key](#input\_private\_key) | The private key retrieved from the Oracle account. | `string` | n/a | yes |
| <a name="input_region"></a> [region](#input\_region) | The desired region of the cluster, e.g. us-phoenix-1. | `string` | n/a | yes |
Expand Down
2 changes: 1 addition & 1 deletion compute.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
resource "oci_core_instance" "ubuntu_instance" {
count = var.instance_count
availability_domain = data.oci_identity_availability_domains.ads.availability_domains[0].name
availability_domain = coalesce(var.availability_domain, data.oci_identity_availability_domains.ads.availability_domains[0].name)
compartment_id = oci_identity_compartment.terraform_compartment.id
shape = var.instance_shape

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

variable "availability_domain" {
description = "The availability domain in which the instance should be created, e.g Uocm:PHX-AD-1."
type = string
}

variable "ssh_public_key" {
description = "The public key used for SSH to the instances."
type = string
Expand Down

0 comments on commit 0e974a0

Please sign in to comment.