This file contains hidden or 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
output "cognito_ui_url" { | |
value = "https://${aws_cognito_user_pool.user_pool.domain}.auth.${local.region}.amazoncognito.com/login?client_id=${aws_cognito_user_pool_client.user_pool_client.id}&response_type=code&scope=openid&redirect_uri=${tolist(aws_cognito_user_pool_client.user_pool_client.callback_urls)[0]}" | |
depends_on = [aws_cognito_user_pool.user_pool] | |
} | |
output "cognito_user_pool_id" { | |
value = aws_cognito_user_pool.user_pool.id | |
} | |
output "cognito_user_pool_client_id" { |
This file contains hidden or 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
resource "aws_cognito_user_pool_domain" "user_pool_domain" { | |
domain = local.cognito_user_pool_domain # Must be globally unique | |
user_pool_id = aws_cognito_user_pool.user_pool.id | |
} |
This file contains hidden or 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
resource "aws_cognito_user_pool_client" "user_pool_client" { | |
name = local.cognito_user_pool_client_name | |
user_pool_id = aws_cognito_user_pool.user_pool.id | |
supported_identity_providers = ["COGNITO"] | |
# Do not generate a client secret for browser-based apps | |
generate_secret = false | |
# Allowed OAuth flows and scopes for the hosted UI. | |
allowed_oauth_flows_user_pool_client = true |
This file contains hidden or 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
resource "aws_cognito_user_pool" "user_pool" { | |
name = local.cognito_user_pool_name | |
# Customize password policy, MFA, etc., as needed | |
password_policy { | |
minimum_length = local.cognito_password_policy.minimum_length | |
require_uppercase = local.cognito_password_policy.require_uppercase | |
require_lowercase = local.cognito_password_policy.require_lowercase | |
require_numbers = local.cognito_password_policy.require_numbers | |
require_symbols = local.cognito_password_policy.require_symbols |
This file contains hidden or 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
storageClass: | |
name: s3-storageclass | |
provisioner: s3.csi.aws.com # Provisioner for AWS S3 | |
parameters: | |
type: standard | |
persistentVolume: | |
name: s3-pv | |
capacity: | |
storageSize: 5Gi |
This file contains hidden or 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
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: {{ .Values.nginx.name }} | |
labels: | |
{{- with .Values.nginx.labels }} | |
{{- toYaml . | nindent 4 }} | |
{{- end }} | |
spec: | |
containers: |
This file contains hidden or 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
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: {{ .Values.persistentVolumeClaim.name }} | |
spec: | |
accessModes: | |
- {{ .Values.persistentVolumeClaim.accessModes }} | |
storageClassName: {{ .Values.persistentVolumeClaim.storageClassName }} | |
resources: | |
requests: |
This file contains hidden or 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
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: {{ .Values.persistentVolume.name }} | |
spec: | |
capacity: | |
storage: {{ .Values.persistentVolume.capacity.storageSize }} | |
volumeMode: {{ .Values.persistentVolume.volumeMode }} | |
accessModes: | |
- {{ .Values.persistentVolume.accessModes }} |
This file contains hidden or 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
apiVersion: storage.k8s.io/v1 | |
kind: StorageClass | |
metadata: | |
name: {{ .Values.storageClass.name }} | |
provisioner: {{ .Values.storageClass.provisioner }} # Provisioner for AWS S3 | |
parameters: | |
type: {{ .Values.storageClass.parameters.type }} |
This file contains hidden or 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
output "cluster_auth_token" { | |
description = "Amazon Elastic Kubernetes Service Cluster Authentication Token" | |
value = data.aws_eks_cluster_auth.eks_cluster.token | |
} |