Skip to content

Commit

Permalink
Merge pull request #1947 from awsdannyc/d-improve-awscc_elasticbeanst…
Browse files Browse the repository at this point in the history
…alk_configuration_template

docs: added example for awscc_elasticbeanstalk_configuration_template
  • Loading branch information
marcosentino committed Aug 22, 2024
2 parents 6e0b4f3 + e1a6db2 commit 8009208
Show file tree
Hide file tree
Showing 3 changed files with 114 additions and 3 deletions.
50 changes: 47 additions & 3 deletions docs/resources/elasticbeanstalk_configuration_template.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_elasticbeanstalk_configuration_template Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,52 @@ description: |-

Resource Type definition for AWS::ElasticBeanstalk::ConfigurationTemplate


## Example Usage

### Basic usage with Python platform

In this example, we create an AWS Elastic Beanstalk configuration template using the Python platform, a t3 medium instance and an Immutable deployment policy. This example assumes that you have deployed an environment with high availability and that you are using a dedicated Application Load Balancer. Please refer to [Python platform history](https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-python.html) and use the current platform version and solution stack name. Replace the `testRoleEC2` with your existing [instance profile](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-instanceprofile.html).
```terraform
resource "awscc_elasticbeanstalk_application" "example" {
application_name = "example"
description = "example"
}
resource "awscc_elasticbeanstalk_configuration_template" "example" {
application_name = awscc_elasticbeanstalk_application.example.application_name
description = "My sample configuration template"
solution_stack_name = "64bit Amazon Linux 2023 v4.1.2 running Python 3.11"
option_settings = [{
namespace = "aws:autoscaling:launchconfiguration"
option_name = "IamInstanceProfile"
value = "testRoleEC2"
},
{
namespace = "aws:autoscaling:launchconfiguration"
option_name = "InstanceType"
value = "t3.large"
},
{
namespace = "aws:elasticbeanstalk:command"
option_name = "DeploymentPolicy"
value = "Immutable"
},
{
namespace = "aws:elasticbeanstalk:environment"
option_name = "LoadBalancerType"
value = "application"
},
{
namespace = "aws:elbv2:loadbalancer"
option_name = "AccessLogsS3Enabled"
value = "false"
},
{
namespace = "aws:elasticbeanstalk:environment"
option_name = "LoadBalancerIsShared"
value = "false"
}]
}
```

<!-- schema generated by tfplugindocs -->
## Schema
Expand Down Expand Up @@ -71,4 +115,4 @@ Import is supported using the following syntax:

```shell
$ terraform import awscc_elasticbeanstalk_configuration_template.example "application_name|template_name"
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
resource "awscc_elasticbeanstalk_application" "example" {
application_name = "example"
description = "example"
}
resource "awscc_elasticbeanstalk_configuration_template" "example" {
application_name = awscc_elasticbeanstalk_application.example.application_name
description = "My sample configuration template"
solution_stack_name = "64bit Amazon Linux 2023 v4.1.2 running Python 3.11"
option_settings = [{
namespace = "aws:autoscaling:launchconfiguration"
option_name = "IamInstanceProfile"
value = "testRoleEC2"
},
{
namespace = "aws:autoscaling:launchconfiguration"
option_name = "InstanceType"
value = "t3.large"
},
{
namespace = "aws:elasticbeanstalk:command"
option_name = "DeploymentPolicy"
value = "Immutable"
},
{
namespace = "aws:elasticbeanstalk:environment"
option_name = "LoadBalancerType"
value = "application"
},
{
namespace = "aws:elbv2:loadbalancer"
option_name = "AccessLogsS3Enabled"
value = "false"
},
{
namespace = "aws:elasticbeanstalk:environment"
option_name = "LoadBalancerIsShared"
value = "false"
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

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

{{ .Description | trimspace }}

## Example Usage

### Basic usage with Python platform

In this example, we create an AWS Elastic Beanstalk configuration template using the Python platform, a t3 medium instance and an Immutable deployment policy. This example assumes that you have deployed an environment with high availability and that you are using a dedicated Application Load Balancer. Please refer to [Python platform history](https://docs.aws.amazon.com/elasticbeanstalk/latest/platforms/platform-history-python.html) and use the current platform version and solution stack name. Replace the `testRoleEC2` with your existing [instance profile](https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/iam-instanceprofile.html).
{{ tffile (printf "examples/resources/%s/elasticbeanstalk_configuration_template.tf" .Name)}}

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

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}

0 comments on commit 8009208

Please sign in to comment.