The common mistake is treating import as a one-time onboarding task instead of an ongoing governance process. Teams may import resources without checking dependencies, naming conventions, or ownership boundaries, then assume the configuration is safe. In practice, imported resources still need reconciliation, access review, and change validation to prevent hidden drift and accidental disruption.
Why This Matters for Security Teams
Importing existing network resources into infrastructure as code is not just a formatting exercise. It is a control boundary decision. Once a live resource is codified, teams often assume the import has made it safer, when the real risk is that undocumented dependencies, inherited permissions, and hidden drift remain untouched. That is how an apparently clean state can mask a brittle one.
This matters because infrastructure as code only improves governance when the imported resource is reconciled against ownership, policy, and runtime behaviour. NHI Management Group research shows how often organisations overestimate their readiness for autonomous and highly connected systems, with only 13% saying they are extremely prepared for agentic AI realities in the 2026 Infrastructure Identity Survey. The same pattern appears in imported infrastructure: confidence rises faster than validation.
The security mistake is treating import as completion instead of discovery. In practice, many security teams encounter breakage, privilege creep, or hidden coupling only after a change window or outage has already exposed the mismatch.
For practitioners, the lesson aligns with the NIST SP 800-207 Zero Trust Architecture principle that trust must be continuously evaluated, not assumed from asset presence alone.
How It Works in Practice
Successful import starts with inventory, not tooling. Teams need to identify what the resource depends on, who owns it, what policies currently protect it, and which systems call into it. If that discovery step is skipped, the imported code often reflects only a partial truth. A resource can look well-managed in version control while still relying on manual console changes, inherited firewall rules, or stale service-account access.
Operationally, the import process should include reconciliation of four layers: configuration, dependencies, permissions, and lifecycle. Configuration tells the tool what exists. Dependencies show whether the resource is attached to other systems, schedules, or pipelines. Permissions reveal whether access is already broader than intended. Lifecycle determines whether the resource should remain in service, be re-created, or be replaced in stages.
Common practice is to treat import as a safe first commit, then review the resulting plan for non-obvious diffs. That review should not stop at syntax. It should validate naming conventions, tags, ownership metadata, and policy exceptions. For resources that manage secrets or credentials, imported state should also be checked against patterns described in the Ultimate Guide to NHIs, because stale access and long-lived credentials often survive the migration into code.
- Confirm the live resource matches the desired module, not just the current console state.
- Map inbound and outbound dependencies before enforcing drift detection.
- Review access control, especially service accounts, API keys, and automation roles.
- Run a no-op plan after import to surface hidden differences before merge.
Useful implementation guidance also comes from supply-chain style hardening. Imported resources that embed static secrets or hard-coded identifiers can behave like the systems described in the ASP.NET machine keys RCE attack and Gladinet Hard-Coded Keys RCE Exploitation research, where hidden trust assumptions become exploitation paths.
These controls tend to break down when teams import at scale across multiple accounts or subscriptions because ownership and dependency mapping become too fragmented to validate manually.
Common Variations and Edge Cases
Tighter import controls often increase delivery overhead, requiring organisations to balance faster onboarding against stronger reconciliation. That tradeoff becomes sharper in legacy estates, multi-cloud environments, and platforms with heavy manual drift, where a strict import policy can slow migration if the surrounding asset inventory is weak.
There is no universal standard for imported-resource governance yet, but current guidance suggests a few exceptions deserve special handling. Shared network components such as load balancers, transit gateways, and firewalls may not have a single owner, so import should be paired with explicit stewardship. Resources created by third-party teams or managed services can also carry constraints that are invisible in the IaC state file.
Another edge case is read-only import for discovery. Some teams import first to observe, then refactor later. That can be acceptable if it is documented as a transitional control, not a secure end state. The danger is leaving imported resources in a half-governed condition for months, with policy drift and access sprawl hidden behind a false sense of standardisation.
For identity-heavy environments, imported infrastructure should be checked for excessive privileges and long-lived access, since the broader NHI problem is already severe. NHI Management Group research shows that 97% of NHIs carry excessive privileges and 71% are not rotated within recommended time frames, so imported resources often inherit unsafe defaults rather than clean baselines.
Teams get this wrong when they assume the import itself is the control, instead of the start of continuous validation, ownership cleanup, and privilege reduction.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Non-Human Identity Top 10 and CSA MAESTRO address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST Zero Trust (SP 800-207) set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Non-Human Identity Top 10 | NHI-01 | Imported resources often inherit weak secrets and access boundaries. |
| CSA MAESTRO | M1 | Importing infrastructure needs runtime policy and ownership clarity. |
| NIST AI RMF | GOVERN | Import decisions need accountability and lifecycle oversight. |
| NIST CSF 2.0 | ID.AM-1 | Asset management is required before imported resources can be secured. |
| NIST Zero Trust (SP 800-207) | PA | Imported infrastructure should be validated continuously, not trusted by default. |
Treat import as governance work: map ownership, policy, and change controls before declaring success.
Related resources from NHI Mgmt Group
- What do security teams get wrong about onboarding infrastructure as code platforms?
- How should security teams add governance to existing Infrastructure as Code pipelines without disrupting delivery workflows?
- What do security teams get wrong about self-service infrastructure governance?
- What do teams get wrong about infrastructure as code?