Skip to content

Commit 6503dcc

Browse files
authored
chore: update doc generation to include stack depnendency import section (#706)
Updates documentation generation to include import sections for stack dependency and stack depnendency reference resources.
1 parent 4a527f9 commit 6503dcc

File tree

6 files changed

+24
-12
lines changed

6 files changed

+24
-12
lines changed

docs/resources/stack_dependency.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ page_title: "spacelift_stack_dependency Resource - terraform-provider-spacelift"
44
subcategory: ""
55
description: |-
66
spacelift_stack_dependency represents a Spacelift stack dependency - a dependency between two stacks. When one stack depends on another, the tracked runs of the stack will not start until the dependent stack is successfully finished. Additionally, changes to the dependency will trigger the dependent.
7-
~> Import format: Use terraform import spacelift_stack_dependency.example stack-id/depends-on-stack-id. The old format stack-id/dependency-ulid is deprecated but still supported for backward compatibility.
87
---
98

109
# spacelift_stack_dependency (Resource)
1110

1211
`spacelift_stack_dependency` represents a Spacelift **stack dependency** - a dependency between two stacks. When one stack depends on another, the tracked runs of the stack will not start until the dependent stack is successfully finished. Additionally, changes to the dependency will trigger the dependent.
1312

14-
~> **Import format**: Use `terraform import spacelift_stack_dependency.example stack-id/depends-on-stack-id`. The old format `stack-id/dependency-ulid` is deprecated but still supported for backward compatibility.
15-
1613
## Example Usage
1714

1815
```terraform
@@ -46,3 +43,13 @@ resource "spacelift_stack_dependency" "test" {
4643
### Read-Only
4744

4845
- `id` (String) The ID of this resource.
46+
47+
## Import
48+
49+
Import is supported using the following syntax:
50+
51+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
52+
53+
```shell
54+
terraform import spacelift_stack_dependency.example stack-id/depends-on-stack-id
55+
```

docs/resources/stack_dependency_reference.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,12 @@ page_title: "spacelift_stack_dependency_reference Resource - terraform-provider-
44
subcategory: ""
55
description: |-
66
spacelift_stack_dependency_reference represents a Spacelift stack dependency reference - a reference matches a stack's output to another stack's input. It is similar to an environment variable (spacelift_environment_variable), except that value is provided by another stack's output.
7-
~> Import format: Use terraform import spacelift_stack_dependency_reference.example stack-id/depends-on-stack-id/input-name. The old format stack-id/dependency-ulid/reference-ulid is deprecated but still supported for backward compatibility.
87
---
98

109
# spacelift_stack_dependency_reference (Resource)
1110

1211
`spacelift_stack_dependency_reference` represents a Spacelift **stack dependency reference** - a reference matches a stack's output to another stack's input. It is similar to an environment variable (`spacelift_environment_variable`), except that value is provided by another stack's output.
1312

14-
~> **Import format**: Use `terraform import spacelift_stack_dependency_reference.example stack-id/depends-on-stack-id/input-name`. The old format `stack-id/dependency-ulid/reference-ulid` is deprecated but still supported for backward compatibility.
15-
1613
## Example Usage
1714

1815
```terraform
@@ -56,3 +53,13 @@ resource "spacelift_stack_dependency_reference" "test" {
5653
### Read-Only
5754

5855
- `id` (String) The ID of this resource.
56+
57+
## Import
58+
59+
Import is supported using the following syntax:
60+
61+
The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:
62+
63+
```shell
64+
terraform import spacelift_stack_dependency_reference.example stack-id/depends-on-stack-id/input-name
65+
```
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import spacelift_stack_dependency.example stack-id/depends-on-stack-id
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
terraform import spacelift_stack_dependency_reference.example stack-id/depends-on-stack-id/input-name

spacelift/resource_stack_dependency.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ func resourceStackDependency() *schema.Resource {
2121
"`spacelift_stack_dependency` represents a Spacelift **stack dependency** - " +
2222
"a dependency between two stacks. When one stack depends on another, the tracked runs " +
2323
"of the stack will not start until the dependent stack is successfully finished. Additionally, " +
24-
"changes to the dependency will trigger the dependent.\n\n" +
25-
"~> **Import format**: Use `terraform import spacelift_stack_dependency.example stack-id/depends-on-stack-id`. " +
26-
"The old format `stack-id/dependency-ulid` is deprecated but still supported for backward compatibility.",
24+
"changes to the dependency will trigger the dependent.",
2725

2826
CreateContext: resourceStackDependencyCreate,
2927
ReadContext: resourceStackDependencyRead,

spacelift/resource_stack_dependency_reference.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ func resourceStackDependencyReference() *schema.Resource {
2020
Description: "" +
2121
"`spacelift_stack_dependency_reference` represents a Spacelift **stack dependency reference** - " +
2222
"a reference matches a stack's output to another stack's input. It is similar to an environment variable " +
23-
"(`spacelift_environment_variable`), except that value is provided by another stack's output.\n\n" +
24-
"~> **Import format**: Use `terraform import spacelift_stack_dependency_reference.example stack-id/depends-on-stack-id/input-name`. " +
25-
"The old format `stack-id/dependency-ulid/reference-ulid` is deprecated but still supported for backward compatibility.",
23+
"(`spacelift_environment_variable`), except that value is provided by another stack's output.",
2624

2725
CreateContext: resourceStackDependencyReferenceCreate,
2826
ReadContext: resourceStackDependencyReferenceRead,

0 commit comments

Comments
 (0)