Credential Import
ImportantAs of Flowpipe 1.0.0,
credential_import
has been renamed toconnection_import
. Thecredential_import
resource is deprecated and will be removed in a future version of Flowpipe. Use connection_import instead.
The credential_import
resource allows you to bulk import credentials from other systems & formats. credential_import
is a top-level block defined in config files (*.fpc
) like credential
and workspace
.
credential_import "steampipe" { source = "~/.steampipe/config/*.spc" connections = ["*"] prefix = "sp1_"}
Imported credentials are converted to the native Flowpipe credential type - Steampipe aws
connections become aws
credentials, slack
connections are slack
credentials, etc.
The imported credentials are merged into the map of all credentials like any other credential, and they are referenced the same way. For example, if you have connections defined as:
connection "gcp_dev_aaa" { plugin = "gcp" project = "dev-aaa" }
connection "gcp_demo" { plugin = "gcp" project = "demo" }
connection "aws_001" { plugin = "aws" regions = ["*"] profile = "aws-001"}
connection "aws_002" { plugin = "aws" regions = ["*"] profile = "aws-002"}
connection "slack" { plugin = "slack" token = "xoxp-12345678902345"}
and import with:
credential_import "steampipe" { source = "~/.steampipe/config/*.spc" connections = ["*"]}
Then they will be available in Flowpipe as:
credential.gcp.gcp_dev_aaacredential.gcp.gcp_democredential.aws.aws_001credential.aws.aws_002credential.slack.slack
and they will have the same attributes as the native Flowpipe credential types:
credential.gcp.gcp_dev_aaa.access_tokencredential.aws.aws_001.envcredential.aws.aws_001.access_keycredential.aws.aws_001.secret_keycredential.aws.aws_001.session_tokencredential.slack.slack.token# etc...
If you specify a prefix
, the credential names will be prepended with it:
credential_import "steampipe" { source = "~/.steampipe/config/*.spc" connections = ["*"] prefix = "sp1_" }
Results in:
credential.gcp.sp1_gcp_dev_aaacredential.gcp.sp1_gcp_democredential.aws.sp1_aws_001credential.aws.sp1_aws_002credential.slack.sp1_slack
If there is a name conflict for any credentials, Flowpipe will throw an error when loading.
At this time, you may only use a single import_credential
block.