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

Implement Github Auth Backend resources #255

Merged
merged 10 commits into from
Jan 29, 2019

Conversation

cvbarros
Copy link
Contributor

Resolves #254

In addition to the feature request implementation, this PR also introduces some common idioms/helpers (heavily present in terraform-provider-aws codebase) to flatten/expand structures from the config to the upstream API. Based the implementation on the recently-released vault_gcp_auth_backend, where:

  • There's no distinction between the Auth Mount and it's configuration. They are handled as a single resource in resource_github_auth_backend.go.

  • Introduces a shared schema for tuning auth methods, as the configuration block tune. This can be reused/refactored to fix Tune Auth Method to permit audit_non_hmac_request_keys #234 and open up path to standardize other auth backends (as it is done in Vault's implementation)

  • Handles TTL by having a human-friendly duration interface and takes care of Vault's API translation. This is an attempt to resolve some inconsistencies and "permanent diffs" when applying configurations that have max_ttl, or tll set, for example.

  • Raises the bar of acceptance tests, by adding destroy checks and existence checks for resources. In theory, the optimal tests would validate resource attributes by fetching them from the API. But as long as the create/read, update/read cycle is respected, these are minimum problems.

  • Tried to apply guidelines as described here, specially related to structures.go and validators.go.

@cvbarros
Copy link
Contributor Author

I've left the commit history for inspection, but I can squash them if needed.

"github.com/hashicorp/vault/api"
)

