New File
Create a new gtm.tf file and add the akamai_gtm_domain resource with all the necessary parameters for the domain you want to import.
Plan
Run a terraform plan. Is Terraform going to add a new GTM domain or reuse the existing one at this point?
State
Run a terraform state list and look for the akamai_gtm_domain resource. Did you find it? Why not?
Import
Import the GTM domain into Terraform's state file.
ℹ️
Hint: refer to the akamai_gtm_domain resource documentation in Techdocs (opens in a new tab). You could also use the Akamai CLI to export a GTM domain.
Check the State
Run a terraform state list command to verify the new resource has been succeessfuly imported to the state file.
Plan
Run another terraform plan. What happens now?
Commit
Commit your changes and push them to GitHub.