@@ -28,7 +28,7 @@ resource "random_string" "suffix" {
2828}
2929
3030resource "ibm_is_security_group" "new_sg" {
31- name = " ${ local . BASENAME } -sg"
31+ name = " ${ local . BASENAME } -sg- ${ random_string . suffix . result } "
3232 vpc = ibm_is_vpc. new_vpc . id
3333 resource_group = data. ibm_resource_group . target_rg . id
3434}
@@ -131,14 +131,14 @@ resource "ibm_is_security_group_rule" "ingress_http" {
131131
132132# Create a Public Gateway for the VPC
133133resource "ibm_is_public_gateway" "new_pgw" {
134- name = " ${ local . BASENAME } -public-gateway"
134+ name = " ${ local . BASENAME } -public-gateway- ${ random_string . suffix . result } "
135135 vpc = ibm_is_vpc. new_vpc . id
136136 zone = var. instance_zone
137137 resource_group = data. ibm_resource_group . target_rg . id
138138}
139139
140140resource "ibm_is_subnet" "new_subnet" {
141- name = " ${ local . BASENAME } -subnet"
141+ name = " ${ local . BASENAME } -subnet- ${ random_string . suffix . result } "
142142 vpc = ibm_is_vpc. new_vpc . id
143143 zone = var. instance_zone
144144 total_ipv4_address_count = 256
@@ -151,7 +151,7 @@ data "ibm_is_ssh_key" "ssh_key_id" {
151151}
152152
153153resource "ibm_is_instance" "iaas_vsi" {
154- name = " ${ local . BASENAME } -vsi"
154+ name = " ${ local . BASENAME } -vsi- ${ random_string . suffix . result } "
155155 vpc = ibm_is_vpc. new_vpc . id
156156 zone = var. instance_zone
157157 keys = [data . ibm_is_ssh_key . ssh_key_id . id ]
@@ -166,7 +166,7 @@ resource "ibm_is_instance" "iaas_vsi" {
166166}
167167
168168resource "ibm_is_floating_ip" "public_ip" {
169- name = " ${ local . BASENAME } -fip"
169+ name = " ${ local . BASENAME } -fip- ${ random_string . suffix . result } "
170170 target = ibm_is_instance. iaas_vsi . primary_network_interface [0 ]. id
171171 resource_group = data. ibm_resource_group . target_rg . id
172172}
0 commit comments