Skip to content

Conversation

brandonc
Copy link
Collaborator

Description

Adds BETA support for Stacks as tfe_stack

See documentation for details.

NOTE: This should not be merged until the linked go-tfe PR is released.

Remember to:

Testing plan

Details

provider "tfe" { }

resource "tfe_project" "example" {
name = "example-project"
organization = "example-org"
}

resource "tfe_oauth_client" "gh" {
organization = "example-org"
name = "gh-example"
api_url = "https://api.github.com"
http_url = "https://github.com"
oauth_token = "ghp_SECRET_TOKEN"
service_provider = "github"
organization_scoped = true
}

resource "tfe_stack" "example" {
name = "example-renamed"
description = "the worst stack ever"
project_id = tfe_project.example.id

vcs_repo {
identifier = "hashicorp-guides/pet-nulls-stack"
oauth_token_id = tfe_oauth_client.gh.oauth_token_id
branch = "main"
}
}

External links

Include any links here that might be helpful for people reviewing your PR. If there are none, feel free to delete this section.

Output from acceptance tests

Please run applicable acceptance tests locally and include the output here. See testing.md to learn how to run acceptance tests.

If you are an external contributor, your contribution(s) will first be reviewed before running them against the project's CI pipeline.

$ ENABLE_BETA=1 make testacc TESTARGS='-run TestAccTFEStackResource_basic -v'
TF_ACC=1 TF_LOG_SDK_PROTO=OFF go test $(go list ./... |grep -v 'vendor') -v -run TestAccTFEStackResource_basic -v -timeout 15m
?   	github.com/hashicorp/terraform-provider-tfe	[no test files]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-tfe/internal/client	(cached) [no tests to run]
testing: warning: no tests to run
PASS
ok  	github.com/hashicorp/terraform-provider-tfe/internal/logging	(cached) [no tests to run]
?   	github.com/hashicorp/terraform-provider-tfe/internal/provider/validators	[no test files]
?   	github.com/hashicorp/terraform-provider-tfe/version	[no test files]
=== RUN   TestAccTFEStackResource_basic
--- PASS: TestAccTFEStackResource_basic (15.41s)
PASS
ok  	github.com/hashicorp/terraform-provider-tfe/internal/provider	16.048s
...

Copy link
Contributor

@sebasslash sebasslash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All in all, looks great. Really minor feedback below.

@brandonc brandonc force-pushed the TF-17010-provider-resource-tfe-stack branch from 82b718f to c419687 Compare July 3, 2024 16:12
@brandonc brandonc marked this pull request as ready for review July 3, 2024 16:12
@brandonc brandonc requested a review from a team as a code owner July 3, 2024 16:12
@brandonc brandonc merged commit e1fda79 into main Jul 3, 2024
@brandonc brandonc deleted the TF-17010-provider-resource-tfe-stack branch July 3, 2024 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants