generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs : add example for awscc_stepfunctions_state_machine_version
- Loading branch information
Showing
3 changed files
with
116 additions
and
1 deletion.
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
44 changes: 44 additions & 0 deletions
44
...esources/awscc_stepfunctions_state_machine_version/stepfunctions_state_machine_version.tf
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,44 @@ | ||
resource "awscc_iam_role" "main" { | ||
description = "AWS IAM role for a step function" | ||
assume_role_policy_document = jsonencode({ | ||
Version = "2012-10-17" | ||
Statement = [ | ||
{ | ||
Action = "sts:AssumeRole" | ||
Effect = "Allow" | ||
Sid = "" | ||
Principal = { | ||
Service = "states.amazonaws.com" | ||
} | ||
}, | ||
] | ||
}) | ||
} | ||
|
||
resource "awscc_stepfunctions_state_machine" "sfn_stepmachine" { | ||
role_arn = awscc_iam_role.main.arn | ||
state_machine_type = "STANDARD" | ||
definition_string = <<EOT | ||
{ | ||
"StartAt": "FirstState", | ||
"States": { | ||
"FirstState": { | ||
"Type": "Pass", | ||
"Result": "Hello World!", | ||
"End": true | ||
} | ||
} | ||
} | ||
EOT | ||
tags = [ | ||
{ | ||
key = "Modified By" | ||
value = "AWSCC" | ||
} | ||
] | ||
} | ||
|
||
resource "awscc_stepfunctions_state_machine_version" "version" { | ||
description = "State machine version description" | ||
state_machine_arn = awscc_stepfunctions_state_machine.sfn_stepmachine.arn | ||
} |
25 changes: 25 additions & 0 deletions
25
templates/resources/stepfunctions_state_machine_version.md.tmpl
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,25 @@ | ||
--- | ||
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}" | ||
subcategory: "" | ||
description: |- | ||
{{ .Description | plainmarkdown | trimspace | prefixlines " " }} | ||
--- | ||
|
||
# {{.Name}} ({{.Type}}) | ||
|
||
{{ .Description | trimspace }} | ||
|
||
## Example Usage | ||
In this example, we create a version of a state machine. The example includes the necessary code to create a basic state machine. | ||
{{ tffile (printf "examples/resources/%s/stepfunctions_state_machine_version.tf" .Name)}} | ||
|
||
{{ .SchemaMarkdown | trimspace }} | ||
{{- if .HasImport }} | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
{{ codefile "shell" .ImportFile }} | ||
|
||
{{- end }} |