Closed bryanheo closed 2 years ago
Do you have any updates about the issue above?
I have just noticed that I am not the only one facing the issue. It seems that this issue is related to terraform-provider-aws rather than netapp-cloudmanager_connector_aws https://github.com/terraform-providers/terraform-provider-aws/issues/838
I have tried 'sleep 40' local command and it works ok. For the reason, I assume that instance profile is created slower than netapp-cloudmanager_connector_aws.
resource "aws_iam_instance_profile" "this" {
count = var.enabled ? 1 : 0
name = "connector-instance-profile"
role = aws_iam_role.this[0].name
provisioner "local-exec" {
command = "sleep 40" # wait for instance profile to appear due to
}
}
Yes, this was my hunch that it was an external issue. It seems the AWS provider is indicating completion before the resource is available. We saw similar issues in the past with some API calls as well.
Adding a sleep is a good strategy. We'll document this.
I wonder if there is a way in Terraform to confirm a resource is available beyond depends_on.
Hello
We are deploying NetApp connector through Terraform in AWS. We deploy NetApp connector as shown below and when we create NetApp connector, it returns error below. If we re-apply Terraform after the error, it works fine. I assume that there is some dependency issue even though we use depending_on option. Could you investigate the issue?
TF code
Error
Regards, Moon