Skip to content

Commit 128626d

Browse files
authored
feat: add write-only key_wo attribute to tfe_ssh_key (#1659)
* chore: migrate `tfe_ssh_key` to the provider framework * feat: add write-only 'key_wo' attribute to 'tfe_ssh_key' * fix: remove resource from state if not found on read * fix: return early if not found on delete * tests: use muxed provider factory for tests that use tfe_ssh_key * docs: update docs for organization attribute
1 parent 1e0c4ea commit 128626d

9 files changed

+370
-85
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ ENHANCEMENTS:
2525

2626
* resource/tfe_saml_settings: Add `private_key_wo` write-only attribute, by @uturunku1 ([#1660](https://github.com/hashicorp/terraform-provider-tfe/pull/1660))
2727

28+
* resource/tfe_ssh_key: Add `key_wo` write-only attribute, by @ctrombley ([#1659](https://github.com/hashicorp/terraform-provider-tfe/pull/1659))
2829
## v.0.64.0
2930

3031
FEATURES:

internal/provider/data_source_ssh_key_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ func TestAccTFESSHKeyDataSource_basic(t *testing.T) {
1717
orgName := fmt.Sprintf("tst-terraform-%d", rInt)
1818

1919
resource.Test(t, resource.TestCase{
20-
PreCheck: func() { testAccPreCheck(t) },
21-
Providers: testAccProviders,
20+
PreCheck: func() { testAccPreCheck(t) },
21+
ProtoV5ProviderFactories: testAccMuxedProviders,
2222
Steps: []resource.TestStep{
2323
{
2424
Config: testAccTFESSHKeyDataSourceConfig(rInt),

internal/provider/provider.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ func Provider() *schema.Provider {
129129
"tfe_run_trigger": resourceTFERunTrigger(),
130130
"tfe_sentinel_policy": resourceTFESentinelPolicy(),
131131
"tfe_sentinel_version": resourceTFESentinelVersion(),
132-
"tfe_ssh_key": resourceTFESSHKey(),
133132
"tfe_team": resourceTFETeam(),
134133
"tfe_team_access": resourceTFETeamAccess(),
135134
"tfe_team_organization_member": resourceTFETeamOrganizationMember(),

internal/provider/provider_next.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ func (p *frameworkProvider) Resources(ctx context.Context) []func() resource.Res
143143
NewResourceVariable,
144144
NewResourceWorkspaceSettings,
145145
NewSAMLSettingsResource,
146+
NewSSHKey,
146147
NewStackResource,
147148
NewTeamNotificationConfigurationResource,
148149
NewTestVariableResource,

0 commit comments

Comments
 (0)