mirror of https://github.com/hashicorp/terraform
parent
a876afb6ca
commit
0cb9a689d7
@ -0,0 +1,26 @@
|
||||
terraform {
|
||||
required_providers {
|
||||
testing = {
|
||||
source = "hashicorp/testing"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
resource "testing_resource" "this" {
|
||||
id = "test"
|
||||
value = "hello"
|
||||
|
||||
lifecycle {
|
||||
action_trigger {
|
||||
events = [after_create]
|
||||
actions = [action.testing_action.example]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
action "testing_action" "example" {
|
||||
config {
|
||||
message = "Test action invocation"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
required_providers {
|
||||
testing = {
|
||||
source = "hashicorp/testing"
|
||||
version = "0.1.0"
|
||||
}
|
||||
}
|
||||
|
||||
provider "testing" "default" {}
|
||||
|
||||
component "self" {
|
||||
source = "./"
|
||||
providers = {
|
||||
testing = provider.testing.default
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue