Skip to content

Commit 366a5c4

Browse files
committed
First release fixes
1 parent 2f301b9 commit 366a5c4

File tree

8 files changed

+63
-2
lines changed

8 files changed

+63
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ If you don't have the required permissions and quota, contact your tenancy admin
1616

1717
## Deploy Using Oracle Resource Manager
1818

19-
1. Click [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?region=home&zipUrl=https://github.com/oracle-quickstart/oci-redis/raw/master/resource-manager/oci-redis.zip)
19+
1. Click [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?region=home&zipUrl=https://github.com/oracle-quickstart/oci-redis/releases/latest/download/oci-redis-stack-latest.zip)
20+
2021

2122
If you aren't already signed in, when prompted, enter the tenancy and user credentials.
2223

network.tf

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ resource "oci_core_virtual_network" "redis-vcn" {
33
compartment_id = var.compartment_ocid
44
display_name = "${var.redis-prefix}-vcn"
55
dns_label = var.redis-prefix
6+
7+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
8+
69
}
710

811
resource "oci_core_subnet" "redis-subnet" {
@@ -14,12 +17,16 @@ resource "oci_core_subnet" "redis-subnet" {
1417
vcn_id = oci_core_virtual_network.redis-vcn.id
1518
route_table_id = oci_core_route_table.redis-rt.id
1619
dhcp_options_id = oci_core_virtual_network.redis-vcn.default_dhcp_options_id
20+
21+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
1722
}
1823

1924
resource "oci_core_internet_gateway" "redis-igw" {
2025
compartment_id = var.compartment_ocid
2126
display_name = "${var.redis-prefix}-igw"
2227
vcn_id = oci_core_virtual_network.redis-vcn.id
28+
29+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
2330
}
2431

2532
resource "oci_core_route_table" "redis-rt" {
@@ -32,5 +39,7 @@ resource "oci_core_route_table" "redis-rt" {
3239
destination_type = "CIDR_BLOCK"
3340
network_entity_id = oci_core_internet_gateway.redis-igw.id
3441
}
42+
43+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
3544
}
3645

redis_masters.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "oci_core_instance" "redis1" {
2121
metadata = {
2222
ssh_authorized_keys = tls_private_key.public_private_key_pair.public_key_openssh
2323
}
24+
25+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
2426
}
2527

2628
resource "oci_core_instance" "redis2" {
@@ -45,6 +47,8 @@ resource "oci_core_instance" "redis2" {
4547
metadata = {
4648
ssh_authorized_keys = tls_private_key.public_private_key_pair.public_key_openssh
4749
}
50+
51+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
4852
}
4953

5054
resource "oci_core_instance" "redis3" {
@@ -69,5 +73,7 @@ resource "oci_core_instance" "redis3" {
6973
metadata = {
7074
ssh_authorized_keys = tls_private_key.public_private_key_pair.public_key_openssh
7175
}
76+
77+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
7278
}
7379

redis_replicas.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ resource "oci_core_instance" "redis4" {
2121
metadata = {
2222
ssh_authorized_keys = tls_private_key.public_private_key_pair.public_key_openssh
2323
}
24+
25+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
2426
}
2527

2628
resource "oci_core_instance" "redis5" {
@@ -45,6 +47,8 @@ resource "oci_core_instance" "redis5" {
4547
metadata = {
4648
ssh_authorized_keys = tls_private_key.public_private_key_pair.public_key_openssh
4749
}
50+
51+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
4852
}
4953

5054
resource "oci_core_instance" "redis6" {
@@ -69,5 +73,7 @@ resource "oci_core_instance" "redis6" {
6973
metadata = {
7074
ssh_authorized_keys = tls_private_key.public_private_key_pair.public_key_openssh
7175
}
76+
77+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
7278
}
7379

schema.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ variableGroups:
3333
- instance_shape
3434
- instance_os
3535
- linux_os_version
36+
- release
3637

3738
variables:
3839

@@ -148,7 +149,13 @@ variables:
148149
description: "Choose Operating system version for Redis compute instances."
149150
enum:
150151
- "7.8"
151-
152+
153+
release:
154+
type: string
155+
required: false
156+
visible: false
157+
title: "Reference Architecture Release (OCI Architecture Center)"
158+
152159
outputs:
153160

154161
redis1_public_ip_address:

security_lists.tf

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ resource "oci_core_security_list" "redis-securitylist" {
99
vcn_id = oci_core_virtual_network.redis-vcn.id
1010
display_name = "${var.redis-prefix}-securitylist"
1111

12+
defined_tags = {"${oci_identity_tag_namespace.ArchitectureCenterTagNamespace.name}.${oci_identity_tag.ArchitectureCenterTag.name}" = var.release }
13+
1214
egress_security_rules {
1315
protocol = local.tcp_protocol
1416
destination = local.anywhere

tags.tf

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
resource "oci_identity_tag_namespace" "ArchitectureCenterTagNamespace" {
2+
compartment_id = var.compartment_ocid
3+
description = "ArchitectureCenterTagNamespace"
4+
name = "ArchitectureCenter\\deploy-redis-cluster"
5+
6+
provisioner "local-exec" {
7+
command = "sleep 10"
8+
}
9+
}
10+
11+
resource "oci_identity_tag" "ArchitectureCenterTag" {
12+
description = "ArchitectureCenterTag"
13+
name = "release"
14+
tag_namespace_id = oci_identity_tag_namespace.ArchitectureCenterTagNamespace.id
15+
16+
validator {
17+
validator_type = "ENUM"
18+
values = ["release", "1.0"]
19+
}
20+
21+
provisioner "local-exec" {
22+
command = "sleep 20"
23+
}
24+
25+
}

variables.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ variable "region" {}
66
variable "compartment_ocid" {}
77
variable "availablity_domain_name" {}
88

9+
variable "release" {
10+
description = "Reference Architecture Release (OCI Architecture Center)"
11+
default = "1.0"
12+
}
13+
914
variable "VCN-CIDR" {
1015
default = "10.0.0.0/16"
1116
}

0 commit comments

Comments
 (0)