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

docs: add example for awscc_greengrassv2_deployment #2020

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
81 changes: 79 additions & 2 deletions docs/resources/greengrassv2_deployment.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "awscc_greengrassv2_deployment Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,80 @@ description: |-

Resource for Greengrass V2 deployment.


## Example Usage

```terraform
resource "awscc_greengrassv2_deployment" "example" {
deployment_name = "example"
target_arn = awscc_iot_thing.example.arn
deployment_policies = {
configuration_validation_policy = {
timeout_in_seconds = 60
}
component_update_policy = {
timeout_in_seconds = 55
}
failure_handling_policy = "ROLLBACK"
}

components = {
"aws.greengrass.Nucleus" = {
component_version = "2.12.4"
configuration_update = {
reset = [""]
merge = jsonencode(
{
"spooler" : {
"storageType" : "Disk"
"maxSizeInBytes" : "2048"
}
}
)
}
},
"aws.greengrass.LogManager" = {
component_version = "2.3.7"
configuration_update = {
reset = [""]
merge = jsonencode(
{
"logsUploaderConfiguration" : {
"systemLogsConfiguration" : {
"uploadToCloudWatch" : "true",
"minimumLogLevel" : "INFO",
"diskSpaceLimit" : "10",
"diskSpaceLimitUnit" : "MB",
"deleteLogFileAfterCloudUpload" : "false"
},
"componentLogsConfigurationMap" : {
"aws.greengrass.SystemsManagerAgent" : {
"minimumLogLevel" : "INFO",
"diskSpaceLimit" : "20",
"diskSpaceLimitUnit" : "MB",
"deleteLogFileAfterCloudUpload" : "false"
}
}
},
"periodicUploadIntervalSec" : "300",
"deprecatedVersionSupport" : "false"
}
)
}
}
}

}


resource "awscc_iot_thing" "example" {
thing_name = "example"
attribute_payload = {
attributes = {
name = "examplevalue"
}
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -168,3 +240,8 @@ Import is supported using the following syntax:
```shell
$ terraform import awscc_greengrassv2_deployment.example "deployment_id"
```





Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
resource "awscc_greengrassv2_deployment" "example" {
deployment_name = "example"
target_arn = awscc_iot_thing.example.arn
deployment_policies = {
configuration_validation_policy = {
timeout_in_seconds = 60
}
component_update_policy = {
timeout_in_seconds = 55
}
failure_handling_policy = "ROLLBACK"
}

components = {
"aws.greengrass.Nucleus" = {
component_version = "2.12.4"
configuration_update = {
reset = [""]
merge = jsonencode(
{
"spooler" : {
"storageType" : "Disk"
"maxSizeInBytes" : "2048"
}
}
)
}
},
"aws.greengrass.LogManager" = {
component_version = "2.3.7"
configuration_update = {
reset = [""]
merge = jsonencode(
{
"logsUploaderConfiguration" : {
"systemLogsConfiguration" : {
"uploadToCloudWatch" : "true",
"minimumLogLevel" : "INFO",
"diskSpaceLimit" : "10",
"diskSpaceLimitUnit" : "MB",
"deleteLogFileAfterCloudUpload" : "false"
},
"componentLogsConfigurationMap" : {
"aws.greengrass.SystemsManagerAgent" : {
"minimumLogLevel" : "INFO",
"diskSpaceLimit" : "20",
"diskSpaceLimitUnit" : "MB",
"deleteLogFileAfterCloudUpload" : "false"
}
}
},
"periodicUploadIntervalSec" : "300",
"deprecatedVersionSupport" : "false"
}
)
}
}
}

}


resource "awscc_iot_thing" "example" {
thing_name = "example"
attribute_payload = {
attributes = {
name = "examplevalue"
}
}
}
30 changes: 30 additions & 0 deletions templates/resources/greengrassv2_deployment.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

# {{.Name}} ({{.Type}})

{{ .Description | trimspace }}

## Example Usage

{{ tffile (printf "examples/resources/%s/greengrassv2_deployment.tf" .Name)}}

{{ .SchemaMarkdown | trimspace }}
{{- if .HasImport }}

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}





Loading