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

Update docs #70

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,14 @@ resource "akp_instance" "example" {
```

See more examples in [terraform-akp-example](https://github.com/akuity/terraform-akp-example) repo

## Migration
### Cluster
| Previous Field | Current Field |
|-------------------------|-----------------------------------|
| `agent_version` | `spec.data.target_version` |
| `auto_upgrade_disabled` | `spec.data.auto_upgrade_disabled` |
| `description` | `spec.description` |
| `kube_config` | `kubeconfig` |
| `namespace_scoped` | `spec.namespace_scoped` |
| `size` | `spec.data.size` |
37 changes: 21 additions & 16 deletions akp/data_source_akp_cluster_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,19 @@ func (d *AkpClusterDataSource) Schema(ctx context.Context, req datasource.Schema
func getAKPClusterDataSourceAttributes() map[string]schema.Attribute {
return map[string]schema.Attribute{
"id": schema.StringAttribute{
Computed: true,
MarkdownDescription: "Cluster ID",
Computed: true,
},
"instance_id": schema.StringAttribute{
MarkdownDescription: "Argo CD Instance ID",
MarkdownDescription: "Argo CD instance ID",
Required: true,
},
"name": schema.StringAttribute{
Required: true,
MarkdownDescription: "Name",
MarkdownDescription: "Cluster name",
},
"namespace": schema.StringAttribute{
MarkdownDescription: "Agent Installation Namespace",
MarkdownDescription: "Agent installation namespace",
Computed: true,
},
"labels": schema.MapAttribute{
Expand All @@ -44,16 +44,17 @@ func getAKPClusterDataSourceAttributes() map[string]schema.Attribute {
Computed: true,
},
"spec": schema.SingleNestedAttribute{
Computed: true,
Attributes: getClusterSpecDataSourceAttributes(),
MarkdownDescription: "Cluster spec",
Computed: true,
Attributes: getClusterSpecDataSourceAttributes(),
},
"kubeconfig": schema.SingleNestedAttribute{
MarkdownDescription: "Kubernetes connection settings. If configured, terraform will try to connect to the cluster and install the agent",
Computed: true,
Attributes: getKubeconfigDataSourceAttributes(),
},
"manifests": schema.StringAttribute{
MarkdownDescription: "Agent Installation Manifests",
MarkdownDescription: "Agent installation manifests",
Computed: true,
Sensitive: true,
},
Expand All @@ -63,16 +64,17 @@ func getAKPClusterDataSourceAttributes() map[string]schema.Attribute {
func getClusterSpecDataSourceAttributes() map[string]schema.Attribute {
return map[string]schema.Attribute{
"description": schema.StringAttribute{
MarkdownDescription: "Cluster Description",
MarkdownDescription: "Cluster description",
Computed: true,
},
"namespace_scoped": schema.BoolAttribute{
MarkdownDescription: "Agent Namespace Scoped",
MarkdownDescription: "If the agent is namespace scoped",
Computed: true,
},
"data": schema.SingleNestedAttribute{
Computed: true,
Attributes: getClusterDataDataSourceAttributes(),
MarkdownDescription: "Cluster data",
Computed: true,
Attributes: getClusterDataDataSourceAttributes(),
},
}
}
Expand All @@ -84,21 +86,24 @@ func getClusterDataDataSourceAttributes() map[string]schema.Attribute {
Computed: true,
},
"auto_upgrade_disabled": schema.BoolAttribute{
MarkdownDescription: "Disable Agents Auto Upgrade. On resource update terraform will try to update the agent if this is set to `true`. Otherwise agent will update itself automatically",
MarkdownDescription: "Disables agents auto upgrade. On resource update terraform will try to update the agent if this is set to `true`. Otherwise agent will update itself automatically",
Computed: true,
},
"kustomization": schema.StringAttribute{
Computed: true,
MarkdownDescription: "Kustomize configuration that will be applied to generated agent installation manifests",
Computed: true,
},
"app_replication": schema.BoolAttribute{
Computed: true,
MarkdownDescription: "Enables Argo CD state replication to the managed cluster that allows disconnecting the cluster from Akuity Platform without losing core Argocd features",
Computed: true,
},
"target_version": schema.StringAttribute{
MarkdownDescription: "Installed agent version",
MarkdownDescription: "The version of the agent to install on your cluster",
Computed: true,
},
"redis_tunneling": schema.BoolAttribute{
Computed: true,
MarkdownDescription: "Enables the ability to connect to Redis over a web-socket tunnel that allows using Akuity agent behind HTTPS proxy",
Computed: true,
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion akp/data_source_akp_clusters_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func (d *AkpClustersDataSource) Schema(ctx context.Context, req datasource.Schem
func getAKPClustersDataSourceAttributes() map[string]schema.Attribute {
return map[string]schema.Attribute{
"instance_id": schema.StringAttribute{
MarkdownDescription: "Argo CD Instance ID",
MarkdownDescription: "Argo CD instance ID",
Required: true,
},
"clusters": schema.ListNestedAttribute{
Expand Down
Loading