Skip to content

Commit af03c6e

Browse files
Shivank Thapasankhsin
authored andcommitted
Added - Support for VCNIP - BYOASN (Bring Your Own ASN)
1 parent 5f684a5 commit af03c6e

21 files changed

+1414
-21
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
10+
variable "compartment_ocid" {}
11+
12+
provider "oci" {
13+
tenancy_ocid = var.tenancy_ocid
14+
user_ocid = var.user_ocid
15+
fingerprint = var.fingerprint
16+
private_key_path = var.private_key_path
17+
region = var.region
18+
}
19+
20+
variable "byoasn_asn" {
21+
default = 11
22+
}
23+
24+
variable "byoasn_display_name" {
25+
default = "test_byoasn_display_name"
26+
}
27+
28+
// Create a BYOASN resource
29+
resource "oci_core_byoasn" "byoasn_test_resource" {
30+
asn = var.byoasn_asn
31+
compartment_id = var.compartment_ocid
32+
display_name = var.byoasn_display_name
33+
}
34+
35+
// Get BYOASN resource details
36+
data "oci_core_byoasn" "byoasn_test_resource" {
37+
byoasn_id = oci_core_byoasn.byoasn_test_resource.id
38+
}

examples/networking/byoip/byoip.tf

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
// Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved.
2+
// Licensed under the Mozilla Public License v2.0
3+
4+
variable "tenancy_ocid" {}
5+
variable "user_ocid" {}
6+
variable "fingerprint" {}
7+
variable "private_key_path" {}
8+
variable "region" {}
9+
10+
variable "compartment_ocid" {}
11+
variable "byoip_ocid" {}
12+
13+
provider "oci" {
14+
tenancy_ocid = var.tenancy_ocid
15+
user_ocid = var.user_ocid
16+
fingerprint = var.fingerprint
17+
private_key_path = var.private_key_path
18+
region = var.region
19+
}
20+
21+
22+
// Get BYOIP resource details
23+
data "oci_core_byoip_range" "test_byoip_resource" {
24+
byoip_range_id = var.byoip_ocid
25+
}
26+
27+
// List BYOIP resources details
28+
data "oci_core_byoip_ranges" "test_byoip_resource" {
29+
compartment_id = var.compartment_ocid
30+
}
31+
32+
// GET byoip allocated ranges details
33+
data "oci_core_byoip_allocated_ranges" "test_byoip_allocated_ranges" {
34+
byoip_range_id = var.byoip_ocid
35+
}
36+

0 commit comments

Comments
 (0)