Skip to content

Commit

Permalink
Remove usage of resource_definition (#9553) (hashicorp#6698)
Browse files Browse the repository at this point in the history
* Remove usage of resource_definition

* Update mmv1/products/identityplatform/ProjectDefaultConfig.yaml



---------


[upstream:30d3f116bb169f721ac0b58e772d07c5bce289f0]

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Dec 1, 2023
1 parent 2a1a45c commit 807d501
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .changelog/9553.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:none

```
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@ func ResourceIdentityPlatformProjectDefaultConfig() *schema.Resource {
tpgresource.DefaultProviderProject,
),

DeprecationMessage: "Deprecated. Use the `google_identity_platform_config` resource instead. " +
"It contains a more comprehensive list of fields, and was created before " +
"`google_identity_platform_project_default_config` was added.",
DeprecationMessage: "`google_identity_platform_config` is deprecated and will be removed in the next major release of the provider. Use the `google_identity_platform_config` resource instead. It contains a more comprehensive list of fields, and was created before `google_identity_platform_project_default_config` was added.",

Schema: map[string]*schema.Schema{
"sign_in": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,11 @@ import (
"google.golang.org/api/googleapi"
)

func resourceSecretManagerSecretVersionUpdate(d *schema.ResourceData, meta interface{}) error {
config := meta.(*transport_tpg.Config)

_, err := expandSecretManagerSecretVersionEnabled(d.Get("enabled"), d, config)
if err != nil {
return err
}

return resourceSecretManagerSecretVersionRead(d, meta)
}

func ResourceSecretManagerSecretVersion() *schema.Resource {
return &schema.Resource{
Create: resourceSecretManagerSecretVersionCreate,
Read: resourceSecretManagerSecretVersionRead,
Update: resourceSecretManagerSecretVersionUpdate,
Delete: resourceSecretManagerSecretVersionDelete,

Importer: &schema.ResourceImporter{
Expand All @@ -57,11 +47,10 @@ func ResourceSecretManagerSecretVersion() *schema.Resource {

Timeouts: &schema.ResourceTimeout{
Create: schema.DefaultTimeout(20 * time.Minute),
Update: schema.DefaultTimeout(20 * time.Minute),
Delete: schema.DefaultTimeout(20 * time.Minute),
},

Update: resourceSecretManagerSecretVersionUpdate,

Schema: map[string]*schema.Schema{
"secret_data": {
Type: schema.TypeString,
Expand Down Expand Up @@ -294,6 +283,16 @@ func resourceSecretManagerSecretVersionRead(d *schema.ResourceData, meta interfa
return nil
}

func resourceSecretManagerSecretVersionUpdate(d *schema.ResourceData, meta interface{}) error {
config := meta.(*transport_tpg.Config)
_, err := expandSecretManagerSecretVersionEnabled(d.Get("enabled"), d, config)
if err != nil {
return err
}

return resourceSecretManagerSecretVersionRead(d, meta)
}

func resourceSecretManagerSecretVersionDelete(d *schema.ResourceData, meta interface{}) error {
config := meta.(*transport_tpg.Config)
userAgent, err := tpgresource.GenerateUserAgentString(d, config.UserAgent)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ description: |-
---

# google\_identity\_platform\_project\_default\_config
~> **Warning:** `google_identity_platform_config` is deprecated and will be removed in the next major release of the provider. Use the `google_identity_platform_config` resource instead. It contains a more comprehensive list of fields, and was created before `google_identity_platform_project_default_config` was added.

There is no persistent data associated with this resource.

Expand Down
1 change: 1 addition & 0 deletions website/docs/r/secret_manager_secret_version.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ This resource provides the following
[Timeouts](https://developer.hashicorp.com/terraform/plugin/sdkv2/resources/retries-and-customizable-timeouts) configuration options:

- `create` - Default is 20 minutes.
- `update` - Default is 20 minutes.
- `delete` - Default is 20 minutes.

## Import
Expand Down

0 comments on commit 807d501

Please sign in to comment.