Score:0

Importing in terraform

ma flag

So i want t import an application load balancer under the terraform management, i managed to add some of it's attributes like cross-region and delete protection, global accelerator etc, and i imported, but i found out that i forgot to add the "config" attribute, how do i include that in the import (which i already did) ? terraform says that doing multiple imports will result in unknown behavior, also, if i continue without adding the "config", will doing apply result in removing that config ? Another thing, i have multiple rules under the loadbalancer, do i have to import all of them in order to add another rule with a specefic priority ? Thank you,

Score:0
ve flag

Some background

When you do an import, Terraform adds the resource description to Terraform state in a local file called "terraform.tfstate".

You can use terraform state rm to remove the imported resource from the Terraform state. Terraform then "forgets" the imported ALB (removes it from tfstate), without deleting the actual ALB.

Now, You can edit your resource definition to add the missing "config" attribute and re-import it.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.