func TestAccGithubAuthBackend_basic(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I attempt to run this test, I get the following failures. I'm sure at least some of them would be resolved by simply merging in the terraform vault provider's master branch.

./resource_aws_secret_backend_role.go:48:5: cannot use util.JsonDiffSuppress (type func(string, string, string, *"github.com/terraform-providers/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/schema".ResourceData) bool) as type "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/schema".SchemaDiffSuppressFunc in field value
./structures.go:109:10: undefined: util.ShortDur
./structures.go:111:10: undefined: util.ShortDur
./structures.go:114:11: undefined: util.ShortDur
./resource_aws_secret_backend_role_test.go:33:36: cannot use util.TestCheckResourceAttrJSON("vault_aws_secret_backend_role.test_policy_inline", "policy", testAccAWSSecretBackendRolePolicyInline_basic) (type "github.com/terraform-providers/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc) as type "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc in argument to "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".ComposeTestCheckFunc
./resource_aws_secret_backend_role_test.go:44:36: cannot use util.TestCheckResourceAttrJSON("vault_aws_secret_backend_role.test_policy_inline", "policy", testAccAWSSecretBackendRolePolicyInline_updated) (type "github.com/terraform-providers/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc) as type "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc in argument to "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".ComposeTestCheckFunc
./resource_aws_secret_backend_role_test.go:68:36: cannot use util.TestCheckResourceAttrJSON("vault_aws_secret_backend_role.test_policy_inline", "policy", testAccAWSSecretBackendRolePolicyInline_basic) (type "github.com/terraform-providers/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc) as type "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc in argument to "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".ComposeTestCheckFunc
./resource_aws_secret_backend_role_test.go:102:36: cannot use util.TestCheckResourceAttrJSON("vault_aws_secret_backend_role.test_policy_inline", "policy", testAccAWSSecretBackendRolePolicyInline_basic) (type "github.com/terraform-providers/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc) as type "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc in argument to "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".ComposeTestCheckFunc
./resource_aws_secret_backend_role_test.go:113:36: cannot use util.TestCheckResourceAttrJSON("vault_aws_secret_backend_role.test_policy_inline", "policy", testAccAWSSecretBackendRolePolicyInline_updated) (type "github.com/terraform-providers/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc) as type "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".TestCheckFunc in argument to "github.com/cvbarros/terraform-provider-vault/vendor/github.com/hashicorp/terraform/helper/resource".ComposeTestCheckFunc

Description: "Maximum duration after which authentication will be expired, in seconds.",
ValidateFunc: validateDuration,
},
"tune": authMountTuneSchema(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

@cvbarros
Copy link
Contributor Author

Hi @tyrannosaurus-becks , I've rebased my local from master, force pushed to my fork branch, did a clean checkout and reran all the tests with no failures:

github.com/terraform-providers/terraform-provider-vault  github-auth-resources ✔                                                           8d
▶ make testacc
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test $(go list ./... |grep -v 'vendor') -v  -timeout 120m
?       github.com/terraform-providers/terraform-provider-vault [no test files]
=== RUN   TestExpiredTokenError
--- PASS: TestExpiredTokenError (0.00s)
PASS
ok      github.com/terraform-providers/terraform-provider-vault/util    0.026s
=== RUN   TestAccAppRoleAuthBackendRoleID_basic
--- PASS: TestAccAppRoleAuthBackendRoleID_basic (0.26s)
=== RUN   TestAccAppRoleAuthBackendRoleID_customID
--- PASS: TestAccAppRoleAuthBackendRoleID_customID (0.26s)
=== RUN   TestAccDataSourceAWSAccessCredentials_basic
--- SKIP: TestAccDataSourceAWSAccessCredentials_basic (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccDataSourceAWSAccessCredentials_sts
--- SKIP: TestAccDataSourceAWSAccessCredentials_sts (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestDataSourceGenericSecret
--- PASS: TestDataSourceGenericSecret (0.20s)
=== RUN   TestV2Secret
--- PASS: TestV2Secret (0.28s)
=== RUN   TestAccKubernetesAuthBackendConfigDataSource_basic
--- PASS: TestAccKubernetesAuthBackendConfigDataSource_basic (0.22s)
=== RUN   TestAccKubernetesAuthBackendConfigDataSource_full
--- PASS: TestAccKubernetesAuthBackendConfigDataSource_full (0.23s)
=== RUN   TestAccKubernetesAuthBackendRoleDataSource_basic
--- PASS: TestAccKubernetesAuthBackendRoleDataSource_basic (0.23s)
=== RUN   TestAccKubernetesAuthBackendRoleDataSource_full
--- PASS: TestAccKubernetesAuthBackendRoleDataSource_full (0.20s)
=== RUN   TestAccAuthBackend_importBasic
--- PASS: TestAccAuthBackend_importBasic (0.11s)
=== RUN   TestAccConsulSecretBackend_import
--- PASS: TestAccConsulSecretBackend_import (0.13s)
=== RUN   TestAccGenericSecret_importBasic
--- PASS: TestAccGenericSecret_importBasic (0.17s)
=== RUN   TestAccMount_importBasic
--- PASS: TestAccMount_importBasic (0.10s)
=== RUN   TestAccPolicy_importBasic
--- PASS: TestAccPolicy_importBasic (0.10s)
=== RUN   TestProvider
--- PASS: TestProvider (0.00s)
=== RUN   TestAccProviderToken
=== RUN   TestAccProviderToken/None
=== RUN   TestAccProviderToken/File
=== RUN   TestAccProviderToken/CustomHelper
=== RUN   TestAccProviderToken/Schema
--- PASS: TestAccProviderToken (0.01s)
    --- PASS: TestAccProviderToken/None (0.00s)
    --- PASS: TestAccProviderToken/File (0.00s)
    --- PASS: TestAccProviderToken/CustomHelper (0.01s)
    --- PASS: TestAccProviderToken/Schema (0.00s)
=== RUN   TestAccAppRoleAuthBackendLogin_basic
--- PASS: TestAccAppRoleAuthBackendLogin_basic (0.27s)
=== RUN   TestAccAppRoleAuthBackendRoleSecretID_basic
--- PASS: TestAccAppRoleAuthBackendRoleSecretID_basic (0.21s)
=== RUN   TestAccAppRoleAuthBackendRoleSecretID_full
--- PASS: TestAccAppRoleAuthBackendRoleSecretID_full (0.18s)
=== RUN   TestAccAppRoleAuthBackendRole_import
--- PASS: TestAccAppRoleAuthBackendRole_import (0.17s)
=== RUN   TestAccAppRoleAuthBackendRole_basic
--- PASS: TestAccAppRoleAuthBackendRole_basic (0.16s)
=== RUN   TestAccAppRoleAuthBackendRole_update
--- PASS: TestAccAppRoleAuthBackendRole_update (0.32s)
=== RUN   TestAccAppRoleAuthBackendRole_full
--- PASS: TestAccAppRoleAuthBackendRole_full (0.17s)
=== RUN   TestAccAppRoleAuthBackendRole_fullUpdate
--- PASS: TestAccAppRoleAuthBackendRole_fullUpdate (0.27s)
=== RUN   TestResourceAudit
--- PASS: TestResourceAudit (0.10s)
=== RUN   TestAuthBackendMigrateState
--- PASS: TestAuthBackendMigrateState (0.00s)
=== RUN   TestResourceAuth
--- PASS: TestResourceAuth (0.17s)
=== RUN   TestAccAWSAuthBackendCert_import
--- PASS: TestAccAWSAuthBackendCert_import (0.14s)
=== RUN   TestAccAWSAuthBackendCert_basic
--- PASS: TestAccAWSAuthBackendCert_basic (0.13s)
=== RUN   TestAccAWSAuthBackendClient_import
--- PASS: TestAccAWSAuthBackendClient_import (0.14s)
=== RUN   TestAccAWSAuthBackendClient_basic
--- PASS: TestAccAWSAuthBackendClient_basic (0.23s)
=== RUN   TestAccAWSAuthBackendIdentityWhitelist_import
--- PASS: TestAccAWSAuthBackendIdentityWhitelist_import (0.16s)
=== RUN   TestAccAWSAuthBackendIdentityWhitelist_basic
--- PASS: TestAccAWSAuthBackendIdentityWhitelist_basic (0.14s)
=== RUN   TestAccAWSAuthBackendLogin_iamIdentity
--- SKIP: TestAccAWSAuthBackendLogin_iamIdentity (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccAWSAuthBackendLogin_pkcs7
--- SKIP: TestAccAWSAuthBackendLogin_pkcs7 (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccAWSAuthBackendLogin_ec2Identity
--- SKIP: TestAccAWSAuthBackendLogin_ec2Identity (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccAWSAuthBackendRoleTag_basic_current
--- PASS: TestAccAWSAuthBackendRoleTag_basic_current (0.13s)
=== RUN   TestAccAWSAuthBackendRoleTag_basic_deprecated
--- PASS: TestAccAWSAuthBackendRoleTag_basic_deprecated (0.13s)
=== RUN   TestAccAWSAuthBackendRole_importInferred
--- PASS: TestAccAWSAuthBackendRole_importInferred (0.16s)
=== RUN   TestAccAWSAuthBackendRole_importEC2
--- PASS: TestAccAWSAuthBackendRole_importEC2 (0.17s)
=== RUN   TestAccAWSAuthBackendRole_importIAM
--- PASS: TestAccAWSAuthBackendRole_importIAM (0.16s)
=== RUN   TestAccAWSAuthBackendRole_inferred
--- PASS: TestAccAWSAuthBackendRole_inferred (0.16s)
=== RUN   TestAccAWSAuthBackendRole_ec2
--- PASS: TestAccAWSAuthBackendRole_ec2 (0.13s)
=== RUN   TestAccAWSAuthBackendRole_iam
--- PASS: TestAccAWSAuthBackendRole_iam (0.14s)
=== RUN   TestAccAWSAuthBackendRole_iamUpdate
--- PASS: TestAccAWSAuthBackendRole_iamUpdate (0.27s)
=== RUN   TestAccAWSAuthBackendRoleTagBlacklist_import
--- PASS: TestAccAWSAuthBackendRoleTagBlacklist_import (0.40s)
=== RUN   TestAccAWSAuthBackendRoleTagBlacklist_basic
--- PASS: TestAccAWSAuthBackendRoleTagBlacklist_basic (0.18s)
=== RUN   TestAccAWSAuthBackendRoleTagBlacklist_updated
--- PASS: TestAccAWSAuthBackendRoleTagBlacklist_updated (0.37s)
=== RUN   TestAccAWSAuthBackendSTSRole_import
--- PASS: TestAccAWSAuthBackendSTSRole_import (0.17s)
=== RUN   TestAccAWSAuthBackendSTSRole_basic
--- PASS: TestAccAWSAuthBackendSTSRole_basic (0.26s)
=== RUN   TestAccAWSSecretBackendRole_basic
--- SKIP: TestAccAWSSecretBackendRole_basic (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccAWSSecretBackendRole_import
--- SKIP: TestAccAWSSecretBackendRole_import (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccAWSSecretBackendRole_nested
--- SKIP: TestAccAWSSecretBackendRole_nested (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccAWSSecretBackend_basic
--- SKIP: TestAccAWSSecretBackend_basic (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestAccAWSSecretBackend_import
--- SKIP: TestAccAWSSecretBackend_import (0.00s)
        provider_test.go:72: AWS_ACCESS_KEY_ID not set
=== RUN   TestCertAuthBackend_basic
--- PASS: TestCertAuthBackend_basic (0.15s)
=== RUN   TestConsulSecretBackend
--- PASS: TestConsulSecretBackend (0.28s)
=== RUN   TestAccDatabaseSecretBackendConnection_import
--- SKIP: TestAccDatabaseSecretBackendConnection_import (0.00s)
        resource_database_secret_backend_connection_test.go:17: POSTGRES_URL not set
=== RUN   TestAccDatabaseSecretBackendConnection_cassandra
--- SKIP: TestAccDatabaseSecretBackendConnection_cassandra (0.00s)
        resource_database_secret_backend_connection_test.go:54: CASSANDRA_HOST not set
=== RUN   TestAccDatabaseSecretBackendConnection_mongodb
--- SKIP: TestAccDatabaseSecretBackendConnection_mongodb (0.00s)
        resource_database_secret_backend_connection_test.go:95: MONGODB_URL not set
=== RUN   TestAccDatabaseSecretBackendConnection_mssql
--- SKIP: TestAccDatabaseSecretBackendConnection_mssql (0.00s)
        resource_database_secret_backend_connection_test.go:123: MSSQL_URL not set
=== RUN   TestAccDatabaseSecretBackendConnection_mysql
--- PASS: TestAccDatabaseSecretBackendConnection_mysql (0.58s)
=== RUN   TestAccDatabaseSecretBackendConnectionUpdate_mysql
--- PASS: TestAccDatabaseSecretBackendConnectionUpdate_mysql (0.22s)
=== RUN   TestAccDatabaseSecretBackendConnection_postgresql
--- SKIP: TestAccDatabaseSecretBackendConnection_postgresql (0.00s)
        resource_database_secret_backend_connection_test.go:274: POSTGRES_URL not set
=== RUN   TestAccDatabaseSecretBackendRole_import
--- SKIP: TestAccDatabaseSecretBackendRole_import (0.00s)
        resource_database_secret_backend_role_test.go:17: POSTGRES_URL not set
=== RUN   TestAccDatabaseSecretBackendRole_basic
--- SKIP: TestAccDatabaseSecretBackendRole_basic (0.00s)
        resource_database_secret_backend_role_test.go:53: POSTGRES_URL not set
=== RUN   TestGCPAuthBackendRole_basic
--- PASS: TestGCPAuthBackendRole_basic (0.13s)
=== RUN   TestGCPAuthBackendRole_gce
--- PASS: TestGCPAuthBackendRole_gce (0.15s)
=== RUN   TestGCPAuthBackend_basic
--- PASS: TestGCPAuthBackend_basic (0.10s)
=== RUN   TestGCPSecretBackend
--- PASS: TestGCPSecretBackend (0.22s)
=== RUN   TestGenericSecretMigrateState
--- PASS: TestGenericSecretMigrateState (0.00s)
=== RUN   TestResourceGenericSecret
--- PASS: TestResourceGenericSecret (0.36s)
=== RUN   TestResourceGenericSecret_deleted
--- PASS: TestResourceGenericSecret_deleted (0.33s)
=== RUN   TestAccGithubAuthBackend_basic
--- PASS: TestAccGithubAuthBackend_basic (0.26s)
=== RUN   TestAccGithubAuthBackend_tuning
--- PASS: TestAccGithubAuthBackend_tuning (0.32s)
=== RUN   TestAccGithubAuthBackend_description
--- PASS: TestAccGithubAuthBackend_description (0.25s)
=== RUN   TestAccGithubAuthBackend_importTuning
--- PASS: TestAccGithubAuthBackend_importTuning (0.18s)
=== RUN   TestAccGithubTeam_basic
--- PASS: TestAccGithubTeam_basic (0.30s)
=== RUN   TestAccGithubTeam_teamConfigError
--- PASS: TestAccGithubTeam_teamConfigError (0.00s)
=== RUN   TestAccGithubTeam_importBasic
--- PASS: TestAccGithubTeam_importBasic (0.16s)
=== RUN   TestGithubTeamBackEndPath
=== RUN   TestGithubTeamBackEndPath/With_default_mount
=== RUN   TestGithubTeamBackEndPath/With_custom_mount
--- PASS: TestGithubTeamBackEndPath (0.00s)
    --- PASS: TestGithubTeamBackEndPath/With_default_mount (0.00s)
    --- PASS: TestGithubTeamBackEndPath/With_custom_mount (0.00s)
=== RUN   TestAccGithubUser_basic
--- PASS: TestAccGithubUser_basic (0.25s)
=== RUN   TestAccGithubUser_importBasic
--- PASS: TestAccGithubUser_importBasic (0.16s)
=== RUN   TestGithubUserBackEndPath
=== RUN   TestGithubUserBackEndPath/With_default_mount
=== RUN   TestGithubUserBackEndPath/With_custom_mount
--- PASS: TestGithubUserBackEndPath (0.00s)
    --- PASS: TestGithubUserBackEndPath/With_default_mount (0.00s)
    --- PASS: TestGithubUserBackEndPath/With_custom_mount (0.00s)
=== RUN   TestAccIdentityGroupAlias
--- PASS: TestAccIdentityGroupAlias (0.16s)
=== RUN   TestAccIdentityGroupAliasUpdate
--- PASS: TestAccIdentityGroupAliasUpdate (0.29s)
=== RUN   TestAccIdentityGroup
--- PASS: TestAccIdentityGroup (0.10s)
=== RUN   TestAccIdentityGroupUpdate
--- PASS: TestAccIdentityGroupUpdate (0.18s)
=== RUN   TestAccJWTAuthBackendRole_import
--- PASS: TestAccJWTAuthBackendRole_import (0.16s)
=== RUN   TestAccJWTAuthBackendRole_basic
--- PASS: TestAccJWTAuthBackendRole_basic (0.14s)
=== RUN   TestAccJWTAuthBackendRole_update
--- PASS: TestAccJWTAuthBackendRole_update (0.25s)
=== RUN   TestAccJWTAuthBackendRole_full
--- PASS: TestAccJWTAuthBackendRole_full (0.13s)
=== RUN   TestAccJWTAuthBackendRole_fullUpdate
--- PASS: TestAccJWTAuthBackendRole_fullUpdate (0.25s)
=== RUN   TestAccKubernetesAuthBackendConfig_import
--- PASS: TestAccKubernetesAuthBackendConfig_import (0.14s)
=== RUN   TestAccKubernetesAuthBackendConfig_basic
--- PASS: TestAccKubernetesAuthBackendConfig_basic (0.10s)
=== RUN   TestAccKubernetesAuthBackendConfig_update
--- PASS: TestAccKubernetesAuthBackendConfig_update (0.24s)
=== RUN   TestAccKubernetesAuthBackendConfig_full
--- PASS: TestAccKubernetesAuthBackendConfig_full (0.13s)
=== RUN   TestAccKubernetesAuthBackendConfig_fullUpdate
--- PASS: TestAccKubernetesAuthBackendConfig_fullUpdate (0.22s)
=== RUN   TestAccKubernetesAuthBackendRole_import
--- PASS: TestAccKubernetesAuthBackendRole_import (0.14s)
=== RUN   TestAccKubernetesAuthBackendRole_basic
--- PASS: TestAccKubernetesAuthBackendRole_basic (0.15s)
=== RUN   TestAccKubernetesAuthBackendRole_update
--- PASS: TestAccKubernetesAuthBackendRole_update (0.23s)
=== RUN   TestAccKubernetesAuthBackendRole_full
--- PASS: TestAccKubernetesAuthBackendRole_full (0.13s)
=== RUN   TestAccKubernetesAuthBackendRole_fullUpdate
--- PASS: TestAccKubernetesAuthBackendRole_fullUpdate (0.23s)
=== RUN   TestLDAPAuthBackendGroup_basic
--- PASS: TestLDAPAuthBackendGroup_basic (0.16s)
=== RUN   TestLDAPAuthBackend_basic
--- PASS: TestLDAPAuthBackend_basic (0.15s)
=== RUN   TestLDAPAuthBackendUser_basic
--- PASS: TestLDAPAuthBackendUser_basic (0.15s)
=== RUN   TestZeroTTLDoesNotCauseUpdate
--- PASS: TestZeroTTLDoesNotCauseUpdate (0.13s)
=== RUN   TestResourceMount
--- PASS: TestResourceMount (0.16s)
=== RUN   TestOktaAuthBackendGroup
--- PASS: TestOktaAuthBackendGroup (0.19s)
=== RUN   TestOktaAuthBackend
--- PASS: TestOktaAuthBackend (0.36s)
=== RUN   TestOktaAuthBackendUser
--- PASS: TestOktaAuthBackendUser (0.19s)
=== RUN   TestResourcePolicy
--- PASS: TestResourcePolicy (0.18s)
=== RUN   TestAccRabbitmqSecretBackendRole_basic
--- SKIP: TestAccRabbitmqSecretBackendRole_basic (0.00s)
        provider_test.go:85: RMQ_CONNECTION_URI not set
=== RUN   TestAccRabbitmqSecretBackendRole_import
--- SKIP: TestAccRabbitmqSecretBackendRole_import (0.00s)
        provider_test.go:85: RMQ_CONNECTION_URI not set
=== RUN   TestAccRabbitmqSecretBackendRole_nested
--- SKIP: TestAccRabbitmqSecretBackendRole_nested (0.00s)
        provider_test.go:85: RMQ_CONNECTION_URI not set
=== RUN   TestAccRabbitmqSecretBackend_basic
--- SKIP: TestAccRabbitmqSecretBackend_basic (0.00s)
        provider_test.go:85: RMQ_CONNECTION_URI not set
=== RUN   TestAccRabbitmqSecretBackend_import
--- SKIP: TestAccRabbitmqSecretBackend_import (0.00s)
        provider_test.go:85: RMQ_CONNECTION_URI not set
=== RUN   TestAccSSHSecretBackendCA_basic
--- PASS: TestAccSSHSecretBackendCA_basic (1.90s)
=== RUN   TestAccSSHSecretBackendCA_provided
--- PASS: TestAccSSHSecretBackendCA_provided (0.14s)
=== RUN   TestAccSSHSecretBackend_import
--- PASS: TestAccSSHSecretBackend_import (4.05s)
=== RUN   TestAccTokenAuthBackendRoleImport
--- PASS: TestAccTokenAuthBackendRoleImport (0.15s)
=== RUN   TestAccTokenAuthBackendRole
--- PASS: TestAccTokenAuthBackendRole (0.10s)
=== RUN   TestAccTokenAuthBackendRoleUpdate
--- PASS: TestAccTokenAuthBackendRoleUpdate (0.23s)
=== RUN   TestExpandAuthMethodTune
--- PASS: TestExpandAuthMethodTune (0.00s)
=== RUN   TestFlattenAuthMethodTune
--- PASS: TestFlattenAuthMethodTune (0.00s)
PASS
ok      github.com/terraform-providers/terraform-provider-vault/vault   24.357s

Copy link
Contributor

@tyrannosaurus-becks tyrannosaurus-becks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cvbarros fantastic! Thank you! This is excellent.

@camerondavison
Copy link
Contributor

it look like the documentation for the import for this is wrong. it says

terraform import vault_github_auth_backend_role.example auth/github

when it should maybe say

terraform import vault_github_auth_backend.example auth/github

but I cannot get the import to work either.

@camerondavison
Copy link
Contributor

ah.. looks like maybe it should read

terraform import vault_github_auth_backend.example github

opening #379

dandandy pushed a commit to dandandy/terraform-provider-vault that referenced this pull request Jun 17, 2021
Implement Github Auth Backend resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature Request: Github Auth Backend Tune Auth Method to permit audit_non_hmac_request_keys
3 participants