Skip to content
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
7 changes: 7 additions & 0 deletions docs-examples/datasources/stack_template/datasource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
data "stackguardian_stack_template" "example" {
id = "my-stack-template"
}

output "stack_template_output" {
value = data.stackguardian_stack_template.example.description
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
data "stackguardian_stack_template_revision" "example" {
id = "my-stack-template:1"
}

output "stack_template_revision_output" {
value = data.stackguardian_stack_template_revision.example.notes
}
7 changes: 7 additions & 0 deletions docs-examples/resources/stack_template/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Example 1: Basic stack template
resource "stackguardian_stack_template" "basic" {
template_name = "my-stack-template"
source_config_kind = "TERRAFORM"
is_public = "0"
tags = ["terraform", "production"]
}
67 changes: 67 additions & 0 deletions docs-examples/resources/stack_template_revision/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
resource "stackguardian_stack_template" "example" {
template_name = "my-stack-template"
source_config_kind = "TERRAFORM"
is_public = "0"
tags = ["terraform", "production"]
}

# Example 1: Basic stack template revision
resource "stackguardian_stack_template_revision" "basic" {
parent_template_id = stackguardian_stack_template.example.id
alias = "v1"
notes = "Initial revision"
description = "First revision of the stack template"
source_config_kind = "TERRAFORM"

workflows_config = {
workflows = [
{
id = "d8dfaf15-2ad9-da29-8af0-c6b288b12089"
template_id = "my-workflow-template"
resource_name = "wf-1"

terraform_config = {
managed_terraform_state = true
terraform_version = "1.5.7"
}
}
]
}
}

# Example 2: Stack template revision with VCS config
resource "stackguardian_stack_template_revision" "with_vcs" {
parent_template_id = stackguardian_stack_template.example.id
alias = "v2"
notes = "Revision with VCS configuration"
description = "Stack template revision with VCS and input data"
source_config_kind = "TERRAFORM"

workflows_config = {
workflows = [
{
id = "d8dfaf15-2ad9-da29-8af0-c6b288b12089"
template_id = "my-workflow-template"
resource_name = "wf-1"

vcs_config = {
iac_vcs_config = {
use_marketplace_template = true
iac_template_id = "my-workflow-template"
}
iac_input_data = {
schema_type = "RAW_JSON"
data = jsonencode({
bucket_region = "eu-central-1"
})
}
}

terraform_config = {
managed_terraform_state = true
terraform_version = "1.5.7"
}
}
]
}
}
19 changes: 19 additions & 0 deletions docs-templates/data-sources/stack_template.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackguardian_stack_template Data Source - terraform-provider-stackguardian"
subcategory: ""
description: |-

---

# stackguardian_stack_template (Data Source)

<div style="background-color: orange; padding: 12px; border-radius: 6px; color: white; font-weight: bold;">
⚠️ This feature is currently in BETA.
</div>

## Example Usage

{{tffile "docs-examples/datasources/stack_template/datasource.tf"}}

{{ .SchemaMarkdown }}
19 changes: 19 additions & 0 deletions docs-templates/data-sources/stack_template_revision.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackguardian_stack_template_revision Data Source - terraform-provider-stackguardian"
subcategory: ""
description: |-

---

# stackguardian_stack_template_revision (Data Source)

<div style="background-color: orange; padding: 12px; border-radius: 6px; color: white; font-weight: bold;">
⚠️ This feature is currently in BETA.
</div>

## Example Usage

{{tffile "docs-examples/datasources/stack_template_revision/datasource.tf"}}

{{ .SchemaMarkdown }}
36 changes: 36 additions & 0 deletions docs-templates/resources/stack_template.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackguardian_stack_template Resource - terraform-provider-stackguardian"
subcategory: ""
description: |-

---

# stackguardian_stack_template (Resource)

<div style="background-color: orange; padding: 12px; border-radius: 6px; color: white; font-weight: bold;">
⚠️ This feature is currently in BETA.
</div>

## Example Usage

{{tffile "docs-examples/resources/stack_template/resource.tf"}}

{{ .SchemaMarkdown }}

## Import

Import existing resource

### Using Import block (terraform v1.5.0 and later)
```terraform
import {
to = stackguardian_stack_template.example
id = "template-name"
}
```

### Using CLI
```bash
terraform import stackguardian_stack_template.example template-name
```
36 changes: 36 additions & 0 deletions docs-templates/resources/stack_template_revision.md.tmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackguardian_stack_template_revision Resource - terraform-provider-stackguardian"
subcategory: ""
description: |-

---

# stackguardian_stack_template_revision (Resource)

<div style="background-color: orange; padding: 12px; border-radius: 6px; color: white; font-weight: bold;">
⚠️ This feature is currently in BETA.
</div>

## Example Usage

{{tffile "docs-examples/resources/stack_template_revision/resource.tf"}}

{{ .SchemaMarkdown }}

## Import

Import existing resource

### Using Import block (terraform v1.5.0 and later)
```terraform
import {
to = stackguardian_stack_template_revision.example
id = "template-name:revision-version"
}
```

### Using CLI
```bash
terraform import stackguardian_stack_template_revision.example template-name:revision-version
```
58 changes: 58 additions & 0 deletions docs/data-sources/stack_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "stackguardian_stack_template Data Source - terraform-provider-stackguardian"
subcategory: ""
description: |-

---

# stackguardian_stack_template (Data Source)

<div style="background-color: orange; padding: 12px; border-radius: 6px; color: white; font-weight: bold;">
⚠️ This feature is currently in BETA.
</div>

## Example Usage

```terraform
data "stackguardian_stack_template" "example" {
id = "my-stack-template"
}

output "stack_template_output" {
value = data.stackguardian_stack_template.example.description
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `id` (String) ID of the resource. Should be used to import the resource.

### Read-Only

- `context_tags` (Map of String) Context tags for stack template
- `description` (String) A brief description of the stack template. Must be less than 256 characters.
- `is_active` (String) Whether the stack template is active. Valid values:
<span style="background-color: #eff0f0; color: #e53835;">0</span> (false),
<span style="background-color: #eff0f0; color: #e53835;">1</span> (true)
- `is_public` (String) Whether the stack template is publicly available. Valid values:
<span style="background-color: #eff0f0; color: #e53835;">0</span> (false),
<span style="background-color: #eff0f0; color: #e53835;">1</span> (true)
- `owner_org` (String) Organization that owns the stack template.
- `shared_orgs_list` (List of String) List of organization IDs with which this template is shared.
- `source_config_kind` (String) Source configuration kind for the stack template. Valid values:
<span style="background-color: #eff0f0; color: #e53835;">TERRAFORM</span>,
<span style="background-color: #eff0f0; color: #e53835;">OPENTOFU</span>,
<span style="background-color: #eff0f0; color: #e53835;">ANSIBLE_PLAYBOOK</span>,
<span style="background-color: #eff0f0; color: #e53835;">HELM</span>,
<span style="background-color: #eff0f0; color: #e53835;">KUBECTL</span>,
<span style="background-color: #eff0f0; color: #e53835;">CLOUDFORMATION</span>,
<span style="background-color: #eff0f0; color: #e53835;">MIXED</span>,
<span style="background-color: #eff0f0; color: #e53835;">CUSTOM</span>
- `tags` (List of String) A list of tags associated with the stack template. A maximum of 10 tags are allowed.
- `template_name` (String) Name of the stack template. Must be less than 100 characters.


Loading
Loading