#!/usr/bin/env bash # --------------------------------------------------------------------------- # GENERATED FILE - REVIEW BEFORE USE # # Imports existing Dynu DNS records into Terraform state. # Does not apply changes. # --------------------------------------------------------------------------- set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" TF_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)" cd "${TF_ROOT}" # Re-running imports will fail for resources already in state. # This script skips imports when state already contains the resource address. if terraform state show 'dynu_dns_record.auth_lan_ddnsgeek_com_a_18483099' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.auth_lan_ddnsgeek_com_a_18483099' else terraform import 'dynu_dns_record.auth_lan_ddnsgeek_com_a_18483099' '9695470/18483099' fi if terraform state show 'dynu_dns_record.auth_lan_ddnsgeek_com_a_19646048' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.auth_lan_ddnsgeek_com_a_19646048' else terraform import 'dynu_dns_record.auth_lan_ddnsgeek_com_a_19646048' '9695470/19646048' fi if terraform state show 'dynu_dns_record.edge_lan_ddnsgeek_com_a_10453241' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.edge_lan_ddnsgeek_com_a_10453241' else terraform import 'dynu_dns_record.edge_lan_ddnsgeek_com_a_10453241' '9695470/10453241' fi if terraform state show 'dynu_dns_record.edge_lan_ddnsgeek_com_a_19646062' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.edge_lan_ddnsgeek_com_a_19646062' else terraform import 'dynu_dns_record.edge_lan_ddnsgeek_com_a_19646062' '9695470/19646062' fi if terraform state show 'dynu_dns_record.familytree_lan_ddnsgeek_com_a_17017685' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.familytree_lan_ddnsgeek_com_a_17017685' else terraform import 'dynu_dns_record.familytree_lan_ddnsgeek_com_a_17017685' '9695470/17017685' fi if terraform state show 'dynu_dns_record.familytree_lan_ddnsgeek_com_a_19646056' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.familytree_lan_ddnsgeek_com_a_19646056' else terraform import 'dynu_dns_record.familytree_lan_ddnsgeek_com_a_19646056' '9695470/19646056' fi if terraform state show 'dynu_dns_record.gitea_lan_ddnsgeek_com_a_14682463' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.gitea_lan_ddnsgeek_com_a_14682463' else terraform import 'dynu_dns_record.gitea_lan_ddnsgeek_com_a_14682463' '9695470/14682463' fi if terraform state show 'dynu_dns_record.gitea_lan_ddnsgeek_com_a_19646063' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.gitea_lan_ddnsgeek_com_a_19646063' else terraform import 'dynu_dns_record.gitea_lan_ddnsgeek_com_a_19646063' '9695470/19646063' fi if terraform state show 'dynu_dns_record.gotify_lan_ddnsgeek_com_a_17439061' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.gotify_lan_ddnsgeek_com_a_17439061' else terraform import 'dynu_dns_record.gotify_lan_ddnsgeek_com_a_17439061' '9695470/17439061' fi if terraform state show 'dynu_dns_record.gotify_lan_ddnsgeek_com_a_19646047' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.gotify_lan_ddnsgeek_com_a_19646047' else terraform import 'dynu_dns_record.gotify_lan_ddnsgeek_com_a_19646047' '9695470/19646047' fi if terraform state show 'dynu_dns_record.grafana_lan_ddnsgeek_com_a_18113762' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.grafana_lan_ddnsgeek_com_a_18113762' else terraform import 'dynu_dns_record.grafana_lan_ddnsgeek_com_a_18113762' '9695470/18113762' fi if terraform state show 'dynu_dns_record.grafana_lan_ddnsgeek_com_a_19646050' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.grafana_lan_ddnsgeek_com_a_19646050' else terraform import 'dynu_dns_record.grafana_lan_ddnsgeek_com_a_19646050' '9695470/19646050' fi if terraform state show 'dynu_dns_record.influxdb_lan_ddnsgeek_com_a_18562198' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.influxdb_lan_ddnsgeek_com_a_18562198' else terraform import 'dynu_dns_record.influxdb_lan_ddnsgeek_com_a_18562198' '9695470/18562198' fi if terraform state show 'dynu_dns_record.influxdb_lan_ddnsgeek_com_a_19646059' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.influxdb_lan_ddnsgeek_com_a_19646059' else terraform import 'dynu_dns_record.influxdb_lan_ddnsgeek_com_a_19646059' '9695470/19646059' fi if terraform state show 'dynu_dns_record.kuma_lan_ddnsgeek_com_a_17454978' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.kuma_lan_ddnsgeek_com_a_17454978' else terraform import 'dynu_dns_record.kuma_lan_ddnsgeek_com_a_17454978' '9695470/17454978' fi if terraform state show 'dynu_dns_record.lan_ddnsgeek_com_soa_8299670' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.lan_ddnsgeek_com_soa_8299670' else terraform import 'dynu_dns_record.lan_ddnsgeek_com_soa_8299670' '9695470/8299670' fi if terraform state show 'dynu_dns_record.monitor_kuma_lan_ddnsgeek_com_a_17462342' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.monitor_kuma_lan_ddnsgeek_com_a_17462342' else terraform import 'dynu_dns_record.monitor_kuma_lan_ddnsgeek_com_a_17462342' '9695470/17462342' fi if terraform state show 'dynu_dns_record.monitor_kuma_lan_ddnsgeek_com_a_19646051' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.monitor_kuma_lan_ddnsgeek_com_a_19646051' else terraform import 'dynu_dns_record.monitor_kuma_lan_ddnsgeek_com_a_19646051' '9695470/19646051' fi if terraform state show 'dynu_dns_record.mtls_bridge_lan_ddnsgeek_com_a_19232643' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.mtls_bridge_lan_ddnsgeek_com_a_19232643' else terraform import 'dynu_dns_record.mtls_bridge_lan_ddnsgeek_com_a_19232643' '9695470/19232643' fi if terraform state show 'dynu_dns_record.mtls_bridge_lan_ddnsgeek_com_a_19646058' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.mtls_bridge_lan_ddnsgeek_com_a_19646058' else terraform import 'dynu_dns_record.mtls_bridge_lan_ddnsgeek_com_a_19646058' '9695470/19646058' fi if terraform state show 'dynu_dns_record.nextcloud_lan_ddnsgeek_com_a_10453260' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.nextcloud_lan_ddnsgeek_com_a_10453260' else terraform import 'dynu_dns_record.nextcloud_lan_ddnsgeek_com_a_10453260' '9695470/10453260' fi if terraform state show 'dynu_dns_record.nextcloud_lan_ddnsgeek_com_a_19646057' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.nextcloud_lan_ddnsgeek_com_a_19646057' else terraform import 'dynu_dns_record.nextcloud_lan_ddnsgeek_com_a_19646057' '9695470/19646057' fi if terraform state show 'dynu_dns_record.node_red_lan_ddnsgeek_com_a_19041230' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.node_red_lan_ddnsgeek_com_a_19041230' else terraform import 'dynu_dns_record.node_red_lan_ddnsgeek_com_a_19041230' '9695470/19041230' fi if terraform state show 'dynu_dns_record.node_red_lan_ddnsgeek_com_a_19646053' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.node_red_lan_ddnsgeek_com_a_19646053' else terraform import 'dynu_dns_record.node_red_lan_ddnsgeek_com_a_19646053' '9695470/19646053' fi if terraform state show 'dynu_dns_record.passbolt_lan_ddnsgeek_com_a_10453262' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.passbolt_lan_ddnsgeek_com_a_10453262' else terraform import 'dynu_dns_record.passbolt_lan_ddnsgeek_com_a_10453262' '9695470/10453262' fi if terraform state show 'dynu_dns_record.passbolt_lan_ddnsgeek_com_a_19646049' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.passbolt_lan_ddnsgeek_com_a_19646049' else terraform import 'dynu_dns_record.passbolt_lan_ddnsgeek_com_a_19646049' '9695470/19646049' fi if terraform state show 'dynu_dns_record.portainer_lan_ddnsgeek_com_a_17458810' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.portainer_lan_ddnsgeek_com_a_17458810' else terraform import 'dynu_dns_record.portainer_lan_ddnsgeek_com_a_17458810' '9695470/17458810' fi if terraform state show 'dynu_dns_record.portainer_lan_ddnsgeek_com_a_19646046' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.portainer_lan_ddnsgeek_com_a_19646046' else terraform import 'dynu_dns_record.portainer_lan_ddnsgeek_com_a_19646046' '9695470/19646046' fi if terraform state show 'dynu_dns_record.prometheus_lan_ddnsgeek_com_a_18483311' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.prometheus_lan_ddnsgeek_com_a_18483311' else terraform import 'dynu_dns_record.prometheus_lan_ddnsgeek_com_a_18483311' '9695470/18483311' fi if terraform state show 'dynu_dns_record.prometheus_lan_ddnsgeek_com_a_19646061' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.prometheus_lan_ddnsgeek_com_a_19646061' else terraform import 'dynu_dns_record.prometheus_lan_ddnsgeek_com_a_19646061' '9695470/19646061' fi if terraform state show 'dynu_dns_record.searxng_lan_ddnsgeek_com_a_10453263' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.searxng_lan_ddnsgeek_com_a_10453263' else terraform import 'dynu_dns_record.searxng_lan_ddnsgeek_com_a_10453263' '9695470/10453263' fi if terraform state show 'dynu_dns_record.searxng_lan_ddnsgeek_com_a_19646055' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.searxng_lan_ddnsgeek_com_a_19646055' else terraform import 'dynu_dns_record.searxng_lan_ddnsgeek_com_a_19646055' '9695470/19646055' fi if terraform state show 'dynu_dns_record.shifts_lan_ddnsgeek_com_a_15901565' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.shifts_lan_ddnsgeek_com_a_15901565' else terraform import 'dynu_dns_record.shifts_lan_ddnsgeek_com_a_15901565' '9695470/15901565' fi if terraform state show 'dynu_dns_record.shifts_lan_ddnsgeek_com_a_19646052' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.shifts_lan_ddnsgeek_com_a_19646052' else terraform import 'dynu_dns_record.shifts_lan_ddnsgeek_com_a_19646052' '9695470/19646052' fi if terraform state show 'dynu_dns_record.stockfill_lan_ddnsgeek_com_a_17081867' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.stockfill_lan_ddnsgeek_com_a_17081867' else terraform import 'dynu_dns_record.stockfill_lan_ddnsgeek_com_a_17081867' '9695470/17081867' fi if terraform state show 'dynu_dns_record.stockfill_lan_ddnsgeek_com_a_19646060' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.stockfill_lan_ddnsgeek_com_a_19646060' else terraform import 'dynu_dns_record.stockfill_lan_ddnsgeek_com_a_19646060' '9695470/19646060' fi if terraform state show 'dynu_dns_record.traefik_lan_ddnsgeek_com_a_10453240' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.traefik_lan_ddnsgeek_com_a_10453240' else terraform import 'dynu_dns_record.traefik_lan_ddnsgeek_com_a_10453240' '9695470/10453240' fi if terraform state show 'dynu_dns_record.traefik_lan_ddnsgeek_com_a_19646054' >/dev/null 2>&1; then echo 'Skipping already imported: dynu_dns_record.traefik_lan_ddnsgeek_com_a_19646054' else terraform import 'dynu_dns_record.traefik_lan_ddnsgeek_com_a_19646054' '9695470/19646054' fi