Skip to content

Commit 493948f

Browse files
modular-magicianrileykarson
authored andcommitted
Update apigee keystore resource names to be consistent (#7665) (#5454)
Signed-off-by: Modular Magician <[email protected]>
1 parent d1f8c46 commit 493948f

8 files changed

+126
-123
lines changed

.changelog/7665.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:none
2+
No changelog entry- this will be cherry-picked to `4.61.0` and affects unreleased resources. The changelog will need to be amended, though.
3+
```

google-beta/provider.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,6 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
835835
"google_apigee_addons_config": ResourceApigeeAddonsConfig(),
836836
"google_apigee_endpoint_attachment": ResourceApigeeEndpointAttachment(),
837837
"google_apigee_env_keystore": ResourceApigeeEnvKeystore(),
838-
"google_apigee_env_keystore_alias_self_signed_cert": ResourceApigeeEnvKeystoreAliasSelfSignedCert(),
839838
"google_apigee_env_references": ResourceApigeeEnvReferences(),
840839
"google_apigee_envgroup": ResourceApigeeEnvgroup(),
841840
"google_apigee_envgroup_attachment": ResourceApigeeEnvgroupAttachment(),
@@ -845,6 +844,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
845844
"google_apigee_environment_iam_policy": ResourceIamPolicy(ApigeeEnvironmentIamSchema, ApigeeEnvironmentIamUpdaterProducer, ApigeeEnvironmentIdParseFunc),
846845
"google_apigee_instance": ResourceApigeeInstance(),
847846
"google_apigee_instance_attachment": ResourceApigeeInstanceAttachment(),
847+
"google_apigee_keystores_aliases_self_signed_cert": ResourceApigeeKeystoresAliasesSelfSignedCert(),
848848
"google_apigee_nat_address": ResourceApigeeNatAddress(),
849849
"google_apigee_organization": ResourceApigeeOrganization(),
850850
"google_apigee_sync_authorization": ResourceApigeeSyncAuthorization(),
@@ -1336,7 +1336,7 @@ func ResourceMapWithErrors() (map[string]*schema.Resource, error) {
13361336
"google_apigee_sharedflow": ResourceApigeeSharedFlow(),
13371337
"google_apigee_sharedflow_deployment": ResourceApigeeSharedFlowDeployment(),
13381338
"google_apigee_flowhook": ResourceApigeeFlowhook(),
1339-
"google_apigee_env_keystore_alias_pkcs12": ResourceApigeeEnvKeystoreAliasPkcs12(),
1339+
"google_apigee_keystores_aliases_pkcs12": ResourceApigeeKeystoresAliasesPkcs12(),
13401340
"google_apigee_keystores_aliases_key_cert_file": ResourceApigeeKeystoresAliasesKeyCertFile(),
13411341
"google_bigquery_table": ResourceBigQueryTable(),
13421342
"google_bigtable_gc_policy": ResourceBigtableGCPolicy(),

google-beta/resource_apigee_env_keystore_alias_pkcs12.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ import (
1313
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1414
)
1515

16-
func ResourceApigeeEnvKeystoreAliasPkcs12() *schema.Resource {
16+
func ResourceApigeeKeystoresAliasesPkcs12() *schema.Resource {
1717
return &schema.Resource{
18-
Create: resourceApigeeEnvKeystoreAliasPkcs12Create,
19-
Read: resourceApigeeEnvKeystoreAliasPkcs12Read,
20-
Delete: resourceApigeeEnvKeystoreAliasPkcs12Delete,
18+
Create: ResourceApigeeKeystoresAliasesPkcs12Create,
19+
Read: ResourceApigeeKeystoresAliasesPkcs12Read,
20+
Delete: ResourceApigeeKeystoresAliasesPkcs12Delete,
2121

2222
Importer: &schema.ResourceImporter{
23-
State: resourceApigeeEnvKeystoreAliasPkcs12Import,
23+
State: ResourceApigeeKeystoresAliasesPkcs12Import,
2424
},
2525

2626
Timeouts: &schema.ResourceTimeout{
@@ -158,7 +158,7 @@ Flag is set to Yes if the certificate is valid, No if expired, or Not yet if not
158158
}
159159
}
160160

161-
func resourceApigeeEnvKeystoreAliasPkcs12Create(d *schema.ResourceData, meta interface{}) error {
161+
func ResourceApigeeKeystoresAliasesPkcs12Create(d *schema.ResourceData, meta interface{}) error {
162162
config := meta.(*Config)
163163
userAgent, err := generateUserAgentString(d, config.UserAgent)
164164
if err != nil {
@@ -207,10 +207,10 @@ func resourceApigeeEnvKeystoreAliasPkcs12Create(d *schema.ResourceData, meta int
207207

208208
log.Printf("[DEBUG] Finished creating KeystoreAliasesPkcs %q: %#v", d.Id(), res)
209209

210-
return resourceApigeeEnvKeystoreAliasPkcs12Read(d, meta)
210+
return ResourceApigeeKeystoresAliasesPkcs12Read(d, meta)
211211
}
212212

213-
func resourceApigeeEnvKeystoreAliasPkcs12Read(d *schema.ResourceData, meta interface{}) error {
213+
func ResourceApigeeKeystoresAliasesPkcs12Read(d *schema.ResourceData, meta interface{}) error {
214214
config := meta.(*Config)
215215
userAgent, err := generateUserAgentString(d, config.UserAgent)
216216
if err != nil {
@@ -249,7 +249,7 @@ func resourceApigeeEnvKeystoreAliasPkcs12Read(d *schema.ResourceData, meta inter
249249
return nil
250250
}
251251

252-
func resourceApigeeEnvKeystoreAliasPkcs12Delete(d *schema.ResourceData, meta interface{}) error {
252+
func ResourceApigeeKeystoresAliasesPkcs12Delete(d *schema.ResourceData, meta interface{}) error {
253253
config := meta.(*Config)
254254
userAgent, err := generateUserAgentString(d, config.UserAgent)
255255
if err != nil {
@@ -280,7 +280,7 @@ func resourceApigeeEnvKeystoreAliasPkcs12Delete(d *schema.ResourceData, meta int
280280
return nil
281281
}
282282

283-
func resourceApigeeEnvKeystoreAliasPkcs12Import(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
283+
func ResourceApigeeKeystoresAliasesPkcs12Import(d *schema.ResourceData, meta interface{}) ([]*schema.ResourceData, error) {
284284
config := meta.(*Config)
285285
if err := parseImportId([]string{
286286
"organizations/(?P<org_id>[^/]+)/environments/(?P<environment>[^/]+)/keystores/(?P<keystore>[^/]+)/aliases/(?P<alias>[^/]+)",

google-beta/resource_apigee_env_keystore_alias_pkcs12_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/hashicorp/terraform-plugin-sdk/v2/terraform"
1010
)
1111

12-
func TestAccApigeeEnvKeystoreAliasPkcs12_apigeeEnvKeystoreAliasPkcs12Example(t *testing.T) {
12+
func TestAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example(t *testing.T) {
1313
t.Parallel()
1414

1515
context := map[string]interface{}{
@@ -21,13 +21,13 @@ func TestAccApigeeEnvKeystoreAliasPkcs12_apigeeEnvKeystoreAliasPkcs12Example(t *
2121
VcrTest(t, resource.TestCase{
2222
PreCheck: func() { testAccPreCheck(t) },
2323
ProtoV5ProviderFactories: ProtoV5ProviderFactories(t),
24-
CheckDestroy: testAccCheckApigeeEnvKeystoreAliasPkcs12DestroyProducer(t),
24+
CheckDestroy: testAccCheckApigeeKeystoresAliasesPkcs12DestroyProducer(t),
2525
Steps: []resource.TestStep{
2626
{
27-
Config: testAccApigeeEnvKeystoreAliasPkcs12_apigeeEnvKeystoreAliasPkcs12Example(context),
27+
Config: testAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example(context),
2828
},
2929
{
30-
ResourceName: "google_apigee_env_keystore_alias_pkcs12.apigee_environment_keystore_aliases_pkcs",
30+
ResourceName: "google_apigee_keystores_aliases_pkcs12.apigee_environment_keystore_aliases_pkcs",
3131
ImportState: true,
3232
ImportStateVerify: true,
3333
ImportStateVerifyIgnore: []string{"file", "filehash", "password", "org_id", "environment"},
@@ -36,7 +36,7 @@ func TestAccApigeeEnvKeystoreAliasPkcs12_apigeeEnvKeystoreAliasPkcs12Example(t *
3636
})
3737
}
3838

39-
func testAccApigeeEnvKeystoreAliasPkcs12_apigeeEnvKeystoreAliasPkcs12Example(context map[string]interface{}) string {
39+
func testAccApigeeKeystoresAliasesPkcs12_ApigeeKeystoresAliasesPkcs12Example(context map[string]interface{}) string {
4040
return Nprintf(`
4141
resource "google_project" "project" {
4242
project_id = "tf-test%{random_suffix}"
@@ -106,7 +106,7 @@ resource "google_apigee_env_keystore" "apigee_environment_keystore_alias" {
106106
env_id = google_apigee_environment.apigee_environment_keystore.id
107107
}
108108
109-
resource "google_apigee_env_keystore_alias_pkcs12" "apigee_environment_keystore_aliases_pkcs" {
109+
resource "google_apigee_keystores_aliases_pkcs12" "apigee_environment_keystore_aliases_pkcs" {
110110
environment = google_apigee_environment.apigee_environment_keystore.name
111111
org_id = google_apigee_organization.apigee_org.name
112112
keystore = google_apigee_env_keystore.apigee_environment_keystore_alias.name
@@ -118,7 +118,7 @@ resource "google_apigee_env_keystore_alias_pkcs12" "apigee_environment_keystore_
118118
`, context)
119119
}
120120

121-
func testAccCheckApigeeEnvKeystoreAliasPkcs12DestroyProducer(t *testing.T) func(s *terraform.State) error {
121+
func testAccCheckApigeeKeystoresAliasesPkcs12DestroyProducer(t *testing.T) func(s *terraform.State) error {
122122
return func(s *terraform.State) error {
123123
for name, rs := range s.RootModule().Resources {
124124
if rs.Type != "google_apigee_env_keystore_aliases_pkcs" {

0 commit comments

Comments
 (0)