forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow the creation of subordinate CAs (GoogleCloudPlatform#5055)
* Bootstrap CA pool for CA tests * Add subordinate CA example/test * fix creation of subordinate CAs
- Loading branch information
1 parent
155265b
commit 327f4d2
Showing
7 changed files
with
115 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
mmv1/templates/terraform/examples/privateca_certificate_authority_basic.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
mmv1/templates/terraform/examples/privateca_certificate_authority_subordinate.tf.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
resource "google_privateca_certificate_authority" "<%= ctx[:primary_resource_id] %>" { | ||
// This example assumes this pool already exists. | ||
// Pools cannot be deleted in normal test circumstances, so we depend on static pools | ||
pool = "<%= ctx[:vars]["pool_name"] %>" | ||
certificate_authority_id = "<%= ctx[:vars]["certificate_authority_id"] %>" | ||
location = "<%= ctx[:vars]["pool_location"] %>" | ||
config { | ||
subject_config { | ||
subject { | ||
organization = "HashiCorp" | ||
common_name = "my-subordinate-authority" | ||
} | ||
subject_alt_name { | ||
dns_names = ["hashicorp.com"] | ||
} | ||
} | ||
x509_config { | ||
ca_options { | ||
is_ca = true | ||
max_issuer_path_length = 10 | ||
} | ||
key_usage { | ||
base_key_usage { | ||
digital_signature = true | ||
content_commitment = true | ||
key_encipherment = false | ||
data_encipherment = true | ||
key_agreement = true | ||
cert_sign = true | ||
crl_sign = true | ||
decipher_only = true | ||
} | ||
extended_key_usage { | ||
server_auth = true | ||
client_auth = false | ||
email_protection = true | ||
code_signing = true | ||
time_stamping = true | ||
} | ||
} | ||
} | ||
} | ||
lifetime = "86400s" | ||
key_spec { | ||
algorithm = "RSA_PKCS1_4096_SHA256" | ||
} | ||
type = "SUBORDINATE" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters