Skip to content

Commit

Permalink
remove variable ssh_private_key_path (#36)
Browse files Browse the repository at this point in the history
* remove variable ssh_private_key_path

* terraform-docs: automated action

* add terraform.tfvars.template

* terraform-docs: automated action

---------

Co-authored-by: Filippo Merante <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored May 15, 2024
1 parent 1176491 commit fc547cb
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 63 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,15 @@ No modules.
| <a name="input_availability_domain_number"></a> [availability\_domain\_number](#input\_availability\_domain\_number) | The availability domain number | `number` | `1` | no |
| <a name="input_compartment_ocid"></a> [compartment\_ocid](#input\_compartment\_ocid) | The OCID of the compartment | `string` | n/a | yes |
| <a name="input_instance_display_name"></a> [instance\_display\_name](#input\_instance\_display\_name) | The display name of the instance | `string` | `"DockerHost"` | no |
| <a name="input_instance_image_ocid"></a> [instance\_image\_ocid](#input\_instance\_image\_ocid) | n/a | `map(any)` | <pre>{<br> "af-johannesburg-1": "ocid1.image.oc1.af-johannesburg-1.aaaaaaaayr7olrkwsywgxwznyiypnwcwjh66kjz37b5srp5lsciqzds6fy6q",<br> "ap-chuncheon-1": "ocid1.image.oc1.ap-chuncheon-1.aaaaaaaagn7tnetjt3r7qxn74kypb6gyfcsh2t3kwbljzmm62hr2qlowttxq",<br> "ap-hyderabad-1": "ocid1.image.oc1.ap-hyderabad-1.aaaaaaaar5rawf6psuetovqo2shgmg57luphw3ihejcuhkznnoesezckgpca",<br> "ap-melbourne-1": "ocid1.image.oc1.ap-melbourne-1.aaaaaaaatms7n733avabecvupvyq3skjdtyvzznxbfbqamesny3bbunwwx2q",<br> "ap-mumbai-1": "ocid1.image.oc1.ap-mumbai-1.aaaaaaaafpthmkvrokvfimled5btpksd5raurhsabommgfygrynw5zfydg3q",<br> "ap-osaka-1": "ocid1.image.oc1.ap-osaka-1.aaaaaaaa67n74wtxv7hamkpvjc5nrtqb4w2mqisusg46d77zp24cchk244wq",<br> "ap-seoul-1": "ocid1.image.oc1.ap-seoul-1.aaaaaaaa6skd222zi3ivkke3pz7bxqwikxdp73w5imhjssrr3qv3ya2toera",<br> "ap-singapore-1": "ocid1.image.oc1.ap-singapore-1.aaaaaaaaocagesx3qky63sisclxb47hbmkutctlqyplwnnsfqltliri2v2ka",<br> "ap-sydney-1": "ocid1.image.oc1.ap-sydney-1.aaaaaaaacuk7uab3nq22indgjsm6r6nryvbvjng375woaiz2vuwf6r7qfuna",<br> "ap-tokyo-1": "ocid1.image.oc1.ap-tokyo-1.aaaaaaaav5hvfyet6jx5ys7b4eil7qm4tgdvxcek3zfm45na3rhbfisfwjpq",<br> "ca-montreal-1": "ocid1.image.oc1.ca-montreal-1.aaaaaaaakjerkgbhiww3pglpipxbh4wmdvvpf22nawoog5uefcpsoobuh7za",<br> "ca-toronto-1": "ocid1.image.oc1.ca-toronto-1.aaaaaaaaj435kez3bh2xfko63cmyxjo3ig4wkiq564opmv4eptiroypcjcma",<br> "eu-amsterdam-1": "ocid1.image.oc1.eu-amsterdam-1.aaaaaaaav4k3bt57ntis62ahfa56j5zci2xdg2yhashwh6q5k35ucpw7m2dq",<br> "eu-frankfurt-1": "ocid1.image.oc1.eu-frankfurt-1.aaaaaaaa5ogkqtzgjbo7bazv5l3re3yxcc6iifu5waavjqzc2s6iqm4lw2ia",<br> "eu-madrid-1": "ocid1.image.oc1.eu-madrid-1.aaaaaaaacjvjivw2646yxiwetlr3as3xqsgqbbdijmnvdap43r44chbssuka",<br> "eu-marseille-1": "ocid1.image.oc1.eu-marseille-1.aaaaaaaanhsmnxu76u6tki2g52m7swmhn7wemvh7omtuw5pofefctyobthhq",<br> "eu-milan-1": "ocid1.image.oc1.eu-milan-1.aaaaaaaad3j7uywpk4jwlvdkpocjuc77mhong637pguaewspkf4ehxnic3aq",<br> "eu-paris-1": "ocid1.image.oc1.eu-paris-1.aaaaaaaautyng5nv2yqff7it3incvifa7m7wwyymwyt7iabg6tcymrmg6cmq",<br> "eu-stockholm-1": "ocid1.image.oc1.eu-stockholm-1.aaaaaaaavn7a3eg2pwjs7vnuj4iuuioqklrabygfzn2huqcjrxbnfobuyeya",<br> "eu-zurich-1": "ocid1.image.oc1.eu-zurich-1.aaaaaaaa7rcmbgbl2sfn4oqsbg3juqgvligm52yyegebajb7eo6i7nybbegq",<br> "il-jerusalem-1": "ocid1.image.oc1.il-jerusalem-1.aaaaaaaany743ypyvtrra55dw6ckkoydc53wxdjufaxiikpv3woakb3iricq",<br> "me-abudhabi-1": "ocid1.image.oc1.me-abudhabi-1.aaaaaaaaqzlprpy4yprynuks242oxkko4rgiofkm5zga6hn7rs2ns5o5nxfq",<br> "me-dubai-1": "ocid1.image.oc1.me-dubai-1.aaaaaaaaz2atnyu3qlgabmi2ioyts3zihemshxgl3hw6th6whg6ho5dizzjq",<br> "me-jeddah-1": "ocid1.image.oc1.me-jeddah-1.aaaaaaaaot3yo4s6byxfic3xu4excsa6r73twhrsfrohdj3bodgfbndp54na",<br> "mx-queretaro-1": "ocid1.image.oc1.mx-queretaro-1.aaaaaaaapbwwik6m7pbfo6vt25gwkqaysffnbjeqdxve2f7tboqzyvqfnubq",<br> "sa-santiago-1": "ocid1.image.oc1.sa-santiago-1.aaaaaaaaxmovw3ir5mutoi2rtfd55qqew5kizuk74dm44xbqpjpoq2k5zwuq",<br> "sa-saopaulo-1": "ocid1.image.oc1.sa-saopaulo-1.aaaaaaaasgdn7mttxohdxv2aorkllmjpb6da43sbojpnv4el6mmp4f37wanq",<br> "sa-vinhedo-1": "ocid1.image.oc1.sa-vinhedo-1.aaaaaaaad6jcyexupdegr4zaubevwxgotxih2d3gvzl6vpt5hsc66l3xfkeq",<br> "uk-cardiff-1": "ocid1.image.oc1.uk-cardiff-1.aaaaaaaaibtfqkzvy7r7kvd7wpmbt5f3cu7bcxcpiiekru2hrfsnnjtie3uq",<br> "uk-london-1": "ocid1.image.oc1.uk-london-1.aaaaaaaapqvy5cln3muczrzgic2uwcy4u7bgu6hlhmx5pd363gyvesptm63a",<br> "us-ashburn-1": "ocid1.image.oc1.iad.aaaaaaaauecuylimto4aqvfsszeazaprorqejoh6ttuupsdks723z2diu5fq",<br> "us-chicago-1": "ocid1.image.oc1.us-chicago-1.aaaaaaaavgwin5uvme4ycwt6igr6a3zoykiuu3nbbgvr674cm7afbsotsh4a",<br> "us-phoenix-1": "ocid1.image.oc1.phx.aaaaaaaa4iks3c6emzj2gshvwmsnheutndb2gzfvyst6jfvr5basm4cqzqeq",<br> "us-sanjose-1": "ocid1.image.oc1.us-sanjose-1.aaaaaaaara5hwkhromkbdp6kof77koicopxw34zt5v5lnqejz72xa6ixjl6q"<br>}</pre> | no |
| <a name="input_instance_image_ocid"></a> [instance\_image\_ocid](#input\_instance\_image\_ocid) | The OCID of the image to use for the instance | `map(any)` | <pre>{<br> "af-johannesburg-1": "ocid1.image.oc1.af-johannesburg-1.aaaaaaaayatt2q3wf65wyaey7soibfye7ilnguxfw2m37xspz2dvnk66avha",<br> "ap-chuncheon-1": "ocid1.image.oc1.ap-chuncheon-1.aaaaaaaatrfzu3rtfs4clvu3d3lcx3w47dhfwley334h2e4kibgkguof2jbq",<br> "ap-hyderabad-1": "ocid1.image.oc1.ap-hyderabad-1.aaaaaaaazws25hclevz2gawql32qjxy47t3qm267pki6a7dovu5s5zec5cuq",<br> "ap-melbourne-1": "ocid1.image.oc1.ap-melbourne-1.aaaaaaaaxdac5qbdmi7kjgurknuoxnw6gopfcf63liqljjh5tt24fpd4j7aa",<br> "ap-mumbai-1": "ocid1.image.oc1.ap-mumbai-1.aaaaaaaavldnviyso3bjs4ppc6vnvkxhm6cwrd25qxioxvlgfdvuhiolqn3q",<br> "ap-osaka-1": "ocid1.image.oc1.ap-osaka-1.aaaaaaaanafsjeu6sgbgtcs2unflym5b3ayetwyig3fjav5ld44qkosv4yxq",<br> "ap-seoul-1": "ocid1.image.oc1.ap-seoul-1.aaaaaaaaaogjhvie4g6lnuaqnedzrnqsyoejaisp2ri4pkifofw3gbfx2fsq",<br> "ap-singapore-1": "ocid1.image.oc1.ap-singapore-1.aaaaaaaamxlszcgvwvzrknu5b6ajifilcz2g5rdnxzunpqm2tuy5pu5iqf5q",<br> "ap-sydney-1": "ocid1.image.oc1.ap-sydney-1.aaaaaaaaifa7kduccxfitcylxubkht7cdhl63obna2bkduk6zkvhymbfnxka",<br> "ap-tokyo-1": "ocid1.image.oc1.ap-tokyo-1.aaaaaaaat7tma2qo5x5ceupmsak7w3qj5pq73ir67b45l7su7y3xltym3eoq",<br> "ca-montreal-1": "ocid1.image.oc1.ca-montreal-1.aaaaaaaapk2rls5h5v3mtyvtglhq2zglh4a3yyrufz2rdxtspihe6pq4j6va",<br> "ca-toronto-1": "ocid1.image.oc1.ca-toronto-1.aaaaaaaa24sdg3g3jhzk4xbbzq66lfkw65iuuhsg4rg5vmi5oq6tx2pw2pja",<br> "eu-amsterdam-1": "ocid1.image.oc1.eu-amsterdam-1.aaaaaaaa2thbdtvsvy477jexghizqta2ncgjpb63yc32cir7ecjo4o2qcf5q",<br> "eu-frankfurt-1": "ocid1.image.oc1.eu-frankfurt-1.aaaaaaaauowdt3masemltfslfv7rp67e6i4ple7t4u6ygyt5k6ub3vduusiq",<br> "eu-madrid-1": "ocid1.image.oc1.eu-madrid-1.aaaaaaaaopqz7l22adkrh32xle75d367u5le4cbcalenqssee7kpzek2zera",<br> "eu-marseille-1": "ocid1.image.oc1.eu-marseille-1.aaaaaaaat6vsgurqc3yqmc6frh3v3fkgos6ftjsdvzbewxz33sd22fnnucca",<br> "eu-milan-1": "ocid1.image.oc1.eu-milan-1.aaaaaaaayqlb7nqz3gdno4paz3h2qqxkyf4zzfttjnoh4ij2kpcg4467y2ea",<br> "eu-paris-1": "ocid1.image.oc1.eu-paris-1.aaaaaaaaxvkt7p62m5gwoeffjeocdy26mxdosapdhtld7nxfogc4spooa2sq",<br> "eu-stockholm-1": "ocid1.image.oc1.eu-stockholm-1.aaaaaaaalifousimc5zr4ypepp6b6bzjqhx5afuulxaqmujuc2voqs5fsn5a",<br> "eu-zurich-1": "ocid1.image.oc1.eu-zurich-1.aaaaaaaaxluw6jh3jmpyg5dkpsnpg63wzphzac4cdhgfte2fss7g5gcwihca",<br> "il-jerusalem-1": "ocid1.image.oc1.il-jerusalem-1.aaaaaaaapuniww6o33se3sfty6feri6ktxl6brlwwvsegukjcxoinzwi5wvq",<br> "me-abudhabi-1": "ocid1.image.oc1.me-abudhabi-1.aaaaaaaa6b2qwjnh7rpzj3meotg55salzwi563hhbmbyks5hf2dezjoyiecq",<br> "me-dubai-1": "ocid1.image.oc1.me-dubai-1.aaaaaaaag3hbb5cvalx747wg6dplm2cxjc4fq5uux2xbticnc3vjrqzwhxgq",<br> "me-jeddah-1": "ocid1.image.oc1.me-jeddah-1.aaaaaaaamk2h7ilswb472holpkykgtlyqcsgucr7j7o3k6x2em5pbisywjsq",<br> "mx-queretaro-1": "ocid1.image.oc1.mx-queretaro-1.aaaaaaaa5ng35ewch32nilgapabou4olvtqxgabpq762p3qx56qy2dwmctaq",<br> "sa-santiago-1": "ocid1.image.oc1.sa-santiago-1.aaaaaaaal6gxoyh4gfm2vxaua2464ieilwfth77msu7uemfpkadkkt6mjfka",<br> "sa-saopaulo-1": "ocid1.image.oc1.sa-saopaulo-1.aaaaaaaaqghurigdiwlf726pmgzlzmbqkgo5inn7k7bx5q4lpqhfjsr6apcq",<br> "sa-vinhedo-1": "ocid1.image.oc1.sa-vinhedo-1.aaaaaaaa3b3p5xmkvam7h2km5irockkgrjl7acnntzbi73u6lcdlmdvwob3a",<br> "uk-cardiff-1": "ocid1.image.oc1.uk-cardiff-1.aaaaaaaagy2eilwxcrz7y5vyehraeoisdxpg4ub2txsap4q2tn7h3x2uyznq",<br> "uk-london-1": "ocid1.image.oc1.uk-london-1.aaaaaaaanqwfiejnlcawmwoa2ku73qghuiumgaiffldgfk5ig7xx4tlfcjua",<br> "us-ashburn-1": "ocid1.image.oc1.iad.aaaaaaaaf4tcgubjzoxwaa4xteropz4zidxitlbjcwogcglzxwtspwiv74ha",<br> "us-chicago-1": "ocid1.image.oc1.us-chicago-1.aaaaaaaajrmkhokn3hqdlqtevwvcyxh67fknrp5ljo33kp25nci34viblkxq",<br> "us-phoenix-1": "ocid1.image.oc1.phx.aaaaaaaafpqctvbk7lcxfztmjxhyfd5pyhixs4h23uzjiddjlxfs6eva57xa",<br> "us-sanjose-1": "ocid1.image.oc1.us-sanjose-1.aaaaaaaa54zxwb6ujfbrycebkkmy4tdc7szox3l76l6un7wfjgln4drzcvda"<br>}</pre> | no |
| <a name="input_instance_shape"></a> [instance\_shape](#input\_instance\_shape) | The shape of the instance | `string` | `"VM.Standard.A1.Flex"` | no |
| <a name="input_instance_shape_boot_volume_size_in_gbs"></a> [instance\_shape\_boot\_volume\_size\_in\_gbs](#input\_instance\_shape\_boot\_volume\_size\_in\_gbs) | The size of the boot volume in GBs | `string` | `"50"` | no |
| <a name="input_instance_shape_config_memory_in_gbs"></a> [instance\_shape\_config\_memory\_in\_gbs](#input\_instance\_shape\_config\_memory\_in\_gbs) | The amount of memory in GBs for the instance | `string` | `"24"` | no |
| <a name="input_instance_shape_config_ocpus"></a> [instance\_shape\_config\_ocpus](#input\_instance\_shape\_config\_ocpus) | The number of OCPUs for the instance | `string` | `"4"` | no |
| <a name="input_instance_shape_docker_volume_size_in_gbs"></a> [instance\_shape\_docker\_volume\_size\_in\_gbs](#input\_instance\_shape\_docker\_volume\_size\_in\_gbs) | The size of the docker volume in GBs | `string` | `"150"` | no |
| <a name="input_oracle_api_key_fingerprint"></a> [oracle\_api\_key\_fingerprint](#input\_oracle\_api\_key\_fingerprint) | The fingerprint of the public key | `string` | n/a | yes |
| <a name="input_oracle_api_private_key_path"></a> [oracle\_api\_private\_key\_path](#input\_oracle\_api\_private\_key\_path) | The path to the private key | `string` | n/a | yes |
| <a name="input_oracle_api_private_key_path"></a> [oracle\_api\_private\_key\_path](#input\_oracle\_api\_private\_key\_path) | The path to the private key | `string` | `"~/.oci/oci_api_key.pem"` | no |
| <a name="input_region"></a> [region](#input\_region) | The region to deploy to | `string` | `"eu-milan-1"` | no |
| <a name="input_ssh_private_key_path"></a> [ssh\_private\_key\_path](#input\_ssh\_private\_key\_path) | The path to the private key | `string` | n/a | yes |
| <a name="input_ssh_public_key"></a> [ssh\_public\_key](#input\_ssh\_public\_key) | The public key to use for SSH access | `string` | n/a | yes |
| <a name="input_tenancy_ocid"></a> [tenancy\_ocid](#input\_tenancy\_ocid) | The OCID of the tenancy | `string` | n/a | yes |
| <a name="input_user_ocid"></a> [user\_ocid](#input\_user\_ocid) | The OCID of the user to use for authentication | `string` | n/a | yes |
Expand Down
17 changes: 0 additions & 17 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ resource "oci_core_volume" "docker_volume" {
compartment_id = var.compartment_ocid
availability_domain = data.oci_identity_availability_domain.ad.name
size_in_gbs = var.instance_shape_docker_volume_size_in_gbs

}

resource "oci_core_volume_attachment" "docker_volume_attachment" {
Expand Down Expand Up @@ -193,19 +192,3 @@ data "oci_core_vnic_attachments" "instance_vnics" {
data "oci_core_vnic" "instance_vnic" {
vnic_id = lookup(data.oci_core_vnic_attachments.instance_vnics.vnic_attachments[0], "vnic_id")
}



# resource "null_resource" "cloud_init_watcher_provisioner" {
# triggers = {
# state = "RUNNING"
# }

# connection {
# type = "ssh"
# host = oci_core_instance.instance.public_ip
# user = "ubuntu"
# port = "22"
# private_key = file(var.ssh_private_key_path)
# }
# }
10 changes: 10 additions & 0 deletions terraform.tfvars.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Oracle API Key
TF_VAR_oracle_api_key_fingerprint=
# Oracle Cloud Infrastructure User OCID
TF_VAR_user_ocid=
# Oracle Cloud Infrastructure Tenancy OCID
TF_VAR_tenancy_ocid=
# Oracle Cloud Infrastructure Compartment OCID
TF_VAR_compartment_ocid=
# SSH Public Key for the Oracle Cloud Infrastructure Compute Instance
TF_VAR_ssh_public_key=
Loading

0 comments on commit fc547cb

Please sign in to comment.