This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
variable "tenancy_ocid" {} | |
variable "user_ocid" {} | |
variable "fingerprint" {} | |
variable "private_key_path" {} | |
variable "private_key_password" {} | |
variable "region" {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
export TF_VAR_tenancy_ocid="ocid1.tenancy.oc1..aaaaaaaa.your.tenancy" | |
export TF_VAR_user_ocid="ocid1.user.oc1..aaaaaaaa.your.user" | |
export TF_VAR_fingerprint="a4:b3:ce:d9:e2:fa:gb:hc:i8:j9:k7:la:m2:n0:o0:p4" | |
export TF_VAR_private_key_path="/home/user/.oci/oci_api_key.pem" | |
export TF_VAR_private_key_password="very-secret-password-that-nobody-knows" | |
export TF_VAR_region="us-ashburn-1" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# following list is shortened for brevity | |
resource oci_core_instance export_first-terraform-discovery { | |
availability_domain = "YHQr:US-ASHBURN-AD-1" | |
compartment_id = "${var.compartment_ocid}" | |
create_vnic_details { | |
assign_public_ip = "true" | |
display_name = "first-terraform-discovery" | |
hostname_label = "first-terraform-discovery" | |
private_ip = "10.0.0.8" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
./terraform-provider-oci -command=export \ | |
-compartment_id=ocid1.compartment.oc1..aaaaaaaaqlflef2c737uygiiwutq7nv6eyh7ajidzpecmfg33ys37457b3pa \ | |
-output_path=tf-export \ | |
-services=core,tagging |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
provider "oci" { | |
version = "~> 3.72" | |
tenancy_ocid = var.tenancy_ocid | |
user_ocid = var.user_ocid | |
fingerprint = var.fingerprint | |
private_key_path = var.private_key_path | |
region = var.region | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ------------------- | |
" Generic markdownify | |
" ------------------- | |
" Put every tag to new line | |
%s/></>\r</g | |
" Separate paragraphs by one line | |
%s/<br \/>\n*<br \/>/\r\r/ | |
%s/\n\n\{2,}/\r\r/ | |
" Markdownify links |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(def counter (ref 0 :validator number?)) | |
; #'user/counter | |
(dosync (ref-set counter "string")) | |
; IllegalStateException Invalid reference state clojure.lang.ARef.validate (ARef.java:33) | |
@counter | |
; 0 | |
(dosync (ref-set counter 42)) | |
; 42 | |
@counter | |
; 42 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dosync (alter my-ref #(apply str (reverse %)))) | |
; "atad elbatummi rehtona" | |
@my-ref | |
; "atad elbatummi rehtona" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(dosync (ref-set my-ref "another immutable data")) | |
; "another immutable data" | |
@my-ref | |
; "another immutable data" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ref-set my-ref "another immutable data") | |
; IllegalStateException No transaction running | |
; clojure.lang.LockingTransaction.getEx (LockingTransaction.java:208) |