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: ecr_public_repository #1160

Merged
Merged
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
36 changes: 34 additions & 2 deletions docs/resources/ecr_public_repository.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_ecr_public_repository Resource - terraform-provider-awscc"
subcategory: ""
description: |-
Expand All @@ -10,7 +9,40 @@ description: |-

The AWS::ECR::PublicRepository resource specifies an Amazon Elastic Container Public Registry (Amazon Public ECR) repository, where users can push and pull Docker images. For more information, see https://docs.aws.amazon.com/AmazonECR

~> **NOTE:** This resource can only be used in the `us-east-1` region.

## Example Usage

### Basic usage
To create a ECR public repository.
```terraform
resource "awscc_ecr_public_repository" "example" {
repository_name = "example"
tags = [{
key = "Managed By"
value = "AWSCC"
}]
}
```

### ECR public repository with Catalog Data.
To create a ECR public repository with Catalog Data.
```terraform
resource "awscc_ecr_public_repository" "example_catalog_data" {
repository_name = "example-catalog-data"
repository_catalog_data = {
about_text = "about text"
architectures = ["ARM"]
operating_systems = ["Linux"]
repository_description = "Repository description"
usage_text = "Usage text"
}
tags = [{
key = "Managed By"
value = "AWSCC"
}]
}
```

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

```shell
$ terraform import awscc_ecr_public_repository.example <resource ID>
```
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
resource "awscc_ecr_public_repository" "example" {
repository_name = "example"
tags = [{
key = "Managed By"
value = "AWSCC"
}]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resource "awscc_ecr_public_repository" "example_catalog_data" {
repository_name = "example-catalog-data"
repository_catalog_data = {
about_text = "about text"
architectures = ["ARM"]
operating_systems = ["Linux"]
repository_description = "Repository description"
usage_text = "Usage text"
}
tags = [{
key = "Managed By"
value = "AWSCC"
}]
}
33 changes: 33 additions & 0 deletions templates/resources/ecr_public_repository.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
page_title: "{{.Name}} {{.Type}} - {{.ProviderName}}"
subcategory: ""
description: |-
{{ .Description | plainmarkdown | trimspace | prefixlines " " }}
---

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

{{ .Description | trimspace }}

~> **NOTE:** This resource can only be used in the `us-east-1` region.

## Example Usage

### Basic usage
To create a ECR public repository.
{{ tffile (printf "examples/resources/%s/ecr_public_repository.tf" .Name)}}

### ECR public repository with Catalog Data.
To create a ECR public repository with Catalog Data.
{{ tffile (printf "examples/resources/%s/ecr_public_repository_catalog_data.tf" .Name)}}

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

## Import

Import is supported using the following syntax:

{{ codefile "shell" .ImportFile }}

{{- end }}
Loading