IaC import is the process of bringing an existing cloud resource under infrastructure as code management without recreating it. The tool maps the live object, generates matching configuration, and reconciles that code against current state so teams can govern the resource through Terraform going forward.
Expanded Definition
IaC import is the bridge between an already-running cloud resource and a code-managed lifecycle. It lets teams represent the live object in configuration without destroying and recreating it, which is important when the resource is production-bound, manually created, or shared across teams. In practice, the import step is not the finish line. It is the beginning of state reconciliation, where the declared code, provider schema, and live resource attributes must be aligned before the resource can be safely managed going forward.
A common boundary misunderstanding is treating import as if it automatically normalises the resource. It does not. Imported infrastructure can still contain unmanaged settings, default values, or hidden drift that are not visible in the first generated configuration. Guidance versus consensus: the industry broadly agrees that import reduces disruption, but there is still variation in how aggressively teams should refactor generated code after import versus preserving the original resource shape for stability.
For a control-oriented view of managed configuration and asset oversight, NIST control guidance provides useful context on what needs to be identifiable and governable in the environment: NIST SP 800-53 Rev 5 Security and Privacy Controls.
Examples and Use Cases
IaC import appears wherever an organisation wants to bring legacy or manually provisioned infrastructure into repeatable management without changing the workload itself. The practical value is less about creating something new and more about making what already exists visible to review, version control, and change governance.
- Importing an existing virtual network, subnet, or security group so future changes are reviewed in pull requests instead of made directly in the console.
- Bringing a long-lived database instance under Terraform so configuration drift can be detected and managed from code.
- Capturing a manually created IAM policy or access role so its permissions can be audited and refined through code review.
- Onboarding shared platform resources that were provisioned before the team standardised on IaC, reducing the gap between live cloud state and declared state.
The main implementation trade-off is speed versus fidelity. Teams can import quickly and stabilise later, but that can leave generated configuration that does not fully reflect the live resource model until a deliberate cleanup pass is completed.
Security Implications
When IaC import is handled poorly, the security issue is usually state mismatch rather than the import action itself. A resource may be brought under code management while still carrying undocumented settings, permissive access, or provider-managed defaults that the configuration does not yet express. That creates a false sense of control because the resource appears governed even though its effective security posture has not been fully captured.
Failures often show up as drift, silent override of expected settings, or accidental replacement during subsequent apply operations. If the imported object was critical, a small schema mismatch or lifecycle misconfiguration can trigger service disruption, permission changes, or loss of continuity in production. The practical consequence is that teams may audit the code and miss the real risk because the live resource was never fully reconciled after import.
A useful practitioner observation is that imported resources deserve the same scrutiny as newly provisioned ones. The fact that the object already exists does not reduce the need to verify its access paths, dependency boundaries, and current effective configuration.
Domain and Governance Relevance
IaC import matters because it changes how ownership is assigned and how change control is enforced. In cloud governance, imported resources are often the point where informal administration becomes a managed asset with reviewable history, reproducible configuration, and clearer accountability. That makes import especially relevant for environment standardisation, audit readiness, and reducing unmanaged infrastructure islands.
In identity-heavy environments, the significance rises further when imported resources include IAM roles, policy objects, service endpoints, or other control-plane components that govern access. Those objects can influence who can act, what can be automated, and which trust relationships exist across accounts or workloads. For that reason, import is not just a migration step. It is a governance decision about whether a live asset now has a defined owner, declared configuration, and a controlled change path.
Risk and Threat Considerations
IaC import introduces material risk when the imported resource is assumed to be fully governed before its live state has been reconciled. The exposure is strongest for resources with permissions, network exposure, or shared dependencies, because small differences between code and reality can preserve unintended access or destabilise critical services.
Failure mechanism: Drift, incomplete schema capture, or lifecycle misconfiguration can leave unmanaged attributes in place, and subsequent applies may either ignore them or replace the resource unexpectedly. In adversarial terms, a permissive or forgotten setting can remain exploitable even after the resource has been "imported" into code.
Impact: Organisations can end up with a resource that appears controlled in version control while its actual access, exposure, or availability profile remains unsafe. The result can be hidden privilege, unplanned outage, or governance blind spots during audits and incident response.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
CIS Controls v8 and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| CIS Controls v8 | 4 — Secure Configuration of Enterprise Assets and Software | IaC import exposes configuration drift and undocumented settings. |
| Recommendation — Standardise imported resources against approved secure baselines before promoting them to managed state. | ||
| NIST CSF 2.0 | ID.AM — Asset Management | Imported resources must be inventoried and owned before governance works. |
| PR.AC — Identity Management, Authentication and Access Control | Imported infrastructure often includes roles, policies, and access paths. | |
| PR.PT — Protective Technology | Imported resources can carry hidden exposure or unsafe defaults. | |
| Recommendation — Inventory imported cloud assets and assign ownership so change control reflects the live environment. Review access relationships on imported resources and remove unintended privilege exposure. Reconcile imported resources against protective configuration requirements before relying on them. | ||
Practitioner Guidance
What to watch for: Treat import completion as provisional until the generated configuration, provider state, and live resource all match in review. The common mistake is to equate "now in Terraform" with "now controlled," when the real control objective is verified parity between declared and effective state.
Governance implication: Assign clear ownership for imported resources so someone is responsible for reconciling defaults, undocumented settings, and dependency relationships after the initial import. Without that ownership, imported assets tend to drift back into semi-managed status.
Practitioner takeaway: Use import to capture control of an existing resource, then validate that the resource is actually safe to operate as code before treating it as governed.
Related resources from NHI Mgmt Group
- How do security and platform teams know an IaC import is actually working?
- How should teams choose between bulk import and just-in-time CIAM migration?
- How should teams connect cloud security findings to IaC remediation workflows?
- How should security teams measure whether infrastructure is actually governed by IaC?
Deepen Your Knowledge
Reviewed and updated by the NHIMG editorial team on September 7, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org