diff --git a/docs/resources/stepfunctions_state_machine_version.md b/docs/resources/stepfunctions_state_machine_version.md index 193399652..fab72177e 100644 --- a/docs/resources/stepfunctions_state_machine_version.md +++ b/docs/resources/stepfunctions_state_machine_version.md @@ -1,5 +1,4 @@ --- -# generated by https://github.com/hashicorp/terraform-plugin-docs page_title: "awscc_stepfunctions_state_machine_version Resource - terraform-provider-awscc" subcategory: "" description: |- @@ -10,7 +9,54 @@ description: |- Resource schema for StateMachineVersion +## 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. +```terraform +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 = < ## Schema diff --git a/examples/resources/awscc_stepfunctions_state_machine_version/stepfunctions_state_machine_version.tf b/examples/resources/awscc_stepfunctions_state_machine_version/stepfunctions_state_machine_version.tf new file mode 100644 index 000000000..adeb3dec2 --- /dev/null +++ b/examples/resources/awscc_stepfunctions_state_machine_version/stepfunctions_state_machine_version.tf @@ -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 = <