1

I'm trying to use sfdx for source based development. Trying to define the range of whitelisted IPs in Security.settings-meta.xml. When I push my code to my org I get an error:

Error  force-app/main/default/settings/Security.settings-meta.xml  Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}ipRange invalid at this location in type IpRange

Below is an example of how my the relevant XML is structured:

<?xml version="1.0" encoding="UTF-8"?>
<SecuritySettings xmlns="http://soap.sforce.com/2006/04/metadata">
    <networkAccess>
      <ipRanges>
        <ipRange>
          <description>example 1</description>
          <end>0.0.0.1</end>
          <start>0.0.0.0</start>
        </ipRange>
        <ipRange>
          <description>example 2</description>
          <end>0.0.1.1</end>
          <start>0.0.1.0</start>
        </ipRange>
      </ipRanges>
    </networkAccess>
</SecuritySettings>

I have reviewed the documentation but am still missing something.
How should the ipRanges and ipRange fields be structured?

1

Below is the proper format:

<?xml version="1.0" encoding="UTF-8"?>
<SecuritySettings xmlns="http://soap.sforce.com/2006/04/metadata">
    <networkAccess>
        <ipRanges>
            <description>example 1</description>
            <end>0.0.0.1</end>
            <start>0.0.0.0</start>
        </ipRanges>
        <ipRanges>
            <description>example 2</description>
            <end>0.0.1.1</end>
            <start>0.0.1.0</start>
        </ipRanges>
    </networkAccess>
</SecuritySettings>
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.