You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change the resource id of the transit gateway fails, apply again and it works:
$ cat main.tf
variable "ibmcloud_api_key" {
}
variable "resource_group_name" {
default = "default"
}
variable "region" {
default = "us-south"
}
variable "basename" {
description = "Name for the VPC to create and prefix to use for all other resources."
default = "example"
}
provider "ibm" {
region = var.region
ibmcloud_api_key = var.ibmcloud_api_key
generation = 2
}
data "ibm_resource_group" "group" {
name = var.resource_group_name
}
#resource "ibm_tg_gateway" "tgw2"{
resource "ibm_tg_gateway" "tgw"{
name = "${var.basename}-tgw"
location = var.region
global = false
resource_group = data.ibm_resource_group.group.id
}
$ terraform apply -auto-approve
$ edit main.tf
Change the id of ibm_tg_gateway from tgw to tgw2
$ terraform apply -auto-approve
data.ibm_resource_group.group: Refreshing state...
ibm_tg_gateway.tgw: Refreshing state... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f]
ibm_tg_gateway.tgw: Destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f]
ibm_tg_gateway.tgw2: Creating...
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 10s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 20s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 30s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 40s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 50s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 1m0s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 1m10s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 1m20s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 1m30s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 1m40s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 1m50s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 2m0s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 2m10s elapsed]
ibm_tg_gateway.tgw: Still destroying... [id=414a2cdf-4bee-4e4f-b1df-d570c2a57a0f, 2m20s elapsed]
ibm_tg_gateway.tgw: Destruction complete after 2m29s
Error: A gateway with the same name already exists.
on main.tf line 25, in resource "ibm_tg_gateway" "tgw2":
25: resource "ibm_tg_gateway" "tgw2"{
Try again and it works
$ terraform apply -auto-approve
data.ibm_resource_group.group: Refreshing state...
ibm_tg_gateway.tgw2: Creating...
ibm_tg_gateway.tgw2: Still creating... [10s elapsed]
ibm_tg_gateway.tgw2: Still creating... [20s elapsed]
ibm_tg_gateway.tgw2: Still creating... [30s elapsed]
ibm_tg_gateway.tgw2: Still creating... [40s elapsed]
ibm_tg_gateway.tgw2: Creation complete after 43s [id=6375ed6f-3e1c-42b6-9ebb-b80a6751cd33]
Apply complete! Resources: 1 added, 0 changed, 0 destroyed.
$ terraform version
Terraform v0.12.24
+ provider.ibm v1.10.0
Your version of Terraform is out of date! The latest version
is 0.12.29. You can update by downloading from https://www.terraform.io/downloads.html
The text was updated successfully, but these errors were encountered:
Change the resource id of the transit gateway fails, apply again and it works:
Change the id of ibm_tg_gateway from tgw to tgw2
Try again and it works
The text was updated successfully, but these errors were encountered: