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

feat(mutual_authentication): implement mTLS resource #702

Merged
merged 7 commits into from
Jun 2, 2023

Conversation

Integralist
Copy link
Collaborator

@Integralist Integralist commented Jun 1, 2023

@Integralist Integralist added the enhancement New feature or request label Jun 1, 2023
@Integralist Integralist requested a review from mccurdyc June 2, 2023 13:55
@Integralist Integralist marked this pull request as ready for review June 2, 2023 13:56
Copy link
Collaborator

@mccurdyc mccurdyc left a comment

Choose a reason for hiding this comment

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

This looks good to me, one question.

Comment on lines +42 to +48
{
ResourceName: "fastly_tls_mutual_authentication.test",
ImportState: true,
ImportStateVerify: true,
// These attributes are not stored on the Fastly API and must be ignored.
ImportStateVerifyIgnore: []string{"cert_bundle"},
},
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Integralist what does this block do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This validates that Terraform is able to import the resource.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah makes sense. Thank you!

"github.com/stretchr/testify/require"
)

func TestAccFastlyMTLS_validate(t *testing.T) {
Copy link
Collaborator

@mccurdyc mccurdyc Jun 2, 2023

Choose a reason for hiding this comment

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

(just vocalizing my mental model)

  1. generated key and cert for <random-prefix>.example.com domain
  2. creates and checks resource fastly_tls_mutual_authentication with name=<random-prefix>
  3. updates resource and sets name=<random-prefix>updated

@Integralist Integralist merged commit 9d86965 into main Jun 2, 2023
@Integralist Integralist deleted the integralist/mtls branch June 2, 2023 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants