AttiniImport

The Attini import step can be used for importing data from different sources. A common use case for this type is reading data from the output of another distribution. For example, you could have a distribution responsible for setting up a network that exposes a VPC id. Then the VPC-id can be imported by other deployment plans.

Type: AttiniImport
Properties:
    SourceType: String
    Source: S3Source | DistributionSource
    Mapping: Map<String,String>
    ExecutionRoleArn: String

SourceType

Type: String

Specifies what kind of source should be used.

Allowed values: Distribution | S3

Required: Yes

Source

Type: S3Source | DistributionSource

Different sources require different information in order to import them. For example, S3 needs a bucket and key while a distribution needs the name of the distribution.

Which Source you need is decided by the SourceType.

Required: Yes

Mapping

Type: Map<String,String>

A key/value map where the value is a path to a value in the imported document. The path follows the JSONPath syntax. The value on the path will be included in the output of the step under the same key name as the mapping.

For example the following JSON source:

{
  "my-service-endpoint": "https://some-endpoint.com"
}

With the following mapping:

endpoint: $.my-service-endpoint

Would produce the following output for the step in the deployment plan payload.

{
  "endpoint": "https://some-endpoint.com"
}

Required: Yes

ExecutionRoleArn

Type: String

The arn of the execution role that should be used for accessing the source. At the moment only needed for the S3 source type if Attini does not have access to the S3 Bucket.

Required: No

Default: None

Subsections of AttiniImport

DistributionSource

Used when the source of the import should be another distribution deployed in the environment. Before a distribution can import the output of another distribution, it first needs to be declared as a dependency in the attini-config file.

Source:
  Name: String

Name

Type: String

The name of the distribution.

Required: Yes

Example
SourceType: Distribution
Source:
    Name: network

S3Source

Used when the source of the import should be a file on S3. The file must be in either a JSON or a YAML format.

Key: String
Bucket: String

Key

Type: String

The S3 Key of the document to import.

Required: Yes

Bucket

Type: String

The S3 Bucket where the document is located.

Required: Yes

Example
SourceType: S3
Source:
    Key: /my/s3/key.json
    Bucket: my-bucket