Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V1.0.0 #132

Merged
merged 16 commits into from
Oct 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update example in flowpipe-hcl/variable for new capabilities-- connec…
…tion type and enum
  • Loading branch information
johnsmyth committed Sep 20, 2024
commit 35696d19038fb11b4d715ebc510e66808172bf4e
55 changes: 14 additions & 41 deletions docs/flowpipe-hcl/variable.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,16 @@ You can reference variable values as `var.<NAME>`
variable "region" {
type = string
description = "The name of the Region."
default = ""
default = "us-east-1"
enum = [ "us-east-1", "us-east-2", "us-west-1", "us-west-2" ]
}

variable "access_key_id" {
type = string
description = "The ID for this access key."
default = ""
}

variable "secret_access_key" {
type = string
description = "The secret key used to sign requests."
default = ""
}

variable "session_token" {
type = string
description = "The token that users must pass to the service API to use the temporary connections."
default = ""
variable "conn" {
type = connection.aws
description = "AWS connection to connect with"
default = connection.aws.default
}


pipeline "describe_vpcs" {
title = "Describe VPCs"
description = "Describes the specified VPCs or all VPCs."
Expand All @@ -47,16 +35,10 @@ pipeline "describe_vpcs" {
default = var.region
}

param "access_key_id" {
type = string
description = "The ID for this access key."
default = var.access_key_id
}

param "secret_access_key" {
type = string
description = "The secret key used to sign requests."
default = var.secret_access_key
param "conn" {
type = connection.aws
description = "AWS connection to connect with"
default = connection.aws.default
}

param "vpc_ids" {
Expand All @@ -67,28 +49,19 @@ pipeline "describe_vpcs" {

step "container" "describe_vpcs" {
image = "amazon/aws-cli"
env = merge(param.conn.env, {AWS_REGION = param.region})

cmd = concat(
["ec2", "describe-vpcs"],
try(length(param.vpc_ids), 0) > 0 ? concat(["--vpc-ids"], param.vpc_ids) : []
cmd = concat(
["ec2", "describe-vpcs"],
try(length(param.vpc_ids), 0) > 0 ? concat(["--vpc-ids"], param.vpc_ids) : []
)

env = {
AWS_REGION = param.region
AWS_ACCESS_KEY_ID = param.access_key_id
AWS_SECRET_ACCESS_KEY = param.secret_access_key
}
}

output "stdout" {
description = "The standard output stream from the AWS CLI."
value = jsondecode(step.container.describe_vpcs.stdout)
}

output "stderr" {
description = "The standard error stream from the AWS CLI."
value = step.container.describe_vpcs.stderr
}
}
```

Expand Down
Loading