Skip to content

Commit

Permalink
Fix: add Reserved public IP
Browse files Browse the repository at this point in the history
  • Loading branch information
kral2 committed Oct 8, 2021
1 parent 9e567e4 commit 3bb47b8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 15 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ This module deploys an instance with the necessary tools to start developing Inf

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_assign_public_ip"></a> [assign\_public\_ip](#input\_assign\_public\_ip) | Whether the VNIC should be assigned a public IP address. | `bool` | `true` | no |
| <a name="input_block_storage_sizes_in_gbs"></a> [block\_storage\_sizes\_in\_gbs](#input\_block\_storage\_sizes\_in\_gbs) | Sizes of volumes to create and attach to each instance. | `list(string)` | `[]` | no |
| <a name="input_compartment_id"></a> [compartment\_id](#input\_compartment\_id) | compartment ocid where to create all resources | `string` | n/a | yes |
| <a name="input_defined_tags"></a> [defined\_tags](#input\_defined\_tags) | predefined and scoped to a namespace to tag the resources created using defined tags. | `map(string)` | `null` | no |
Expand All @@ -54,11 +53,11 @@ This module deploys an instance with the necessary tools to start developing Inf
| <a name="input_instance_flex_ocpus"></a> [instance\_flex\_ocpus](#input\_instance\_flex\_ocpus) | (Updatable) The total number of OCPUs available to the instance. | `number` | `1` | no |
| <a name="input_private_key"></a> [private\_key](#input\_private\_key) | n/a | `string` | `null` | no |
| <a name="input_private_key_path"></a> [private\_key\_path](#input\_private\_key\_path) | n/a | `string` | `null` | no |
| <a name="input_public_ip"></a> [public\_ip](#input\_public\_ip) | Whether to create a Public IP to attach to primary vnic and which lifetime. Valid values are NONE, RESERVED or EPHEMERAL. | `string` | `"RESERVED"` | no |
| <a name="input_region"></a> [region](#input\_region) | n/a | `string` | `null` | no |
| <a name="input_shape"></a> [shape](#input\_shape) | The shape of an instance. | `string` | `"VM.Standard.A1.Flex"` | no |
| <a name="input_source_ocid"></a> [source\_ocid](#input\_source\_ocid) | The OCID of an image or a boot volume to use, depending on the value of source\_type. | `string` | n/a | yes |
| <a name="input_source_type"></a> [source\_type](#input\_source\_type) | The source type for the instance. | `string` | `"image"` | no |
| <a name="input_ssh_authorized_keys"></a> [ssh\_authorized\_keys](#input\_ssh\_authorized\_keys) | DEPRECATED: use ssh\_public\_key or ssh\_public\_key\_path instead. Public SSH keys path to be included in the ~/.ssh/authorized\_keys file for the default user on the instance. | `string` | `null` | no |
| <a name="input_ssh_public_keys"></a> [ssh\_public\_keys](#input\_ssh\_public\_keys) | Public SSH keys to be included in the ~/.ssh/authorized\_keys file for the default user on the instance. To provide multiple keys, see docs/instance\_ssh\_keys.adoc. | `string` | `null` | no |
| <a name="input_tenancy_ocid"></a> [tenancy\_ocid](#input\_tenancy\_ocid) | n/a | `string` | `null` | no |
| <a name="input_user_data"></a> [user\_data](#input\_user\_data) | Provide your own base64-encoded data to be used by Cloud-Init to run custom scripts or provide custom Cloud-Init configuration. | `string` | `null` | no |
Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ module "instance_iacbox" {
ssh_public_keys = var.ssh_public_keys
user_data = filebase64(var.user_data)
# networking parameters
assign_public_ip = var.assign_public_ip
subnet_ocids = [oci_core_subnet.vcn_iacbox_public.id] # var.subnet_ocids
public_ip = var.public_ip
subnet_ocids = [oci_core_subnet.vcn_iacbox_public.id] # var.subnet_ocids
# storage parameters
block_storage_sizes_in_gbs = [] # no block volume will be created
}
15 changes: 4 additions & 11 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,6 @@ variable "source_type" {

## operating system parameters

variable "ssh_authorized_keys" {
#! Deprecation notice: Please use `ssh_public_key` or `ssh_public_key_path` instead
description = "DEPRECATED: use ssh_public_key or ssh_public_key_path instead. Public SSH keys path to be included in the ~/.ssh/authorized_keys file for the default user on the instance."
type = string
default = null
}

variable "ssh_public_keys" {
description = "Public SSH keys to be included in the ~/.ssh/authorized_keys file for the default user on the instance. To provide multiple keys, see docs/instance_ssh_keys.adoc."
type = string
Expand All @@ -130,10 +123,10 @@ variable "user_data" {

## networking parameters

variable "assign_public_ip" {
description = "Whether the VNIC should be assigned a public IP address."
type = bool
default = true
variable "public_ip" {
description = "Whether to create a Public IP to attach to primary vnic and which lifetime. Valid values are NONE, RESERVED or EPHEMERAL."
type = string
default = "RESERVED"
}

## storage parameters
Expand Down

0 comments on commit 3bb47b8

Please sign in to comment.