forked from hashicorp/terraform-provider-tfe
-
Notifications
You must be signed in to change notification settings - Fork 0
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 hashicorp#1608 from hashicorp/create-pull-request/…
…patch release: v0.64.0
- Loading branch information
Showing
30 changed files
with
141 additions
and
178 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
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
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
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
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
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 |
---|---|---|
|
@@ -17,26 +17,16 @@ Provides a workspace resource. | |
|
||
Basic usage: | ||
|
||
```csharp | ||
using Constructs; | ||
using HashiCorp.Cdktf; | ||
/*Provider bindings are generated by running cdktf get. | ||
See https://cdk.tf/provider-generation for more details.*/ | ||
using Gen.Providers.Tfe; | ||
class MyConvertedCode : TerraformStack | ||
{ | ||
public MyConvertedCode(Construct scope, string name) : base(scope, name) | ||
{ | ||
var tfeOrganizationTestOrganization = new Organization.Organization(this, "test-organization", new OrganizationConfig { | ||
Email = "[email protected]", | ||
Name = "my-org-name" | ||
}); | ||
new Workspace.Workspace(this, "test", new WorkspaceConfig { | ||
Name = "my-workspace-name", | ||
Organization = Token.AsString(tfeOrganizationTestOrganization.Name), | ||
TagNames = new [] { "test", "app" } | ||
}); | ||
} | ||
```hcl | ||
resource "tfe_organization" "test-organization" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
resource "tfe_workspace" "test" { | ||
name = "my-workspace-name" | ||
organization = tfe_organization.test-organization.name | ||
tag_names = ["test", "app"] | ||
} | ||
``` | ||
|
||
|
@@ -177,6 +167,7 @@ In addition to all arguments above, the following attributes are exported: | |
* `Id` - The workspace ID. | ||
* `ResourceCount` - The number of resources managed by the workspace. | ||
* `HtmlUrl` - The URL to the browsable HTML overview of the workspace. | ||
* `InheritsProjectAutoDestroy` - Indicates whether this workspace inherits project auto destroy settings. | ||
|
||
## Import | ||
|
||
|
@@ -191,4 +182,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd | |
terraform import tfe_workspace.test my-org-name/my-wkspace-name | ||
``` | ||
|
||
<!-- cache-key: cdktf-0.17.0-pre.15 input-2359c8613d3559ab7c7a4c6129993314e7d1492991970cbde73305dbd190c688 --> | ||
<!-- cache-key: cdktf-0.17.0-pre.15 input-4b1344d6931127aac5b21f2c92904baad7e55cce5d725e27e7c534c19ba0af5f --> |
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
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
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
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
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
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 |
---|---|---|
|
@@ -17,75 +17,44 @@ Provides a workspace resource. | |
|
||
Basic usage: | ||
|
||
```go | ||
import constructs "github.com/aws/constructs-go/constructs" | ||
import "github.com/hashicorp/terraform-cdk-go/cdktf" | ||
/*Provider bindings are generated by running cdktf get. | ||
See https://cdk.tf/provider-generation for more details.*/ | ||
import "github.com/aws-samples/dummy/gen/providers/tfe/organization" | ||
import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" | ||
type myConvertedCode struct { | ||
terraformStack | ||
```hcl | ||
resource "tfe_organization" "test-organization" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
func newMyConvertedCode(scope construct, name *string) *myConvertedCode { | ||
this := &myConvertedCode{} | ||
cdktf.NewTerraformStack_Override(this, scope, name) | ||
tfeOrganizationTestOrganization := organization.NewOrganization(this, jsii.String("test-organization"), &organizationConfig{ | ||
email: jsii.String("[email protected]"), | ||
name: jsii.String("my-org-name"), | ||
}) | ||
workspace.NewWorkspace(this, jsii.String("test"), &workspaceConfig{ | ||
name: jsii.String("my-workspace-name"), | ||
organization: cdktf.Token_AsString(tfeOrganizationTestOrganization.name), | ||
tagNames: []*string{ | ||
jsii.String("test"), | ||
jsii.String("app"), | ||
}, | ||
}) | ||
return this | ||
resource "tfe_workspace" "test" { | ||
name = "my-workspace-name" | ||
organization = tfe_organization.test-organization.name | ||
tag_names = ["test", "app"] | ||
} | ||
``` | ||
|
||
Usage with vcs_repo: | ||
|
||
```go | ||
import constructs "github.com/aws/constructs-go/constructs" | ||
import "github.com/hashicorp/terraform-cdk-go/cdktf" | ||
/*Provider bindings are generated by running cdktf get. | ||
See https://cdk.tf/provider-generation for more details.*/ | ||
import "github.com/aws-samples/dummy/gen/providers/tfe/organization" | ||
import "github.com/aws-samples/dummy/gen/providers/tfe/oauthClient" | ||
import "github.com/aws-samples/dummy/gen/providers/tfe/workspace" | ||
type myConvertedCode struct { | ||
terraformStack | ||
```hcl | ||
resource "tfe_organization" "test-organization" { | ||
name = "my-org-name" | ||
email = "[email protected]" | ||
} | ||
func newMyConvertedCode(scope construct, name *string) *myConvertedCode { | ||
this := &myConvertedCode{} | ||
cdktf.NewTerraformStack_Override(this, scope, name) | ||
tfeOrganizationTestOrganization := organization.NewOrganization(this, jsii.String("test-organization"), &organizationConfig{ | ||
email: jsii.String("[email protected]"), | ||
name: jsii.String("my-org-name"), | ||
}) | ||
tfeOauthClientTest := oauthClient.NewOauthClient(this, jsii.String("test"), &oauthClientConfig{ | ||
apiUrl: jsii.String("https://api.github.com"), | ||
httpUrl: jsii.String("https://github.com"), | ||
oauthToken: jsii.String("oauth_token_id"), | ||
organization: tfeOrganizationTestOrganization, | ||
serviceProvider: jsii.String("github"), | ||
}) | ||
workspace.NewWorkspace(this, jsii.String("parent"), &workspaceConfig{ | ||
name: jsii.String("parent-ws"), | ||
organization: tfeOrganizationTestOrganization, | ||
queueAllRuns: jsii.Boolean(false), | ||
vcsRepo: &workspaceVcsRepo{ | ||
branch: jsii.String("main"), | ||
identifier: jsii.String("my-org-name/vcs-repository"), | ||
oauthTokenId: cdktf.Token_AsString(tfeOauthClientTest.oauthTokenId), | ||
}, | ||
}) | ||
return this | ||
resource "tfe_oauth_client" "test" { | ||
organization = tfe_organization.test-organization | ||
api_url = "https://api.github.com" | ||
http_url = "https://github.com" | ||
oauth_token = "oauth_token_id" | ||
service_provider = "github" | ||
} | ||
resource "tfe_workspace" "parent" { | ||
name = "parent-ws" | ||
organization = tfe_organization.test-organization | ||
queue_all_runs = false | ||
vcs_repo { | ||
branch = "main" | ||
identifier = "my-org-name/vcs-repository" | ||
oauth_token_id = tfe_oauth_client.test.oauth_token_id | ||
} | ||
} | ||
``` | ||
|
||
|
@@ -189,6 +158,7 @@ In addition to all arguments above, the following attributes are exported: | |
* `Id` - The workspace ID. | ||
* `ResourceCount` - The number of resources managed by the workspace. | ||
* `HtmlUrl` - The URL to the browsable HTML overview of the workspace. | ||
* `InheritsProjectAutoDestroy` - Indicates whether this workspace inherits project auto destroy settings. | ||
|
||
## Import | ||
|
||
|
@@ -203,4 +173,4 @@ terraform import tfe_workspace.test ws-CH5in3chf8RJjrVd | |
terraform import tfe_workspace.test my-org-name/my-wkspace-name | ||
``` | ||
|
||
<!-- cache-key: cdktf-0.17.0-pre.15 input-2359c8613d3559ab7c7a4c6129993314e7d1492991970cbde73305dbd190c688 --> | ||
<!-- cache-key: cdktf-0.17.0-pre.15 input-4b1344d6931127aac5b21f2c92904baad7e55cce5d725e27e7c534c19ba0af5f --> |
Oops, something went wrong.