From 3584433f03d4ba87e932507a64bb06b407eba9d2 Mon Sep 17 00:00:00 2001 From: Ian Mckay Date: Sat, 18 Nov 2023 16:42:57 +1100 Subject: [PATCH] Add orgs import params --- js/services/organizations.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/js/services/organizations.js b/js/services/organizations.js index aa1c2a87..477cde0e 100644 --- a/js/services/organizations.js +++ b/js/services/organizations.js @@ -410,7 +410,10 @@ service_mapping_functions.push(function(reqParams, obj, tracked_resources){ 'terraformType': 'aws_organizations_organizational_unit', 'options': reqParams, 'returnValues': { - 'Ref': obj.data.Id + 'Ref': obj.data.Id, + 'Import': { + 'Id': obj.data.Id + } } }); } else if (obj.type == "organizations.account") { @@ -443,7 +446,10 @@ service_mapping_functions.push(function(reqParams, obj, tracked_resources){ 'terraformType': 'aws_organizations_account', 'options': reqParams, 'returnValues': { - 'Ref': obj.data.Id + 'Ref': obj.data.Id, + 'Import': { + 'AccountId': obj.data.Id + } } }); } else if (obj.type == "organizations.policy") { @@ -472,7 +478,12 @@ service_mapping_functions.push(function(reqParams, obj, tracked_resources){ 'service': 'organizations', 'type': 'AWS::Organizations::Policy', 'terraformType': 'aws_organizations_policy', - 'options': reqParams + 'options': reqParams, + 'returnValues': { + 'Import': { + 'Id': obj.data.PolicySummary.Id + } + } }); } else if (obj.type == "organizations.policyattachment") { reqParams.tf['policy_id'] = obj.data.PolicyId;