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
On first apply, the service is created, the zone too but it fails to create the 4 permitted networks:
Terraform will perform the following actions:
# ibm_dns_permitted_network.vpc["r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247"] will be created
+ resource "ibm_dns_permitted_network" "vpc" {
+ created_on = (known after apply)
+ id = (known after apply)
+ instance_id = (known after apply)
+ modified_on = (known after apply)
+ permitted_network_id = (known after apply)
+ state = (known after apply)
+ type = "vpc"
+ vpc_crn = "crn:v1:bluemix:public:is:us-south:a/123::vpc:r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247"
+ zone_id = (known after apply)
}
# ibm_dns_permitted_network.vpc["r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a"] will be created
+ resource "ibm_dns_permitted_network" "vpc" {
+ created_on = (known after apply)
+ id = (known after apply)
+ instance_id = (known after apply)
+ modified_on = (known after apply)
+ permitted_network_id = (known after apply)
+ state = (known after apply)
+ type = "vpc"
+ vpc_crn = "crn:v1:bluemix:public:is:us-south:a/123::vpc:r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a"
+ zone_id = (known after apply)
}
# ibm_dns_permitted_network.vpc["r006-9e3402dc-2e82-482b-969a-fd0c1bd533f0"] will be created
+ resource "ibm_dns_permitted_network" "vpc" {
+ created_on = (known after apply)
+ id = (known after apply)
+ instance_id = (known after apply)
+ modified_on = (known after apply)
+ permitted_network_id = (known after apply)
+ state = (known after apply)
+ type = "vpc"
+ vpc_crn = "crn:v1:bluemix:public:is:us-south:a/123::vpc:r006-9e3402dc-2e82-482b-969a-fd0c1bd533f0"
+ zone_id = (known after apply)
}
# ibm_dns_permitted_network.vpc["r006-f6bed8d7-ba7d-46e1-8419-cfff7fce2547"] will be created
+ resource "ibm_dns_permitted_network" "vpc" {
+ created_on = (known after apply)
+ id = (known after apply)
+ instance_id = (known after apply)
+ modified_on = (known after apply)
+ permitted_network_id = (known after apply)
+ state = (known after apply)
+ type = "vpc"
+ vpc_crn = "crn:v1:bluemix:public:is:us-south:a/123::vpc:r006-f6bed8d7-ba7d-46e1-8419-cfff7fce2547"
+ zone_id = (known after apply)
}
# ibm_dns_zone.pdns_zone will be created
+ resource "ibm_dns_zone" "pdns_zone" {
+ created_on = (known after apply)
+ description = "For all VSIs in the solution"
+ id = (known after apply)
+ instance_id = (known after apply)
+ label = "localdomain"
+ modified_on = (known after apply)
+ name = "native.cloud"
+ state = (known after apply)
+ zone_id = (known after apply)
}
# ibm_resource_instance.pdns will be created
+ resource "ibm_resource_instance" "pdns" {
+ crn = (known after apply)
+ guid = (known after apply)
+ id = (known after apply)
+ location = "global"
+ name = "fredl-dns"
+ plan = "standard-dns"
+ resource_controller_url = (known after apply)
+ resource_crn = (known after apply)
+ resource_group_id = "80fbd81922474c52af7dfa52a952ef1c"
+ resource_group_name = (known after apply)
+ resource_name = (known after apply)
+ resource_status = (known after apply)
+ service = "dns-svcs"
+ status = (known after apply)
+ tags = [
+ "cloud-native",
+ "terraform",
]
}
Plan: 6 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
ibm_resource_instance.pdns: Creating...
ibm_resource_instance.pdns: Still creating... [10s elapsed]
ibm_resource_instance.pdns: Creation complete after 19s [id=crn:v1:bluemix:public:dns-svcs:global:a/123:452f40f7-8bea-4f8f-9e80-ca2a16b441f2::]
ibm_dns_zone.pdns_zone: Creating...
ibm_dns_zone.pdns_zone: Creation complete after 0s [id=452f40f7-8bea-4f8f-9e80-ca2a16b441f2/native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa]
ibm_dns_permitted_network.vpc["r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247"]: Creating...
ibm_dns_permitted_network.vpc["r006-f6bed8d7-ba7d-46e1-8419-cfff7fce2547"]: Creating...
ibm_dns_permitted_network.vpc["r006-9e3402dc-2e82-482b-969a-fd0c1bd533f0"]: Creating...
ibm_dns_permitted_network.vpc["r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a"]: Creating...
ibm_dns_permitted_network.vpc["r006-f6bed8d7-ba7d-46e1-8419-cfff7fce2547"]: Creation complete after 1s [id=452f40f7-8bea-4f8f-9e80-ca2a16b441f2/native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa/r006-f6bed8d7-ba7d-46e1-8419-cfff7fce2547]
Error: There was an internal error occurred, please try again later.
on main.tf line 44, in resource "ibm_dns_permitted_network" "vpc":
44: resource "ibm_dns_permitted_network" "vpc" {
Error: There was an internal error occurred, please try again later.
on main.tf line 44, in resource "ibm_dns_permitted_network" "vpc":
44: resource "ibm_dns_permitted_network" "vpc" {
Error: The permittedNetwork doesn't exist.
on main.tf line 44, in resource "ibm_dns_permitted_network" "vpc":
44: resource "ibm_dns_permitted_network" "vpc" {
In the UI, the service is created and two of the VPCs added:
If I apply again, it tries to change to create some of the existing entries:
data.terraform_remote_state.vpc_workload: Refreshing state...
data.terraform_remote_state.account_structure: Refreshing state...
data.terraform_remote_state.vpc_structure: Refreshing state...
ibm_resource_instance.pdns: Refreshing state... [id=crn:v1:bluemix:public:dns-svcs:global:a/bfbfea4eadfc486e88755e6b5c1e51bf:452f40f7-8bea-4f8f-9e80-ca2a16b441f2::]
ibm_dns_zone.pdns_zone: Refreshing state... [id=452f40f7-8bea-4f8f-9e80-ca2a16b441f2/native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa]
ibm_dns_permitted_network.vpc["r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a"]: Refreshing state... [id=452f40f7-8bea-4f8f-9e80-ca2a16b441f2/native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa/r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a]
ibm_dns_permitted_network.vpc["r006-f6bed8d7-ba7d-46e1-8419-cfff7fce2547"]: Refreshing state... [id=452f40f7-8bea-4f8f-9e80-ca2a16b441f2/native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa/r006-f6bed8d7-ba7d-46e1-8419-cfff7fce2547]
An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# ibm_dns_permitted_network.vpc["r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247"] will be created
+ resource "ibm_dns_permitted_network" "vpc" {
+ created_on = (known after apply)
+ id = (known after apply)
+ instance_id = "452f40f7-8bea-4f8f-9e80-ca2a16b441f2"
+ modified_on = (known after apply)
+ permitted_network_id = (known after apply)
+ state = (known after apply)
+ type = "vpc"
+ vpc_crn = "crn:v1:bluemix:public:is:us-south:a/bfbfea4eadfc486e88755e6b5c1e51bf::vpc:r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247"
+ zone_id = "native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa"
}
# ibm_dns_permitted_network.vpc["r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a"] will be created
+ resource "ibm_dns_permitted_network" "vpc" {
+ created_on = (known after apply)
+ id = (known after apply)
+ instance_id = "452f40f7-8bea-4f8f-9e80-ca2a16b441f2"
+ modified_on = (known after apply)
+ permitted_network_id = (known after apply)
+ state = (known after apply)
+ type = "vpc"
+ vpc_crn = "crn:v1:bluemix:public:is:us-south:a/bfbfea4eadfc486e88755e6b5c1e51bf::vpc:r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a"
+ zone_id = "native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa"
}
# ibm_dns_permitted_network.vpc["r006-9e3402dc-2e82-482b-969a-fd0c1bd533f0"] will be created
+ resource "ibm_dns_permitted_network" "vpc" {
+ created_on = (known after apply)
+ id = (known after apply)
+ instance_id = "452f40f7-8bea-4f8f-9e80-ca2a16b441f2"
+ modified_on = (known after apply)
+ permitted_network_id = (known after apply)
+ state = (known after apply)
+ type = "vpc"
+ vpc_crn = "crn:v1:bluemix:public:is:us-south:a/bfbfea4eadfc486e88755e6b5c1e51bf::vpc:r006-9e3402dc-2e82-482b-969a-fd0c1bd533f0"
+ zone_id = "native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa"
}
Plan: 3 to add, 0 to change, 0 to destroy.
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value:
and fails with
ibm_dns_permitted_network.vpc["r006-4cefc369-aea1-4489-9e9e-37c0a313ea8a"]: Creating...
ibm_dns_permitted_network.vpc["r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247"]: Creating...
ibm_dns_permitted_network.vpc["r006-9e3402dc-2e82-482b-969a-fd0c1bd533f0"]: Creating...
ibm_dns_permitted_network.vpc["r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247"]: Creation complete after 1s [id=452f40f7-8bea-4f8f-9e80-ca2a16b441f2/native.cloud:cc360ef5-05eb-4460-971e-ed35772259aa/r006-0f5c3afb-67f5-4fbf-aee6-fcb48f765247]
Error: The VPC was already associated to the same DNS zone name.
on main.tf line 44, in resource "ibm_dns_permitted_network" "vpc":
44: resource "ibm_dns_permitted_network" "vpc" {
Error: The VPC was already associated to the same DNS zone name.
on main.tf line 44, in resource "ibm_dns_permitted_network" "vpc":
44: resource "ibm_dns_permitted_network" "vpc" {
But in the UI, one of the entries was created:
I've tried the same config manually in the UI and it works so something is going wrong when used from Terraform
The text was updated successfully, but these errors were encountered:
I am able to recreate the issue. I added concurrency logic in code (with lock in instance_id and zone_id) and tested the permitted networks. It seems to be working fine. I will raise a PR.
using
I have one Private DNS instance, one zone and 4 VPCs.
On first
apply
, the service is created, the zone too but it fails to create the 4 permitted networks:In the UI, the service is created and two of the VPCs added:
If I
apply
again, it tries to change to create some of the existing entries:and fails with
But in the UI, one of the entries was created:
I've tried the same config manually in the UI and it works so something is going wrong when used from Terraform
The text was updated successfully, but these errors were encountered: