Skip to content

Commit

Permalink
Remove unneeded vault_url from request resource
Browse files Browse the repository at this point in the history
  • Loading branch information
axon-droe committed Jul 12, 2024
1 parent f17a5f8 commit efecdfb
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 13 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ resource "azurekvca_create" "test" {
# Optionally mangle the CSR to add values not supported by Azure (URI SAN for example)
resource "azurekvca_request" "test" {
vault_url = azurekvca_create.test.vault_url
csr_pem_in = azurekvca_create.test.csr_pem
names = {
Expand Down
1 change: 0 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ resource "azurekvca_create" "test" {
# Optionally mangle the CSR to add values not supported by Azure (URI SAN for example)
resource "azurekvca_request" "test" {
vault_url = azurekvca_create.test.vault_url
csr_pem_in = azurekvca_create.test.csr_pem
names = {
Expand Down
1 change: 0 additions & 1 deletion docs/resources/request.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Mangle a CSR to add fields that aren't supported by Azure (URI SANs)

- `csr_pem_in` (String) Input CSR in PEM format
- `names` (Attributes) SAN values to set (see [below for nested schema](#nestedatt--names))
- `vault_url` (String) URL of Azure Key Vault

### Read-Only

Expand Down
10 changes: 1 addition & 9 deletions internal/provider/request_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ type requestResourceModel struct {
CSRPEMIn types.String `tfsdk:"csr_pem_in"`
CSRPEMOut types.String `tfsdk:"csr_pem_out"`
Names requestNames `tfsdk:"names"`
VaultURL types.String `tfsdk:"vault_url"`
}

// Metadata returns the resource type name.
Expand Down Expand Up @@ -96,13 +95,6 @@ func (r *requestResource) Schema(_ context.Context, _ resource.SchemaRequest, re
objectplanmodifier.RequiresReplace(),
},
},
"vault_url": schema.StringAttribute{
MarkdownDescription: "URL of Azure Key Vault",
Required: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.RequiresReplace(),
},
},
},
}
}
Expand Down Expand Up @@ -179,7 +171,7 @@ func (r *requestResource) Create(ctx context.Context, req resource.CreateRequest
}
}

signer, err := NewAzureKVSigner(ctx, *r.azureCred, plan.VaultURL.ValueString(), "", "", parsedCSR.PublicKey)
signer, err := NewAzureKVSigner(ctx, *r.azureCred, "", "", "", parsedCSR.PublicKey)
if err != nil {
resp.Diagnostics.AddError(
"Error creating signer",
Expand Down
1 change: 0 additions & 1 deletion templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ resource "azurekvca_create" "test" {

# Optionally mangle the CSR to add values not supported by Azure (URI SAN for example)
resource "azurekvca_request" "test" {
vault_url = azurekvca_create.test.vault_url
csr_pem_in = azurekvca_create.test.csr_pem

names = {
Expand Down

0 comments on commit efecdfb

Please sign in to comment.