-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
591 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
### TBD: | ||
|
||
Explanation about how to run the samples | ||
|
||
|
||
* Edit the provider.tf in this directory, cd into any of the resources/*, `terraform init; terraform plan; terraform apply` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,98 @@ | ||
resource "port_blueprint" "environment" { | ||
title = "Environment" | ||
icon = "Environment" | ||
identifier = "examples-action-env" | ||
properties = { | ||
string_props = { | ||
"name" = { | ||
type = "string" | ||
title = "name" | ||
} | ||
"docs-url" = { | ||
title = "Docs URL" | ||
format = "url" | ||
} | ||
} | ||
} | ||
} | ||
|
||
resource "port_blueprint" "microservice" { | ||
title = "VM" | ||
icon = "GPU" | ||
identifier = "examples-action-microservice" | ||
properties = { | ||
string_props = { | ||
name = { | ||
type = "string" | ||
title = "Name" | ||
}, | ||
author = { | ||
type = "string" | ||
title = "Author" | ||
}, | ||
url = { | ||
type = "string" | ||
title = "URL" | ||
}, | ||
myStringIdentifier = { | ||
description = "This is a string property" | ||
title = "text" | ||
icon = "Terraform" | ||
required = true | ||
min_length = 1 | ||
max_length = 10 | ||
default = "default" | ||
enum = ["default", "default2"] | ||
pattern = "^[a-zA-Z0-9]*$" | ||
format = "user" | ||
enum_colors = { | ||
default = "red" | ||
default2 = "green" | ||
} | ||
} | ||
} | ||
boolean_props = { | ||
required = { | ||
type = "boolean" | ||
} | ||
} | ||
number_props = { | ||
sum = { | ||
type = "number" | ||
} | ||
} | ||
} | ||
|
||
relations = { | ||
"environment" = { | ||
title = "Test Relation" | ||
required = "true" | ||
target = port_blueprint.environment.identifier | ||
} | ||
} | ||
} | ||
|
||
resource "port_action" "restart_microservice" { | ||
title = "Restart microservice" | ||
icon = "Terraform" | ||
identifier = "restart-micrservice" | ||
blueprint = port_blueprint.microservice.identifier | ||
trigger = "DAY-2" | ||
identifier = "examples-action-restart-microservice" | ||
self_service_trigger = { | ||
operation = "DAY-2" | ||
blueprint_identifier = port_blueprint.microservice.identifier | ||
user_properties = { | ||
string_props = { | ||
"webhook_url" = { | ||
title = "Webhook URL" | ||
description = "Webhook URL to send the request to" | ||
format = "url" | ||
default = "https://example.com" | ||
pattern = "^https://.*" | ||
} | ||
} | ||
} | ||
} | ||
webhook_method = { | ||
type = "WEBHOOK" | ||
url = "https://app.getport.io" | ||
} | ||
user_properties = { | ||
string_props = { | ||
"webhook_url" = { | ||
title = "Webhook URL" | ||
description = "Webhook URL to send the request to" | ||
format = "url" | ||
default = "https://example.com" | ||
pattern = "^https://.*" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../provider.tf |
Oops, something went wrong.