Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate ad secret resources #1837

Closed
Closed
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
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 3.15.2 (May 3, 2023)
BUGS:
* Revert [#1830](https://github.com/hashicorp/terraform-provider-vault/pull/1830) which introduced a unexpected breaking change in the way authentication is done within a namespace: ([#1840](https://github.com/hashicorp/terraform-provider-vault/pull/1840))

## 3.15.1 (May 3, 2023)
BUGS:
* Ensure that the auth_login honours the provider's namespace: ([#1830](https://github.com/hashicorp/terraform-provider-vault/pull/1830))

## 3.15.0 (April 17, 2023)
FEATURES:
* Add support for MongoDB Atlas Secrets engine: ([#1816](https://github.com/hashicorp/terraform-provider-vault/pull/1816))

BUGS:
* Fix panic while importing namespaces: ([#1818](https://github.com/hashicorp/terraform-provider-vault/pull/1818))
* Avoid writing empty strings to Vault when creating PKCS managed keys: ([#1803](https://github.com/hashicorp/terraform-provider-vault/pull/1803))
* Fix possible panic with autopilot import: ([#1801](https://github.com/hashicorp/terraform-provider-vault/pull/1801))
* Ensure that the `qr_size` can be properly configured for MFA TOTP: ([#1750](https://github.com/hashicorp/terraform-provider-vault/pull/1750))

## 3.14.0 (March 15, 2023)
FEATURES:
* Add PKI Unified CRL parameters: ([#1789](https://github.com/hashicorp/terraform-provider-vault/pull/1789))
Expand Down
3 changes: 2 additions & 1 deletion vault/data_source_ad_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (

func adAccessCredentialsDataSource() *schema.Resource {
return &schema.Resource{
Read: ReadWrapper(readCredsResource),
DeprecationMessage: `This data source is replaced by "vault_ldap_static_credentials" and will be removed in the next major release.`,
Read: ReadWrapper(readCredsResource),
Schema: map[string]*schema.Schema{
"backend": {
Type: schema.TypeString,
Expand Down
9 changes: 5 additions & 4 deletions vault/resource_ad_secret_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ func adSecretBackendResource() *schema.Resource {
},
}
return provider.MustAddMountMigrationSchema(&schema.Resource{
Create: createConfigResource,
Update: updateConfigResource,
Read: ReadWrapper(readConfigResource),
Delete: deleteConfigResource,
DeprecationMessage: `This resource is replaced by "vault_ldap_secret_backend" and will be removed in the next major release.`,
Create: createConfigResource,
Update: updateConfigResource,
Read: ReadWrapper(readConfigResource),
Delete: deleteConfigResource,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down
9 changes: 5 additions & 4 deletions vault/resource_ad_secret_library.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,11 @@ func adSecretBackendLibraryResource() *schema.Resource {
},
}
return &schema.Resource{
Create: createLibraryResource,
Update: updateLibraryResource,
Read: ReadWrapper(readLibraryResource),
Delete: deleteLibraryResource,
DeprecationMessage: `This resource is replaced by "vault_ldap_secret_backend_library_set" and will be removed in the next major release.`,
Create: createLibraryResource,
Update: updateLibraryResource,
Read: ReadWrapper(readLibraryResource),
Delete: deleteLibraryResource,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down
9 changes: 5 additions & 4 deletions vault/resource_ad_secret_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,11 @@ func adSecretBackendRoleResource() *schema.Resource {
},
}
return &schema.Resource{
Create: createRoleResource,
Update: updateRoleResource,
Read: ReadWrapper(readRoleResource),
Delete: deleteRoleResource,
DeprecationMessage: `This resource is replaced by "vault_ldap_secret_backend_static_role" and will be removed in the next major release.`,
Create: createRoleResource,
Update: updateRoleResource,
Read: ReadWrapper(readRoleResource),
Delete: deleteRoleResource,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down
5 changes: 0 additions & 5 deletions vault/resource_okta_auth_backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ func oktaAuthBackendResource() *schema.Resource {
Delete: oktaAuthBackendDelete,
Read: ReadWrapper(oktaAuthBackendRead),
Update: oktaAuthBackendUpdate,
Exists: oktaAuthBackendExists,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
},
Expand Down Expand Up @@ -290,10 +289,6 @@ func oktaAuthBackendDelete(d *schema.ResourceData, meta interface{}) error {
return nil
}

func oktaAuthBackendExists(d *schema.ResourceData, meta interface{}) (bool, error) {
return isOktaAuthBackendPresent(meta.(*provider.ProviderMeta).GetClient(), d.Id())
}

func oktaAuthBackendRead(d *schema.ResourceData, meta interface{}) error {
client, e := provider.GetClient(d, meta)
if e != nil {
Expand Down
3 changes: 3 additions & 0 deletions website/docs/d/ad_access_credentials.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ description: |-

# vault\_ad\_access\_credentials

~> **Note** This data source is replaced by "vault_ldap_static_credentials" and
will be removed in the next major release.

Reads Active Directory credentials from an AD secret backend in Vault.

~> **Important** All data retrieved from Vault will be
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/ad_secret_backend.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ description: |-

# vault\_ad\_secret\_backend

~> **Note** This resource is replaced by "vault_ldap_secret_backend" and will
be removed in the next major release.

Creates an Active Directory Secret Backend for Vault. Active Directory secret backend
rotates existing Active Directory service account passwords based on the TTL of the role.

Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/ad_secret_backend_library.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ description: |-

# vault\_ad\_secret\_backend\_library

~> **Note** This resource is replaced by "vault_ldap_secret_backend_library_set"
and will be removed in the next major release.

Creates a library on an Active Directory Secret Backend for Vault. Libraries create
a pool of existing Active Directory service accounts which can be checked out
by users.
Expand Down
3 changes: 3 additions & 0 deletions website/docs/r/ad_secret_role.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ description: |-

# vault\_ad\_secret\_role

~> **Note** This resource is replaced by "vault_ldap_secret_backend_static_role"
and will be removed in the next major release.

Creates a role on an Active Directory Secret Backend for Vault. Roles are
used to map credentials to existing Active Directory service accounts.

Expand Down