generated from hashicorp/terraform-provider-scaffolding
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1947 from awsdannyc/d-improve-awscc_elasticbeanst…
…alk_configuration_template docs: added example for awscc_elasticbeanstalk_configuration_template
- Loading branch information
Showing
3 changed files
with
114 additions
and
3 deletions.
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
39 changes: 39 additions & 0 deletions
39
.../awscc_elasticbeanstalk_configuration_template/elasticbeanstalk_configuration_template.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,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" | ||
}] | ||
} |
28 changes: 28 additions & 0 deletions
28
templates/resources/elasticbeanstalk_configuration_template.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,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 }} |