Turbot Guardrails Hub 
Hub
  • Mods
  • Policy Packs
  • Docs
  • Home
ModsPolicy PacksDocsHome
Mods
ServiceNow
Loading policies...

Policy: AWS > VPC > Internet Gateway > ServiceNow > Relationships > Template

This policy allows you to define and manage relationships in ServiceNow. The relationships you specify as a YAML list will be created for AWS > VPC > Internet Gateway resource in ServiceNow.

Example:

- type: 'Depends on::Used by' parent: name: Web Server sysId: 5a00600a97f81210f0e6f52ad053afb3 tableName: cmdb_ci_server - type: 'Hosted on::Hosts' child: name: Application Service sysId: 6f812105f3a00af52ad0e60a005fb397 tableName: cmdb_ci_service where parent is the resource from which the relationship would be created, and child is the resource to which the the relationship would be created.

Targets

This policy targets the following resource types:

  • AWS > VPC > Internet Gateway

Primary Policy

This policy is used with the following primary policy:

  • AWS > VPC > Internet Gateway > ServiceNow > Relationships

Controls

Setting this policy configures this control:

  • AWS > VPC > Internet Gateway > ServiceNow > Relationships

Policy Specification

Schema Type
array
Default template
{% if $.item.attachments and $.item.attachments | length > 0 %}
{% if $.vpc and $.vpc.metadata.serviceNow.sysId %}
- type: "Connects to::Connected by"
parent:
name: {{ $.vpc.turbot.title }}
sysId: {{ $.vpc.metadata.serviceNow.sysId }}
tableName: {{ $.vpc.metadata.serviceNow.tableName }}
{% endif %}
{% else %}
{% if $.region.metadata.serviceNow.sysId %}
- type: "Contains::Contained by"
parent:
name: {{ $.region.turbot.title }}
sysId: {{ $.region.metadata.serviceNow.sysId }}
tableName: {{ $.region.metadata.serviceNow.tableName }}
{% endif %}
{% endif %}
Default template input
- |
{
item: internetGateway {
attachments: get(path: "Attachments")
metadata
}
}
- |
{
item: internetGateway {
attachments: get(path: "Attachments")
metadata
}
region: resource(id:"arn:{{ $.item.metadata.aws.partition }}::{{ $.item.metadata.aws.regionName }}:{{ $.item.metadata.aws.accountId }}", options: {notFound: RETURN_NULL}) {
metadata
turbot {
title
}
}
vpc: resource(id: "{{ $.item.attachments[0].VpcId }}", options: {notFound: RETURN_NULL}) {
vpcId: get(path: "VpcId")
metadata
turbot {
title
}
}
}

Category

  • CMDB > External

In Your Workspace

  • Policy Settings by Type report

Developers

    Category URI
    • tmod:@turbot/turbot#/control/categories/cmdbExternal
  • Policy Type URI
    • tmod:@turbot/servicenow-aws-vpc-internet#/policy/types/internetGatewayServiceNowRelationshipsTemplate
  • GraphQL
    • query policyType(id: "tmod:@turbot/servicenow-aws-vpc-internet#/policy/types/internetGatewayServiceNowRelationshipsTemplate") { … }
    • query policySettings(filter: "policyTypeId:'tmod:@turbot/servicenow-aws-vpc-internet#/policy/types/internetGatewayServiceNowRelationshipsTemplate'") { … }
    • query policyValues(filter: "policyTypeId:'tmod:@turbot/servicenow-aws-vpc-internet#/policy/types/internetGatewayServiceNowRelationshipsTemplate'") { … }
  • CLI
    • Get Policy Type
    • turbot graphql policy-type --id "tmod:@turbot/servicenow-aws-vpc-internet#/policy/types/internetGatewayServiceNowRelationshipsTemplate"
    • Get Policy Settings
    • turbot graphql policy-settings --filter "policyTypeId:tmod:@turbot/servicenow-aws-vpc-internet#/policy/types/internetGatewayServiceNowRelationshipsTemplate"
Guardrails
Guardrails Hub
  • Hub
  • Docs
  • Blog
  • Changelog
Products
  • GuardrailsGuardrails
  • PipesPipes
  • SteampipeSteampipe
  • PowerpipePowerpipe
  • FlowpipeFlowpipe
  • TailpipeTailpipe
Turbot
  • Home
  • About us
  • We're hiring!
  • Contact us
Community

Our community of practitioners love to discuss cloud governance & security.

Slack logoJoin us on Slack →

System StatusLegalSecurity
Terms of UseSecurityPrivacy
77
Mods
5
Resource Types
1,050
Policies
499
Controls
0
Quick Actions
0
IAM